contrib/convert-repo
changeset 4082 6b2909e84203
parent 4062 516f883e3d79
child 4102 06d65498f73b
child 4112 59de487f43d7
--- a/contrib/convert-repo	Tue Feb 13 10:25:45 2007 -0200
+++ b/contrib/convert-repo	Tue Jan 30 23:09:06 2007 -0500
@@ -253,7 +253,7 @@
                 data = self.readp.read(count)
             else:
                 if line == "ok\n":
-                    return (data, "x" in mode)
+                    return (data, "x" in mode and "x" or "")
                 elif line.startswith("E "):
                     warn("cvs server: %s\n" % line[2:])
                 elif line.startswith("Remove"):
@@ -321,7 +321,8 @@
             m = m.split()
             h = m[3]
             p = (m[1] == "100755")
-            self.modecache[(f, h)] = p
+            s = (m[1] == "120000")
+            self.modecache[(f, h)] = (p and "x") or (s and "l") or ""
             changes.append((f, h))
         return changes
 
@@ -390,7 +391,7 @@
         return [ hg.hex(x) for x in h ]
 
     def putfile(self, f, e, data):
-        self.repo.wwrite(f, data, e and 'x' or '')
+        self.repo.wwrite(f, data, e)
         if self.repo.dirstate.state(f) == '?':
             self.repo.dirstate.update([f], "a")