Submitter | phabricator |
---|---|
Date | Jan. 24, 2020, 6:43 a.m. |
Message ID | <differential-rev-PHID-DREV-jumde5owbpiwpawrbnho-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/44598/ |
State | Superseded |
Headers | show |
Comments
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
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
Patch
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)