Mercurial > hg
comparison tests/test-obsolete-changeset-exchange.t @ 17248:6ffb35b2284c stable
discovery: add extinct changesets to outgoing.excluded
Before this change, push would incorrectly fast-path the bundle
generation when extinct changesets are involved, because they are not
added to outgoing.excluded. The reason to do so are related to
outgoing.excluded being assumed to contain only secret changesets by
scmutil.nochangesfound(), when displaying warnings like:
changes found (ignored 9 secret changesets)
Still, outgoing.excluded seems like a good API to report the extinct
changesets instead of dedicated code and nothing in the docstring
indicates it to be bound to secret changesets. This patch adds extinct
changesets to outgoing.excluded and fixes scmutil.nochangesfound() to
filter the excluded node list.
Original version and test by Pierre-Yves.David@ens-lyon.org
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Wed, 25 Jul 2012 19:34:31 +0200 |
parents | |
children | a1f8869f2eee |
comparison
equal
deleted
inserted
replaced
17247:6d51a0c71d4e | 17248:6ffb35b2284c |
---|---|
1 Test changesets filtering during exchanges (some tests are still in | |
2 test-obsolete.t) | |
3 | |
4 Push does corrupt remote | |
5 ------------------------ | |
6 | |
7 Create a DAG where a changeset reuses a revision from a file first used in an | |
8 extinct changeset. | |
9 | |
10 $ hg init local | |
11 $ cd local | |
12 $ echo 'base' > base | |
13 $ hg commit -Am base | |
14 adding base | |
15 $ echo 'A' > A | |
16 $ hg commit -Am A | |
17 adding A | |
18 $ hg up 0 | |
19 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
20 $ hg revert -ar 1 | |
21 adding A | |
22 $ hg commit -Am "A'" | |
23 created new head | |
24 $ hg log -G --template='{desc} {node}' | |
25 @ A' f89bcc95eba5174b1ccc3e33a82e84c96e8338ee | |
26 | | |
27 | o A 9d73aac1b2ed7d53835eaeec212ed41ea47da53a | |
28 |/ | |
29 o base d20a80d4def38df63a4b330b7fb688f3d4cae1e3 | |
30 | |
31 $ hg debugobsolete 9d73aac1b2ed7d53835eaeec212ed41ea47da53a f89bcc95eba5174b1ccc3e33a82e84c96e8338ee | |
32 | |
33 Push it. The bundle should not refer to the extinct changeset. | |
34 | |
35 $ hg init ../other | |
36 $ hg push ../other | |
37 pushing to ../other | |
38 searching for changes | |
39 adding changesets | |
40 adding manifests | |
41 adding file changes | |
42 added 2 changesets with 2 changes to 2 files | |
43 $ hg -R ../other verify | |
44 checking changesets | |
45 checking manifests | |
46 crosschecking files in changesets and manifests | |
47 checking files | |
48 2 files, 2 changesets, 2 total revisions |