##// 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-strip-cross.t
143 lines | 4.4 KiB | text/troff | Tads3Lexer
/ tests / test-strip-cross.t
Matt Mackall
tests: unify test-strip-cross
r12492 test stripping of filelogs where the linkrev doesn't always increase
$ echo '[extensions]' >> $HGRCPATH
Martin Geisler
tests: don't load unnecessary graphlog extension...
r20117 $ echo 'strip =' >> $HGRCPATH
Matt Mackall
tests: unify test-strip-cross
r12492 $ hg init orig
$ cd orig
$ commit()
> {
> hg up -qC null
> count=1
> for i in "$@"; do
Adrian Buehlmann
tests: fix tabs/indentation in test-strip-cross.t
r12537 > for f in $i; do
> echo $count > $f
> done
> count=`expr $count + 1`
Matt Mackall
tests: unify test-strip-cross
r12492 > done
> hg commit -qAm "$*"
> }
2 1 0 2 0 1 2
$ commit '201 210'
$ commit '102 120' '210'
$ commit '021'
$ commit '201' '021 120'
$ commit '012 021' '102 201' '120 210'
$ commit 'manifest-file'
$ commit '102 120' '012 210' '021 201'
$ commit '201 210' '021 120' '012 102'
$ HGUSER=another-user; export HGUSER
$ commit 'manifest-file'
$ commit '012' 'manifest-file'
$ cd ..
$ hg clone -q -U -r -1 -r -2 -r -3 -r -4 -r -6 orig crossed
Sune Foldager
tests: fix deprecated use of hg debugdata/debugindex...
r14182 $ cd crossed
Sune Foldager
debugindex etc.: add --changelog and --manifest options...
r14323 $ hg debugindex --manifest
Gregory Szorc
debugcommands: drop offset and length from debugindex by default...
r37301 rev linkrev nodeid p1 p2
0 0 6f105cbb914d 000000000000 000000000000
1 3 1b55917b3699 000000000000 000000000000
2 1 8f3d04e263e5 000000000000 000000000000
3 2 f0ef8726ac4f 000000000000 000000000000
4 4 0b76e38b4070 000000000000 000000000000
Sune Foldager
tests: fix deprecated use of hg debugdata/debugindex...
r14182
$ for i in 012 021 102 120 201 210 manifest-file; do
> echo $i
> hg debugindex $i
> echo
> done
012
Gregory Szorc
debugcommands: drop offset and length from debugindex by default...
r37301 rev linkrev nodeid p1 p2
0 0 b8e02f643373 000000000000 000000000000
1 1 5d9299349fc0 000000000000 000000000000
2 2 2661d26c6496 000000000000 000000000000
Matt Mackall
tests: unify test-strip-cross
r12492
Sune Foldager
tests: fix deprecated use of hg debugdata/debugindex...
r14182 021
Gregory Szorc
debugcommands: drop offset and length from debugindex by default...
r37301 rev linkrev nodeid p1 p2
0 0 b8e02f643373 000000000000 000000000000
1 2 5d9299349fc0 000000000000 000000000000
2 1 2661d26c6496 000000000000 000000000000
Matt Mackall
tests: unify test-strip-cross
r12492
Sune Foldager
tests: fix deprecated use of hg debugdata/debugindex...
r14182 102
Gregory Szorc
debugcommands: drop offset and length from debugindex by default...
r37301 rev linkrev nodeid p1 p2
0 1 b8e02f643373 000000000000 000000000000
1 0 5d9299349fc0 000000000000 000000000000
2 2 2661d26c6496 000000000000 000000000000
Matt Mackall
tests: unify test-strip-cross
r12492
Sune Foldager
tests: fix deprecated use of hg debugdata/debugindex...
r14182 120
Gregory Szorc
debugcommands: drop offset and length from debugindex by default...
r37301 rev linkrev nodeid p1 p2
0 1 b8e02f643373 000000000000 000000000000
1 2 5d9299349fc0 000000000000 000000000000
2 0 2661d26c6496 000000000000 000000000000
Matt Mackall
tests: unify test-strip-cross
r12492
Sune Foldager
tests: fix deprecated use of hg debugdata/debugindex...
r14182 201
Gregory Szorc
debugcommands: drop offset and length from debugindex by default...
r37301 rev linkrev nodeid p1 p2
0 2 b8e02f643373 000000000000 000000000000
1 0 5d9299349fc0 000000000000 000000000000
2 1 2661d26c6496 000000000000 000000000000
Matt Mackall
tests: unify test-strip-cross
r12492
Sune Foldager
tests: fix deprecated use of hg debugdata/debugindex...
r14182 210
Gregory Szorc
debugcommands: drop offset and length from debugindex by default...
r37301 rev linkrev nodeid p1 p2
0 2 b8e02f643373 000000000000 000000000000
1 1 5d9299349fc0 000000000000 000000000000
2 0 2661d26c6496 000000000000 000000000000
Matt Mackall
tests: unify test-strip-cross
r12492
Sune Foldager
tests: fix deprecated use of hg debugdata/debugindex...
r14182 manifest-file
Gregory Szorc
debugcommands: drop offset and length from debugindex by default...
r37301 rev linkrev nodeid p1 p2
0 3 b8e02f643373 000000000000 000000000000
1 4 5d9299349fc0 000000000000 000000000000
Matt Mackall
tests: unify test-strip-cross
r12492
Sune Foldager
tests: fix deprecated use of hg debugdata/debugindex...
r14182 $ cd ..
Matt Mackall
tests: unify test-strip-cross
r12492 $ for i in 0 1 2 3 4; do
> hg clone -q -U --pull crossed $i
> echo "% Trying to strip revision $i"
Mads Kiilerich
tests: remove redundant globs...
r12640 > hg --cwd $i strip $i
Matt Mackall
tests: unify test-strip-cross
r12492 > echo "% Verifying"
> hg --cwd $i verify
> echo
> done
% Trying to strip revision 0
Mads Kiilerich
tests: remove redundant globs...
r12640 saved backup bundle to $TESTTMP/0/.hg/strip-backup/*-backup.hg (glob)
Matt Mackall
tests: unify test-strip-cross
r12492 % Verifying
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
Meirambek Omyrzak
verify: make output less confusing (issue5924)...
r39525 checked 4 changesets with 15 changes to 7 files
Matt Mackall
tests: unify test-strip-cross
r12492
% Trying to strip revision 1
Mads Kiilerich
tests: remove redundant globs...
r12640 saved backup bundle to $TESTTMP/1/.hg/strip-backup/*-backup.hg (glob)
Matt Mackall
tests: unify test-strip-cross
r12492 % Verifying
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
Meirambek Omyrzak
verify: make output less confusing (issue5924)...
r39525 checked 4 changesets with 14 changes to 7 files
Matt Mackall
tests: unify test-strip-cross
r12492
% Trying to strip revision 2
Mads Kiilerich
tests: remove redundant globs...
r12640 saved backup bundle to $TESTTMP/2/.hg/strip-backup/*-backup.hg (glob)
Matt Mackall
tests: unify test-strip-cross
r12492 % Verifying
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
Meirambek Omyrzak
verify: make output less confusing (issue5924)...
r39525 checked 4 changesets with 14 changes to 7 files
Matt Mackall
tests: unify test-strip-cross
r12492
% Trying to strip revision 3
Mads Kiilerich
tests: remove redundant globs...
r12640 saved backup bundle to $TESTTMP/3/.hg/strip-backup/*-backup.hg (glob)
Matt Mackall
tests: unify test-strip-cross
r12492 % Verifying
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
Meirambek Omyrzak
verify: make output less confusing (issue5924)...
r39525 checked 4 changesets with 19 changes to 7 files
Matt Mackall
tests: unify test-strip-cross
r12492
% Trying to strip revision 4
Mads Kiilerich
tests: remove redundant globs...
r12640 saved backup bundle to $TESTTMP/4/.hg/strip-backup/*-backup.hg (glob)
Matt Mackall
tests: unify test-strip-cross
r12492 % Verifying
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
Meirambek Omyrzak
verify: make output less confusing (issue5924)...
r39525 checked 4 changesets with 19 changes to 7 files
Matt Mackall
tests: unify test-strip-cross
r12492