diff hgext/infinitepush/common.py @ 37193:5a9692d0d6fc

infinitepush: drop the scratchbookmarksparttype bundle2 part The scratchbookmarksparttype bundle2 part was used in backupcommands.py which we deleted in an earlier changeset. We don't need this part anymore. Moreover we now have bookmarks bundle2 part in core which we can use. This patch also drops the related encoding and decoding functions. Differential Revision: https://phab.mercurial-scm.org/D2102
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 08 Feb 2018 17:27:47 +0530
parents 03ff17a4bf53
children aac4be30e250
line wrap: on
line diff
--- a/hgext/infinitepush/common.py	Thu Feb 08 17:18:28 2018 +0530
+++ b/hgext/infinitepush/common.py	Thu Feb 08 17:27:47 2018 +0530
@@ -5,9 +5,7 @@
 
 from __future__ import absolute_import
 
-import json
 import os
-import struct
 import tempfile
 
 from mercurial.node import hex
@@ -21,14 +19,6 @@
     return ('remotenames' in extensions._extensions and
             ui.configbool('remotenames', 'bookmarks'))
 
-def encodebookmarks(bookmarks):
-    encoded = {}
-    for bookmark, node in bookmarks.iteritems():
-        encoded[bookmark] = node
-    dumped = json.dumps(encoded)
-    result = struct.pack('>i', len(dumped)) + dumped
-    return result
-
 def downloadbundle(repo, unknownbinhead):
     index = repo.bundlestore.index
     store = repo.bundlestore.store