D3367: hgwebdir: un-bytes the env dict before re-parsing env

2018-04-16 Thread durin42 (Augie Fackler)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa728e3695325: hgwebdir: un-bytes the env dict before 
re-parsing env (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3367?vs=8277&id=8306

REVISION DETAIL
  https://phab.mercurial-scm.org/D3367

AFFECTED FILES
  contrib/python3-whitelist
  mercurial/hgweb/hgwebdir_mod.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -422,8 +422,12 @@
 if real:
 # Re-parse the WSGI environment to take into account our
 # repository path component.
+uenv = req.rawenv
+if pycompat.ispy3:
+uenv = {k.decode('latin1'): v for k, v in
+uenv.iteritems()}
 req = requestmod.parserequestfromenv(
-req.rawenv, reponame=virtualrepo,
+uenv, reponame=virtualrepo,
 altbaseurl=self.ui.config('web', 'baseurl'))
 try:
 # ensure caller gets private copy of ui
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -151,6 +151,7 @@
 test-glog-topological.t
 test-gpg.t
 test-graft.t
+test-hg-parseurl.py
 test-hghave.t
 test-hgignore.t
 test-hgk.t



To: durin42, #hg-reviewers, yuja, pulkit
Cc: yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3367: hgwebdir: un-bytes the env dict before re-parsing env

2018-04-14 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 8277.
Herald added a reviewer: pulkit.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3367?vs=8275&id=8277

REVISION DETAIL
  https://phab.mercurial-scm.org/D3367

AFFECTED FILES
  contrib/python3-whitelist
  mercurial/hgweb/hgwebdir_mod.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -422,8 +422,12 @@
 if real:
 # Re-parse the WSGI environment to take into account our
 # repository path component.
+uenv = req.rawenv
+if pycompat.ispy3:
+uenv = {k.decode('latin1'): v for k, v in
+uenv.iteritems()}
 req = requestmod.parserequestfromenv(
-req.rawenv, reponame=virtualrepo,
+uenv, reponame=virtualrepo,
 altbaseurl=self.ui.config('web', 'baseurl'))
 try:
 # ensure caller gets private copy of ui
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -153,6 +153,7 @@
 test-glog-topological.t
 test-gpg.t
 test-graft.t
+test-hg-parseurl.py
 test-hghave.t
 test-hgignore.t
 test-hgk.t



To: durin42, #hg-reviewers, yuja, pulkit
Cc: yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3367: hgwebdir: un-bytes the env dict before re-parsing env

2018-04-14 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 8275.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3367?vs=8244&id=8275

REVISION DETAIL
  https://phab.mercurial-scm.org/D3367

AFFECTED FILES
  mercurial/hgweb/hgwebdir_mod.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -422,8 +422,12 @@
 if real:
 # Re-parse the WSGI environment to take into account our
 # repository path component.
+uenv = req..rawenv
+if pycompat.ispy3:
+uenv = {k.decode('latin1'): v for k, v in
+uenv.iteritems()}
 req = requestmod.parserequestfromenv(
-req.rawenv, reponame=virtualrepo,
+uenv, reponame=virtualrepo,
 altbaseurl=self.ui.config('web', 'baseurl'))
 try:
 # ensure caller gets private copy of ui



To: durin42, #hg-reviewers, yuja
Cc: yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3367: hgwebdir: un-bytes the env dict before re-parsing env

2018-04-14 Thread yuja (Yuya Nishihara)
yuja requested changes to this revision.
yuja added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> hgwebdir_mod.py:425
>  # repository path component.
> +uenv = {k.decode('latin1'): v for k, v in
> +req.rawenv.iteritems()}

Maybe needs `if ispy3` ?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3367

To: durin42, #hg-reviewers, yuja
Cc: yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3367: hgwebdir: un-bytes the env dict before re-parsing env

2018-04-13 Thread durin42 (Augie Fackler)
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Not the most elegant, but it restores
  test-subrepo-deep-nested-change.t to passing on Python 3.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3367

AFFECTED FILES
  mercurial/hgweb/hgwebdir_mod.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -422,8 +422,10 @@
 if real:
 # Re-parse the WSGI environment to take into account our
 # repository path component.
+uenv = {k.decode('latin1'): v for k, v in
+req.rawenv.iteritems()}
 req = requestmod.parserequestfromenv(
-req.rawenv, reponame=virtualrepo,
+uenv, reponame=virtualrepo,
 altbaseurl=self.ui.config('web', 'baseurl'))
 try:
 # ensure caller gets private copy of ui



To: durin42, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel