# HG changeset patch # User Sean Farley # Date 1511822459 18000 # Node ID 367f9e0dc198f1bbf2b7f18023959a46c461b664 # Parent 9965a927998ae4b52667035d66352deebdda749e gitrepo: slight refactor to use {} instead of dict() This makes a following refactor easier to review. diff -r 9965a927998a -r 367f9e0dc198 hggit/gitrepo.py --- a/hggit/gitrepo.py Fri Dec 01 16:14:16 2017 -0800 +++ b/hggit/gitrepo.py Mon Nov 27 17:40:59 2017 -0500 @@ -51,10 +51,11 @@ handler = self.localrepo.githandler refs = handler.fetch_pack(self.path, heads=[]) # map any git shas that exist in hg to hg shas - stripped_refs = dict([ - (ref[11:], handler.map_hg_get(refs[ref]) or refs[ref]) - for ref in refs.keys() if ref.startswith('refs/heads/') - ]) + stripped_refs = { + ref[11:]: handler.map_hg_get(val) or val + for ref, val in refs.iteritems() + if ref.startswith('refs/heads/') + } return stripped_refs return {}