Mercurial > public > mercurial-scm > hg
diff hgext/convert/git.py @ 8456:e9e2a2c9b294
convert: use set instead of dict
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 17 May 2009 03:04:17 +0200 |
parents | e3d3dad805f9 |
children | 25e572394f5c |
line wrap: on
line diff
--- a/hgext/convert/git.py Sun May 17 03:02:12 2009 +0200 +++ b/hgext/convert/git.py Sun May 17 03:04:17 2009 +0200 @@ -63,7 +63,7 @@ self.modecache = {} fh = self.gitcmd("git diff-tree -z --root -m -r %s" % version) changes = [] - seen = {} + seen = set() entry = None for l in fh.read().split('\x00'): if not entry: @@ -73,7 +73,7 @@ continue f = l if f not in seen: - seen[f] = 1 + seen.add(f) entry = entry.split() h = entry[3] p = (entry[1] == "100755")