Mercurial > hg > hg-git
changeset 772:7e6cea0fe257
git_handler: convert to hex at the end instead of in the middle
This makes upcoming patches simpler.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Wed, 03 Sep 2014 19:35:31 +0200 |
parents | 7835a7559986 |
children | 03e1e9929dea |
files | hggit/git_handler.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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()