Mercurial > public > mercurial-scm > hg-stable
diff hgext/convert/git.py @ 5335:88e931f74e8b
convert_git: avoid returning two entries for the same file in getchanges
This could happen in merge changesets if the merged file was different
from both parents.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Mon, 24 Sep 2007 19:00:11 -0300 |
parents | 9d7052f17d77 |
children | 24de027551c1 |
line wrap: on
line diff
--- a/hgext/convert/git.py Mon Sep 24 19:00:11 2007 -0300 +++ b/hgext/convert/git.py Mon Sep 24 19:00:11 2007 -0300 @@ -61,9 +61,14 @@ self.modecache = {} fh = self.gitcmd("git-diff-tree --root -m -r %s" % version) changes = [] + seen = {} for l in fh: - if "\t" not in l: continue + if "\t" not in l: + continue m, f = l[:-1].split("\t") + if f in seen: + continue + seen[f] = 1 m = m.split() h = m[3] p = (m[1] == "100755")