diff hggit/git_handler.py @ 1007:9b7088850ca8

git_handler: use our read_pkt_refs for fetch_pack
author Sean Farley <sean@farley.io>
date Fri, 15 May 2015 11:40:49 -0700 (2015-05-15)
parents d0ce6eaebe7b
children 4fa1812d1f24
line wrap: on
line diff
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -1160,6 +1160,10 @@
         try:
             progress = GitProgress(self.ui)
             f = StringIO.StringIO()
+
+            # monkey patch dulwich's read_pkt_refs so that we can determine on
+            # clone which bookmark to activate
+            client.read_pkt_refs = compat.read_pkt_refs
             ret = localclient.fetch_pack(path, determine_wants, graphwalker,
                                          f.write, progress.progress)
             if(f.pos != 0):