# HG changeset patch # User Daniel Holth # Date 1170216546 18000 # Node ID 6b2909e8420357c5e9a93b5dc9f465cc2e5ee312 # Parent e6d26e71f049f378c4be0dcf8e8c3c4e8a0c5246 convert-repo converts symlinks from git diff --git a/contrib/convert-repo b/contrib/convert-repo --- a/contrib/convert-repo +++ b/contrib/convert-repo @@ -253,7 +253,7 @@ class convert_cvs: 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 @@ class convert_git: 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 @@ class convert_mercurial: 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")