mercurial/bundle2.py
changeset 24640 685639f9430d
parent 24071 184a2f6f40da
child 24641 60fecc5b14a4
--- a/mercurial/bundle2.py	Tue Apr 07 08:45:52 2015 -0700
+++ b/mercurial/bundle2.py	Mon Apr 06 15:40:12 2015 -0700
@@ -162,8 +162,6 @@
 _pack = struct.pack
 _unpack = struct.unpack
 
-_magicstring = 'HG2Y'
-
 _fstreamparamsize = '>i'
 _fpartheadersize = '>i'
 _fparttypesize = '>B'
@@ -410,6 +408,8 @@
     populate it. Then call `getchunks` to retrieve all the binary chunks of
     data that compose the bundle2 container."""
 
+    _magicstring = 'HG2Y'
+
     def __init__(self, ui, capabilities=()):
         self.ui = ui
         self._params = []
@@ -453,8 +453,8 @@
 
     # methods used to generate the bundle2 stream
     def getchunks(self):
-        self.ui.debug('start emission of %s stream\n' % _magicstring)
-        yield _magicstring
+        self.ui.debug('start emission of %s stream\n' % self._magicstring)
+        yield self._magicstring
         param = self._paramchunk()
         self.ui.debug('bundle parameter: %s\n' % param)
         yield _pack(_fstreamparamsize, len(param))