hgext/record.py
branchstable
changeset 20334 205599e31870
parent 20301 4988e4246537
child 21251 a836fa58b512
--- a/hgext/record.py	Wed Jan 29 15:16:36 2014 +0100
+++ b/hgext/record.py	Fri Jan 31 14:52:53 2014 -0800
@@ -601,12 +601,8 @@
             # it is important to first chdir to repo root -- we'll call
             # a highlevel command with list of pathnames relative to
             # repo root
-            cwd = os.getcwd()
-            os.chdir(repo.root)
-            try:
-                commitfunc(ui, repo, *newfiles, **opts)
-            finally:
-                os.chdir(cwd)
+            newfiles = [repo.wjoin(nf) for nf in newfiles]
+            commitfunc(ui, repo, *newfiles, **opts)
 
             return 0
         finally: