Fix path handling for deleting files on merge
authormpm@selenic.com
Wed, 17 Aug 2005 00:36:36 -0800
changeset 934 ff484cc157d6
parent 933 9c43d68ad59f
child 935 925563ff1b18
child 944 41ca6bf19735
Fix path handling for deleting files on merge
mercurial/hg.py
--- a/mercurial/hg.py	Wed Aug 17 00:33:53 2005 -0800
+++ b/mercurial/hg.py	Wed Aug 17 00:36:36 2005 -0800
@@ -1765,11 +1765,11 @@
         for f in remove:
             self.ui.note("removing %s\n" % f)
             try:
-                os.unlink(f)
+                os.unlink(self.wjoin(f))
             except OSError, inst:
                 self.ui.warn("update failed to remove %s: %s!\n" % (f, inst))
             # try removing directories that might now be empty
-            try: os.removedirs(os.path.dirname(f))
+            try: os.removedirs(os.path.dirname(self.wjoin(f)))
             except: pass
         if moddirstate:
             if mode == 'n':