hgext/convert/monotone.py
changeset 7957 88a2687fbd38
parent 7873 4a4c7f6a5912
child 7973 db3a68fd9387
--- a/hgext/convert/monotone.py	Thu Apr 02 14:48:06 2009 +0200
+++ b/hgext/convert/monotone.py	Thu Apr 02 22:25:49 2009 +0400
@@ -111,9 +111,8 @@
     def mtnrenamefiles(self, files, fromdir, todir):
         renamed = {}
         for tofile in files:
-            suffix = tofile.lstrip(todir)
-            if todir + suffix == tofile:
-                renamed[tofile] = (fromdir + suffix).lstrip("/")
+            if tofile.startswith(todir):
+                renamed[tofile] = fromdir + tofile[len(todir):]
         return renamed