##// END OF EJS Templates
bundle2: print debug information during bundling...
Pierre-Yves David -
r20842:938718d7 default
parent child Browse files
Show More
@@ -97,7 +97,8 b' class bundle20(object):'
97 97
98 98 This object does not support payload part yet."""
99 99
100 def __init__(self):
100 def __init__(self, ui):
101 self.ui = ui
101 102 self._params = []
102 103 self._parts = []
103 104
@@ -110,8 +111,10 b' class bundle20(object):'
110 111 self._params.append((name, value))
111 112
112 113 def getchunks(self):
114 self.ui.debug('start emission of %s stream\n' % _magicstring)
113 115 yield _magicstring
114 116 param = self._paramchunk()
117 self.ui.debug('bundle parameter: %s\n' % param)
115 118 yield _pack(_fstreamparamsize, len(param))
116 119 if param:
117 120 yield param
@@ -119,6 +122,7 b' class bundle20(object):'
119 122 # no support for parts
120 123 # to be obviously fixed soon.
121 124 assert not self._parts
125 self.ui.debug('end of bundle\n')
122 126 yield '\0\0'
123 127
124 128 def _paramchunk(self):
@@ -20,7 +20,7 b' Create an extension to test bundle2 API'
20 20 > '[OUTPUTFILE]')
21 21 > def cmdbundle2(ui, repo, path=None, **opts):
22 22 > """write a bundle2 container on standard ouput"""
23 > bundler = bundle2.bundle20()
23 > bundler = bundle2.bundle20(ui)
24 24 > for p in opts['param']:
25 25 > p = p.split('=', 1)
26 26 > try:
@@ -161,9 +161,11 b' Test unbundling'
161 161
162 162 Test debug output
163 163 ---------------------------------------------------
164 (no debug output yet)
165 164
166 165 $ hg bundle2 --debug --param 'e|! 7/=babar%#==tutu' --param simple ../out.hg2
166 start emission of HG20 stream
167 bundle parameter: e%7C%21%207/=babar%25%23%3D%3Dtutu simple
168 end of bundle
167 169
168 170 file content is ok
169 171
General Comments 0
You need to be logged in to leave comments. Login now