##// END OF EJS Templates
bundle: when verbose, show what takes up the space in the generated bundle...
Mads Kiilerich -
r23748:4ab66de4 default
parent child Browse files
Show More
@@ -258,6 +258,11 b' class cg1packer(object):'
258 self._repo = repo
258 self._repo = repo
259 self._reorder = reorder
259 self._reorder = reorder
260 self._progress = repo.ui.progress
260 self._progress = repo.ui.progress
261 if self._repo.ui.verbose and not self._repo.ui.debugflag:
262 self._verbosenote = self._repo.ui.note
263 else:
264 self._verbosenote = lambda s: None
265
261 def close(self):
266 def close(self):
262 return closechunk()
267 return closechunk()
263
268
@@ -341,9 +346,13 b' class cg1packer(object):'
341 mfs.setdefault(c[0], x)
346 mfs.setdefault(c[0], x)
342 return x
347 return x
343
348
349 self._verbosenote(_('uncompressed size of bundle content:\n'))
350 size = 0
344 for chunk in self.group(clnodes, cl, lookupcl, units=_('changesets'),
351 for chunk in self.group(clnodes, cl, lookupcl, units=_('changesets'),
345 reorder=reorder):
352 reorder=reorder):
353 size += len(chunk)
346 yield chunk
354 yield chunk
355 self._verbosenote(_('%8.i (changelog)\n') % size)
347 progress(msgbundling, None)
356 progress(msgbundling, None)
348
357
349 # Callback for the manifest, used to collect linkrevs for filelog
358 # Callback for the manifest, used to collect linkrevs for filelog
@@ -364,9 +373,12 b' class cg1packer(object):'
364 return clnode
373 return clnode
365
374
366 mfnodes = self.prune(mf, mfs, commonrevs, source)
375 mfnodes = self.prune(mf, mfs, commonrevs, source)
376 size = 0
367 for chunk in self.group(mfnodes, mf, lookupmf, units=_('manifests'),
377 for chunk in self.group(mfnodes, mf, lookupmf, units=_('manifests'),
368 reorder=reorder):
378 reorder=reorder):
379 size += len(chunk)
369 yield chunk
380 yield chunk
381 self._verbosenote(_('%8.i (manifests)\n') % size)
370 progress(msgbundling, None)
382 progress(msgbundling, None)
371
383
372 mfs.clear()
384 mfs.clear()
@@ -417,10 +429,14 b' class cg1packer(object):'
417 if filenodes:
429 if filenodes:
418 progress(msgbundling, i + 1, item=fname, unit=msgfiles,
430 progress(msgbundling, i + 1, item=fname, unit=msgfiles,
419 total=total)
431 total=total)
420 yield self.fileheader(fname)
432 h = self.fileheader(fname)
433 size = len(h)
434 yield h
421 for chunk in self.group(filenodes, filerevlog, lookupfilelog,
435 for chunk in self.group(filenodes, filerevlog, lookupfilelog,
422 reorder=reorder):
436 reorder=reorder):
437 size += len(chunk)
423 yield chunk
438 yield chunk
439 self._verbosenote(_('%8.i %s\n') % (size, fname))
424
440
425 def deltaparent(self, revlog, rev, p1, p2, prev):
441 def deltaparent(self, revlog, rev, p1, p2, prev):
426 return prev
442 return prev
@@ -109,8 +109,16 b' No changes, just a different message:'
109 a
109 a
110 stripping amended changeset 74609c7f506e
110 stripping amended changeset 74609c7f506e
111 1 changesets found
111 1 changesets found
112 uncompressed size of bundle content:
113 250 (changelog)
114 143 (manifests)
115 109 a
112 saved backup bundle to $TESTTMP/.hg/strip-backup/74609c7f506e-amend-backup.hg (glob)
116 saved backup bundle to $TESTTMP/.hg/strip-backup/74609c7f506e-amend-backup.hg (glob)
113 1 changesets found
117 1 changesets found
118 uncompressed size of bundle content:
119 246 (changelog)
120 143 (manifests)
121 109 a
114 adding branch
122 adding branch
115 adding changesets
123 adding changesets
116 adding manifests
124 adding manifests
@@ -236,8 +244,16 b' then, test editing custom commit message'
236 a
244 a
237 stripping amended changeset 5f357c7560ab
245 stripping amended changeset 5f357c7560ab
238 1 changesets found
246 1 changesets found
247 uncompressed size of bundle content:
248 238 (changelog)
249 143 (manifests)
250 111 a
239 saved backup bundle to $TESTTMP/.hg/strip-backup/5f357c7560ab-amend-backup.hg (glob)
251 saved backup bundle to $TESTTMP/.hg/strip-backup/5f357c7560ab-amend-backup.hg (glob)
240 1 changesets found
252 1 changesets found
253 uncompressed size of bundle content:
254 246 (changelog)
255 143 (manifests)
256 111 a
241 adding branch
257 adding branch
242 adding changesets
258 adding changesets
243 adding manifests
259 adding manifests
@@ -265,8 +281,16 b' Same, but with changes in working dir (d'
265 stripping intermediate changeset a0ea9b1a4c8c
281 stripping intermediate changeset a0ea9b1a4c8c
266 stripping amended changeset 7ab3bf440b54
282 stripping amended changeset 7ab3bf440b54
267 2 changesets found
283 2 changesets found
284 uncompressed size of bundle content:
285 450 (changelog)
286 282 (manifests)
287 209 a
268 saved backup bundle to $TESTTMP/.hg/strip-backup/7ab3bf440b54-amend-backup.hg (glob)
288 saved backup bundle to $TESTTMP/.hg/strip-backup/7ab3bf440b54-amend-backup.hg (glob)
269 1 changesets found
289 1 changesets found
290 uncompressed size of bundle content:
291 246 (changelog)
292 143 (manifests)
293 113 a
270 adding branch
294 adding branch
271 adding changesets
295 adding changesets
272 adding manifests
296 adding manifests
@@ -6,8 +6,13 b' Create a test repository:'
6 $ touch a ; hg add a ; hg ci -ma
6 $ touch a ; hg add a ; hg ci -ma
7 $ touch b ; hg add b ; hg ci -mb
7 $ touch b ; hg add b ; hg ci -mb
8 $ touch c ; hg add c ; hg ci -mc
8 $ touch c ; hg add c ; hg ci -mc
9 $ hg bundle --base 0 --rev tip bundle.hg
9 $ hg bundle --base 0 --rev tip bundle.hg -v
10 2 changesets found
10 2 changesets found
11 uncompressed size of bundle content:
12 332 (changelog)
13 282 (manifests)
14 105 b
15 105 c
11
16
12 Terse output:
17 Terse output:
13
18
@@ -1097,6 +1097,17 b' redo pull with --lfrev and check it pull'
1097 all local heads known remotely
1097 all local heads known remotely
1098 6 changesets found
1098 6 changesets found
1099 adding changesets
1099 adding changesets
1100 uncompressed size of bundle content:
1101 1213 (changelog)
1102 1479 (manifests)
1103 234 .hglf/large1
1104 504 .hglf/large3
1105 512 .hglf/sub/large4
1106 162 .hglf/sub2/large6
1107 162 .hglf/sub2/large7
1108 192 normal1
1109 397 normal3
1110 405 sub/normal4
1100 adding manifests
1111 adding manifests
1101 adding file changes
1112 adding file changes
1102 added 6 changesets with 16 changes to 8 files
1113 added 6 changesets with 16 changes to 8 files
@@ -764,6 +764,10 b' Bare push with next changeset and common'
764 pushing to ../alpha
764 pushing to ../alpha
765 searching for changes
765 searching for changes
766 1 changesets found
766 1 changesets found
767 uncompressed size of bundle content:
768 172 (changelog)
769 145 (manifests)
770 111 a-H
767 adding changesets
771 adding changesets
768 adding manifests
772 adding manifests
769 adding file changes
773 adding file changes
@@ -142,6 +142,10 b''
142 pushing to ../c
142 pushing to ../c
143 searching for changes
143 searching for changes
144 2 changesets found
144 2 changesets found
145 uncompressed size of bundle content:
146 308 (changelog)
147 286 (manifests)
148 213 foo
145 adding changesets
149 adding changesets
146 adding manifests
150 adding manifests
147 adding file changes
151 adding file changes
@@ -64,8 +64,18 b' already has one local mq patch'
64 updating mq patch p0.patch to 5:9ecc820b1737
64 updating mq patch p0.patch to 5:9ecc820b1737
65 $TESTTMP/a/.hg/patches/p0.patch (glob)
65 $TESTTMP/a/.hg/patches/p0.patch (glob)
66 2 changesets found
66 2 changesets found
67 uncompressed size of bundle content:
68 344 (changelog)
69 284 (manifests)
70 109 p0
71 109 p1
67 saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-backup.hg (glob)
72 saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-backup.hg (glob)
68 2 changesets found
73 2 changesets found
74 uncompressed size of bundle content:
75 399 (changelog)
76 284 (manifests)
77 109 p0
78 109 p1
69 adding branch
79 adding branch
70 adding changesets
80 adding changesets
71 adding manifests
81 adding manifests
@@ -294,8 +294,16 b' rebase of merge of ancestors'
294 other
294 other
295 rebase merging completed
295 rebase merging completed
296 1 changesets found
296 1 changesets found
297 uncompressed size of bundle content:
298 193 (changelog)
299 196 (manifests)
300 162 other
297 saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-backup.hg (glob)
301 saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-backup.hg (glob)
298 1 changesets found
302 1 changesets found
303 uncompressed size of bundle content:
304 252 (changelog)
305 147 (manifests)
306 162 other
299 adding branch
307 adding branch
300 adding changesets
308 adding changesets
301 adding manifests
309 adding manifests
General Comments 0
You need to be logged in to leave comments. Login now