changeset 701:e29e280776ff

update_hg_bookmarks: don't update bookmarks that don't have an hg commit Still more bugs to fix.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 04 Mar 2014 14:50:44 -0800 (2014-03-04)
parents a72816ade410
children 178b15457927
files hggit/git_handler.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -1126,9 +1126,10 @@
             for head, sha in heads.iteritems():
                 # refs contains all the refs in the server, not just
                 # the ones we are pulling
-                if sha not in self.git.object_store:
+                hgsha = self.map_hg_get(sha)
+                if hgsha is None:
                     continue
-                hgsha = bin(self.map_hg_get(sha))
+                hgsha = bin(hgsha)
                 if not head in bms:
                     # new branch
                     bms[head + suffix] = hgsha