##// END OF EJS Templates
copies: add config option for writing copy metadata to file and/or changset...
copies: add config option for writing copy metadata to file and/or changset This introduces a config option that lets you choose to write copy metadata to the changeset extras instead of to filelog. There's also an option to write it to both places. I imagine that may possibly be useful when transitioning an existing repo. The copy metadata is stored as two fields in extras: one for copies since p1 and one for copies since p2. I may need to add more information later in order to make copy tracing faster. Specifically, I'm thinking out recording which files were added or removed so that copies._chaincopies() doesn't have to look at the manifest for that. But that would just be an optimization and that can be added once we know if it's necessary. I have also considered saving space by using replacing the destination file path by an index into the "files" list, but that can also be changed later (but before the feature is ready to release). Differential Revision: https://phab.mercurial-scm.org/D6183

File last commit:

r39525:f1186c29 default
r42317:0e41f40b default
Show More
test-obsolete-changeset-exchange.t
182 lines | 5.8 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)
Durham Goode
obsolete: update tests to use obsolete options...
r22955 $ cat >> $HGRCPATH << EOF
> [experimental]
Boris Feld
config: use 'experimental.evolution.create-markers'...
r34867 > evolution.createmarkers=True
Pierre-Yves David
obsolete: introduce an `_enabled` switch to disable the feature by default...
r17296 > EOF
Pierre-Yves David
test: fix typo in test comment
r17327 Push does not corrupt remote
----------------------------
Patrick Mezard
discovery: add extinct changesets to outgoing.excluded...
r17248
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
Boris Feld
debugobsolete: also report the number of obsoleted changesets...
r33542 obsoleted 1 changesets
Patrick Mezard
discovery: add extinct changesets to outgoing.excluded...
r17248
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
Meirambek Omyrzak
verify: make output less confusing (issue5924)...
r39525 checked 2 changesets with 2 changes to 2 files
Pierre-Yves David
pull: fix crash when pulling changeset that get hidden locally (issue3788)...
r18498
Adding a changeset going extinct locally
------------------------------------------
Pull a changeset that will immediatly goes extinct (because you already have a
marker to obsolete him)
(test resolution of issue3788)
$ hg phase --draft --force f89bcc95eba5
$ hg phase -R ../other --draft --force f89bcc95eba5
$ hg commit --amend -m "A''"
$ hg --hidden --config extensions.mq= strip --no-backup f89bcc95eba5
$ hg pull ../other
pulling from ../other
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 0 changes to 1 files (+1 heads)
Martin von Zweigbergk
evolution: report new unstable changesets...
r35727 1 new phase-divergent changesets
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets f89bcc95eba5
Pierre-Yves David
pull: fix crash when pulling changeset that get hidden locally (issue3788)...
r18498 (run 'hg heads' to see heads, 'hg merge' to merge)
Pierre-Yves David
test-obsolete: validate that bundle is not affected by issue3788...
r18499
check that bundle is not affected
$ hg bundle --hidden --rev f89bcc95eba5 --base "f89bcc95eba5^" ../f89bcc95eba5.hg
1 changesets found
$ hg --hidden --config extensions.mq= strip --no-backup f89bcc95eba5
$ hg unbundle ../f89bcc95eba5.hg
adding changesets
adding manifests
adding file changes
added 1 changesets with 0 changes to 1 files (+1 heads)
Boris Feld
pullreport: issue a message about "extinct" pulled changesets...
r39935 (1 other changesets obsolete on arrival)
Pierre-Yves David
test-obsolete: validate that bundle is not affected by issue3788...
r18499 (run 'hg heads' to see heads)
bundle: add an experimental knob to include obsmarkers in bundle...
r32516
check-that bundle can contain markers:
Boris Feld
config: rename stabilization.bundle-obsmarker...
r34870 $ hg bundle --hidden --rev f89bcc95eba5 --base "f89bcc95eba5^" ../f89bcc95eba5-obs.hg --config experimental.evolution.bundle-obsmarker=1
bundle: add an experimental knob to include obsmarkers in bundle...
r32516 1 changesets found
$ hg debugbundle ../f89bcc95eba5.hg
Augie Fackler
debugcommands: stabilize output of debugbundle by having a custom repr...
r34027 Stream params: {Compression: BZ}
Boris Feld
debugbundle: also display if a part is mandatory or advisory...
r37919 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
bundle: add an experimental knob to include obsmarkers in bundle...
r32516 f89bcc95eba5174b1ccc3e33a82e84c96e8338ee
Boris Feld
bundle2: mark the bundle2 part as advisory (issue5872)...
r37920 cache:rev-branch-cache -- {} (mandatory: False)
bundle: add an experimental knob to include obsmarkers in bundle...
r32516 $ hg debugbundle ../f89bcc95eba5-obs.hg
Augie Fackler
debugcommands: stabilize output of debugbundle by having a custom repr...
r34027 Stream params: {Compression: BZ}
Boris Feld
debugbundle: also display if a part is mandatory or advisory...
r37919 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
bundle: add an experimental knob to include obsmarkers in bundle...
r32516 f89bcc95eba5174b1ccc3e33a82e84c96e8338ee
Boris Feld
bundle2: mark the bundle2 part as advisory (issue5872)...
r37920 cache:rev-branch-cache -- {} (mandatory: False)
Boris Feld
debugbundle: also display if a part is mandatory or advisory...
r37919 obsmarkers -- {} (mandatory: True)
debugbundle: display the content of obsmarkers parts...
r32517 version: 1 (70 bytes)
9d73aac1b2ed7d53835eaeec212ed41ea47da53a f89bcc95eba5174b1ccc3e33a82e84c96e8338ee 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
bundle: add an experimental knob to include obsmarkers in bundle...
r32516
Gregory Szorc
tests: test changegroup generation for filtered changesets (issue4982)...
r27227 $ cd ..
pull does not fetch excessive changesets when common node is hidden (issue4982)
-------------------------------------------------------------------------------
initial repo with server and client matching
$ hg init pull-hidden-common
$ cd pull-hidden-common
$ touch foo
$ hg -q commit -A -m initial
$ echo 1 > foo
$ hg commit -m 1
$ echo 2a > foo
$ hg commit -m 2a
$ cd ..
$ hg clone --pull pull-hidden-common pull-hidden-common-client
requesting all changes
adding changesets
adding manifests
adding file changes
added 3 changesets with 3 changes to 1 files
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets 96ee1d7354c4:6a29ed9c68de
Gregory Szorc
tests: test changegroup generation for filtered changesets (issue4982)...
r27227 updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
server obsoletes the old head
$ cd pull-hidden-common
$ hg -q up -r 1
$ echo 2b > foo
$ hg -q commit -m 2b
$ hg debugobsolete 6a29ed9c68defff1a139e5c6fa9696fb1a75783d bec0734cd68e84477ba7fc1d13e6cff53ab70129
Boris Feld
debugobsolete: also report the number of obsoleted changesets...
r33542 obsoleted 1 changesets
Gregory Szorc
tests: test changegroup generation for filtered changesets (issue4982)...
r27227 $ cd ..
client only pulls down 1 changeset
$ cd pull-hidden-common-client
$ hg pull --debug
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 pulling from $TESTTMP/pull-hidden-common
Gregory Szorc
tests: test changegroup generation for filtered changesets (issue4982)...
r27227 query 1; heads
searching for changes
Pierre-Yves David
discovery: properly filter changeset in 'peer.known' (issue4982)...
r27319 taking quick initial sample
query 2; still undecided: 2, sample size is: 2
discovery: include timing in the debug output...
r32712 2 total queries in *.????s (glob)
Pierre-Yves David
discovery: properly filter changeset in 'peer.known' (issue4982)...
r27319 1 changesets found
Gregory Szorc
tests: test changegroup generation for filtered changesets (issue4982)...
r27227 list of changesets:
bec0734cd68e84477ba7fc1d13e6cff53ab70129
listing keys for "bookmarks"
Boris Feld
revbranchcache: advertise and use 'rbc' exchange capability...
r36986 bundle2-output-bundle: "HG20", 4 parts total
Gregory Szorc
tests: test changegroup generation for filtered changesets (issue4982)...
r27227 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload
Boris Feld
pull: use 'phase-heads' to retrieve phase information...
r34323 bundle2-output-part: "phase-heads" 24 bytes payload
Boris Feld
bundle2: mark the bundle2 part as advisory (issue5872)...
r37920 bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload
Gregory Szorc
tests: test changegroup generation for filtered changesets (issue4982)...
r27227 bundle2-input-bundle: with-transaction
bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
adding changesets
add changeset bec0734cd68e
adding manifests
adding file changes
adding foo revisions
added 1 changesets with 1 changes to 1 files (+1 heads)
Pierre-Yves David
changegroup: skip delta when the underlying revlog do not use them...
r30211 bundle2-input-part: total payload size 476
Gregory Szorc
tests: test changegroup generation for filtered changesets (issue4982)...
r27227 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
Boris Feld
pull: use 'phase-heads' to retrieve phase information...
r34323 bundle2-input-part: "phase-heads" supported
bundle2-input-part: total payload size 24
Boris Feld
bundle2: mark the bundle2 part as advisory (issue5872)...
r37920 bundle2-input-part: "cache:rev-branch-cache" (advisory) supported
Boris Feld
revbranchcache: advertise and use 'rbc' exchange capability...
r36986 bundle2-input-part: total payload size 39
bundle2-input-bundle: 3 parts total
Gregory Szorc
tests: test changegroup generation for filtered changesets (issue4982)...
r27227 checking for updated bookmarks
Martin von Zweigbergk
localrepo: run cache-warming transaction callback before report callback...
r35767 updating the branch cache
Denis Laxalde
transaction-summary: show the range of new revisions upon pull/unbundle (BC)...
r34662 new changesets bec0734cd68e
Gregory Szorc
tests: test changegroup generation for filtered changesets (issue4982)...
r27227 (run 'hg heads' to see heads, 'hg merge' to merge)