D7980: resourceutil: ensure `_rootpath` is defined under py2exe

2020-01-24 Thread mharbison72 (Matt Harbison)
Closed by commit rHGa90039b07343: resourceutil: ensure `_rootpath` is defined 
under py2exe (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs 
Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7980?vs=19542&id=19551

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7980/new/

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

AFFECTED FILES
  mercurial/utils/resourceutil.py

CHANGE DETAILS

diff --git a/mercurial/utils/resourceutil.py b/mercurial/utils/resourceutil.py
--- a/mercurial/utils/resourceutil.py
+++ b/mercurial/utils/resourceutil.py
@@ -33,6 +33,7 @@
 if mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app':
 # executable version (py2exe) doesn't support __file__
 datapath = os.path.dirname(pycompat.sysexecutable)
+_rootpath = os.path.dirname(datapath)
 else:
 datapath = os.path.dirname(os.path.dirname(pycompat.fsencode(__file__)))
 _rootpath = os.path.dirname(datapath)



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


D7980: resourceutil: ensure `_rootpath` is defined under py2exe

2020-01-24 Thread mharbison72 (Matt Harbison)
mharbison72 added inline comments.

INLINE COMMENTS

> dlax wrote in resourceutil.py:39
> `_rootpath` declaration could be moved after the `else` clause to avoid 
> repetition.

Works for me, if someone wants to fix inflight.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7980/new/

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

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


D7980: resourceutil: ensure `_rootpath` is defined under py2exe

2020-01-23 Thread dlax (Denis Laxalde)
dlax added inline comments.

INLINE COMMENTS

> resourceutil.py:39
>  datapath = os.path.dirname(os.path.dirname(pycompat.fsencode(__file__)))
>  _rootpath = os.path.dirname(datapath)
>  

`_rootpath` declaration could be moved after the `else` clause to avoid 
repetition.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7980/new/

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

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


D7980: resourceutil: ensure `_rootpath` is defined under py2exe

2020-01-23 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Can't even run `hg version` without this.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/utils/resourceutil.py

CHANGE DETAILS

diff --git a/mercurial/utils/resourceutil.py b/mercurial/utils/resourceutil.py
--- a/mercurial/utils/resourceutil.py
+++ b/mercurial/utils/resourceutil.py
@@ -33,6 +33,7 @@
 if mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app':
 # executable version (py2exe) doesn't support __file__
 datapath = os.path.dirname(pycompat.sysexecutable)
+_rootpath = os.path.dirname(datapath)
 else:
 datapath = os.path.dirname(os.path.dirname(pycompat.fsencode(__file__)))
 _rootpath = os.path.dirname(datapath)



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