# HG changeset patch # User Siddharth Agarwal # Date 1409765731 -7200 # Node ID 7e6cea0fe2570f39e25e43346b0e0fbb4f7dfeb9 # Parent 7835a75599860bd30463bbca49b8891023e18c22 git_handler: convert to hex at the end instead of in the middle This makes upcoming patches simpler. diff --git a/hggit/git_handler.py b/hggit/git_handler.py --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -1249,7 +1249,6 @@ for t in list(tags): if t.startswith(remote_name + '/'): del tags[t] - tags = dict((k, hex(v)) for k, v in tags.iteritems()) store = self.git.object_store for ref_name, sha in refs.iteritems(): if ref_name.startswith('refs/heads'): @@ -1257,7 +1256,7 @@ if hgsha is None or hgsha not in self.repo: continue head = ref_name[11:] - tags['/'.join((remote_name, head))] = hgsha + tags['/'.join((remote_name, head))] = bin(hgsha) # TODO(durin42): what is this doing? new_ref = 'refs/remotes/%s/%s' % (remote_name, head) self.git.refs[new_ref] = sha @@ -1267,7 +1266,7 @@ tf = open(tagfile, 'wb') for tag, node in tags.iteritems(): - tf.write('%s %s\n' % (node, tag)) + tf.write('%s %s\n' % (hex(node), tag)) tf.close()