Changeset 5527a5c0dcf2…
Parent 943019bebd82…
by
Changes to one file · Browse files at 5527a5c0dcf2 Showing diff from parent 943019bebd82 Diff from another changeset...
@@ -318,10 +318,12 @@ if os.name == 'nt':
args = ['"%s"' % arg for arg in args]
oldcwd = os.getcwd()
- root = paths.find_root()
- os.chdir(root)
- os.spawnv(os.P_NOWAIT, sys.executable, args)
- os.chdir(oldcwd)
+ root = paths.find_root(oldcwd)
+ try:
+ os.chdir(root)
+ os.spawnv(os.P_NOWAIT, sys.executable, args)
+ finally:
+ os.chdir(oldcwd)
return None
else:
pats = hglib.canonpaths(pats)
|
Loading...