##// END OF EJS Templates
discovery: add extinct changesets to outgoing.excluded...
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

File last commit:

r17248:6ffb35b2 stable
r17248:6ffb35b2 stable
Show More
test-obsolete-changeset-exchange.t
48 lines | 1.2 KiB | text/troff | Tads3Lexer
/ tests / test-obsolete-changeset-exchange.t
Patrick Mezard
discovery: add extinct changesets to outgoing.excluded...
r17248 Test changesets filtering during exchanges (some tests are still in
test-obsolete.t)
Push does corrupt remote
------------------------
Create a DAG where a changeset reuses a revision from a file first used in an
extinct changeset.
$ hg init local
$ cd local
$ echo 'base' > base
$ hg commit -Am base
adding base
$ echo 'A' > A
$ hg commit -Am A
adding A
$ hg up 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg revert -ar 1
adding A
$ hg commit -Am "A'"
created new head
$ hg log -G --template='{desc} {node}'
@ A' f89bcc95eba5174b1ccc3e33a82e84c96e8338ee
|
| o A 9d73aac1b2ed7d53835eaeec212ed41ea47da53a
|/
o base d20a80d4def38df63a4b330b7fb688f3d4cae1e3
$ hg debugobsolete 9d73aac1b2ed7d53835eaeec212ed41ea47da53a f89bcc95eba5174b1ccc3e33a82e84c96e8338ee
Push it. The bundle should not refer to the extinct changeset.
$ hg init ../other
$ hg push ../other
pushing to ../other
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 2 files
$ hg -R ../other verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
2 files, 2 changesets, 2 total revisions