Bug 1228580 - ./mach mercurial-setup should use ~ to set up extension paths, not my literal home directory. r=gps
authorAlex Jordan <alex@strugee.net>
Fri, 27 Nov 2015 14:51:50 -0800
changeset 309581 fed8eacf15233237d07b948132036300d695207a
parent 309580 7b77be69844357c6e6f480e254efa5692366d142
child 309582 8947743399375a912ba151c5d8bf1705bc5e6101
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1228580
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1228580 - ./mach mercurial-setup should use ~ to set up extension paths, not my literal home directory. r=gps
tools/mercurial/hgsetup/wizard.py
--- a/tools/mercurial/hgsetup/wizard.py
+++ b/tools/mercurial/hgsetup/wizard.py
@@ -518,17 +518,20 @@ class MercurialSetupWizard(object):
                 return
             print(name)
             print('=' * len(name))
             print('')
             if not self._prompt_yn(prompt_text):
                 print('')
                 return
         if not path:
-            path = os.path.join(self.vcs_tools_dir, 'hgext', name)
+            # We replace the user's home directory with ~ so the
+            # config file doesn't depend on the path to the home
+            # directory
+            path = os.path.join(self.vcs_tools_dir.replace(os.path.expanduser('~'), '~'), 'hgext', name)
         c.activate_extension(name, path)
         print('Activated %s extension.\n' % name)
 
     def _prompt(self, msg, allow_empty=False):
         print(msg)
 
         while True:
             response = raw_input().decode('utf-8')