# HG changeset patch # User Thomas Arendsen Hein # Date 2007-12-30 18:46:13 # Node ID e20de0caf8e77a01a0a6ce8e91843d1547b8d568 # Parent c2a21fe609942715eaac0acb9a72b818ffc9d275 Show number of changesets written to bundle files by default (issue569) This was only shown with -v before. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1494,8 +1494,9 @@ class localrepository(repo.repository): return remote.unbundle(cg, remote_heads, 'push') return ret[1] - def changegroupinfo(self, nodes): - self.ui.note(_("%d changesets found\n") % len(nodes)) + def changegroupinfo(self, nodes, source): + if self.ui.verbose or source == 'bundle': + self.ui.status(_("%d changesets found\n") % len(nodes)) if self.ui.debugflag: self.ui.debug(_("List of changesets:\n")) for node in nodes: @@ -1521,7 +1522,7 @@ class localrepository(repo.repository): # msng is short for missing - compute the list of changesets in this # changegroup. msng_cl_lst, bases, heads = cl.nodesbetween(bases, heads) - self.changegroupinfo(msng_cl_lst) + self.changegroupinfo(msng_cl_lst, source) # Some bases may turn out to be superfluous, and some heads may be # too. nodesbetween will return the minimal set of bases and heads # necessary to re-create the changegroup. @@ -1785,7 +1786,7 @@ class localrepository(repo.repository): cl = self.changelog nodes = cl.nodesbetween(basenodes, None)[0] revset = dict.fromkeys([cl.rev(n) for n in nodes]) - self.changegroupinfo(nodes) + self.changegroupinfo(nodes, source) def identity(x): return x diff --git a/tests/test-bundle-r.out b/tests/test-bundle-r.out --- a/tests/test-bundle-r.out +++ b/tests/test-bundle-r.out @@ -25,6 +25,7 @@ crosschecking files in changesets and ma checking files 4 files, 9 changesets, 7 total revisions searching for changes +1 changesets found adding changesets adding manifests adding file changes @@ -37,6 +38,7 @@ checking files 1 files, 1 changesets, 1 total revisions 0:5649c9d34dd8 searching for changes +2 changesets found adding changesets adding manifests adding file changes @@ -49,6 +51,7 @@ checking files 1 files, 2 changesets, 2 total revisions 1:10b2180f755b searching for changes +3 changesets found adding changesets adding manifests adding file changes @@ -61,6 +64,7 @@ checking files 1 files, 3 changesets, 3 total revisions 2:d62976ca1e50 searching for changes +4 changesets found adding changesets adding manifests adding file changes @@ -73,6 +77,7 @@ checking files 1 files, 4 changesets, 4 total revisions 3:ac69c658229d searching for changes +2 changesets found adding changesets adding manifests adding file changes @@ -85,6 +90,7 @@ checking files 1 files, 2 changesets, 2 total revisions 1:5f4f3ceb285e searching for changes +3 changesets found adding changesets adding manifests adding file changes @@ -97,6 +103,7 @@ checking files 1 files, 3 changesets, 3 total revisions 2:024e4e7df376 searching for changes +4 changesets found adding changesets adding manifests adding file changes @@ -109,6 +116,7 @@ checking files 2 files, 4 changesets, 5 total revisions 3:1e3f6b843bd6 searching for changes +5 changesets found adding changesets adding manifests adding file changes @@ -121,6 +129,7 @@ checking files 3 files, 5 changesets, 6 total revisions 4:80fe151401c2 searching for changes +5 changesets found adding changesets adding manifests adding file changes @@ -148,6 +157,11 @@ rolling back last transaction % should fail abort: --base is incompatible with specifiying a destination abort: repository default-push not found! +2 changesets found +4 changesets found +6 changesets found +1 changesets found +1 changesets found 1 files updated, 0 files merged, 0 files removed, 0 files unresolved % 2 2:d62976ca1e50 @@ -202,6 +216,7 @@ warning: detected divergent renames of a adifferentfile 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) +7 changesets found 1 files updated, 0 files merged, 0 files removed, 0 files unresolved adding changesets adding manifests diff --git a/tests/test-bundle.out b/tests/test-bundle.out --- a/tests/test-bundle.out +++ b/tests/test-bundle.out @@ -8,6 +8,7 @@ checking files 4 files, 9 changesets, 7 total revisions ====== Bundle test to full.hg searching for changes +9 changesets found ====== Unbundle full.hg in test adding changesets adding manifests @@ -245,6 +246,8 @@ summary: 0.3m ====== Outgoing -R does-not-exist.hg vs partial2 in partial abort: No such file or directory: ../does-not-exist.hg ====== Unbundle incremental bundles into fresh empty in one go +1 changesets found +1 changesets found adding changesets adding manifests adding file changes @@ -257,6 +260,7 @@ 1 files updated, 0 files merged, 0 files ====== test for 540d1059c802 1 files updated, 0 files merged, 0 files removed, 0 files unresolved searching for changes +1 changesets found comparing with ../bundle.hg searching for changes changeset: 2:ed1b79f46b9a diff --git a/tests/test-mq-pull-from-bundle.out b/tests/test-mq-pull-from-bundle.out --- a/tests/test-mq-pull-from-bundle.out +++ b/tests/test-mq-pull-from-bundle.out @@ -15,6 +15,7 @@ incoming = --template "{rev}: {desc}\n" ====== Setup main adding one ====== Bundle main +2 changesets found ====== Incoming to fresh repo >> hg -R fresh incoming main.hg comparing with main.hg @@ -28,6 +29,7 @@ 1: main: one updated. adding two Patch queue now empty ====== Bundle queue +1 changesets found ====== Clone base 1 files updated, 0 files merged, 0 files removed, 0 files unresolved ====== Incoming queue bundle diff --git a/tests/test-patchbomb.out b/tests/test-patchbomb.out --- a/tests/test-patchbomb.out +++ b/tests/test-patchbomb.out @@ -110,6 +110,7 @@ Writing [PATCH 2 of 2] b ... adding c % test bundle and description searching for changes +1 changesets found Displaying test ... Content-Type: multipart/mixed; boundary="=== diff --git a/tests/test-record.out b/tests/test-record.out --- a/tests/test-record.out +++ b/tests/test-record.out @@ -105,6 +105,7 @@ summary: delete % add binary file +1 changesets found diff --git a/tip.bundle b/tip.bundle new file mode 100644 this is a binary file @@ -119,6 +120,7 @@ diff -r a2546574bce9 -r 9e998a545a8b tip Binary file tip.bundle has changed % change binary file +1 changesets found diff --git a/tip.bundle b/tip.bundle this modifies a binary file (all or nothing) examine changes to 'tip.bundle'? [Ynsfdaq?] @@ -132,6 +134,7 @@ diff -r 9e998a545a8b -r 93d05561507d tip Binary file tip.bundle has changed % rename and change binary file +1 changesets found diff --git a/tip.bundle b/top.bundle rename from tip.bundle rename to top.bundle