##// END OF EJS Templates
update: show the commit to which we updated in case of multiple heads (BC)...
update: show the commit to which we updated in case of multiple heads (BC) Currently when we have multiple heads on the same branch, update tells us that there some more heads for the current branch but does not tells us the head to which the repository has been updated to. It makes more sense showing the head we updated to and then telling there are some more heads.

File last commit:

r28072:c3e9269d default
r32698:1b5c61d3 default
Show More
test-contrib.t
276 lines | 5.9 KiB | text/troff | Tads3Lexer
Augie Fackler
Move test-dumprevlog to test-contrib in anticipation of more contrib tests
r14031 Set vars:
Thomas Arendsen Hein
tests: make tests work if directory contains special characters...
r16350 $ CONTRIBDIR="$TESTDIR/../contrib"
Augie Fackler
Move test-dumprevlog to test-contrib in anticipation of more contrib tests
r14031
Prepare repo-a:
$ hg init repo-a
$ cd repo-a
$ echo this is file a > a
$ hg add a
$ hg commit -m first
$ echo adding to file a >> a
$ hg commit -m second
$ echo adding more to file a >> a
$ hg commit -m third
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 3 changesets, 3 total revisions
Dumping revlog of file a to stdout:
Thomas Arendsen Hein
tests: make tests work if directory contains special characters...
r16350 $ python "$CONTRIBDIR/dumprevlog" .hg/store/data/a.i
Augie Fackler
Move test-dumprevlog to test-contrib in anticipation of more contrib tests
r14031 file: .hg/store/data/a.i
node: 183d2312b35066fb6b3b449b84efc370d50993d0
linkrev: 0
parents: 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
length: 15
-start-
this is file a
-end-
node: b1047953b6e6b633c0d8197eaa5116fbdfd3095b
linkrev: 1
parents: 183d2312b35066fb6b3b449b84efc370d50993d0 0000000000000000000000000000000000000000
length: 32
-start-
this is file a
adding to file a
-end-
node: 8c4fd1f7129b8cdec6c7f58bf48fb5237a4030c1
linkrev: 2
parents: b1047953b6e6b633c0d8197eaa5116fbdfd3095b 0000000000000000000000000000000000000000
length: 54
-start-
this is file a
adding to file a
adding more to file a
-end-
Dump all revlogs to file repo.dump:
Thomas Arendsen Hein
tests: make tests work if directory contains special characters...
r16350 $ find .hg/store -name "*.i" | sort | xargs python "$CONTRIBDIR/dumprevlog" > ../repo.dump
Augie Fackler
Move test-dumprevlog to test-contrib in anticipation of more contrib tests
r14031 $ cd ..
Undumping into repo-b:
$ hg init repo-b
$ cd repo-b
Thomas Arendsen Hein
tests: make tests work if directory contains special characters...
r16350 $ python "$CONTRIBDIR/undumprevlog" < ../repo.dump
Augie Fackler
Move test-dumprevlog to test-contrib in anticipation of more contrib tests
r14031 .hg/store/00changelog.i
.hg/store/00manifest.i
.hg/store/data/a.i
$ cd ..
Rebuild fncache with clone --pull:
$ hg clone --pull -U repo-b repo-c
requesting all changes
adding changesets
adding manifests
adding file changes
added 3 changesets with 3 changes to 1 files
Verify:
$ hg -R repo-c verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 3 changesets, 3 total revisions
Compare repos:
$ hg -R repo-c incoming repo-a
comparing with repo-a
searching for changes
no changes found
[1]
$ hg -R repo-a incoming repo-c
comparing with repo-c
searching for changes
no changes found
[1]
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 Test simplemerge command:
$ cp "$CONTRIBDIR/simplemerge" .
$ echo base > base
$ echo local > local
$ cat base >> local
$ cp local orig
$ cat base > other
$ echo other >> other
changing local directly
$ python simplemerge local base other && echo "merge succeeded"
merge succeeded
$ cat local
local
base
other
$ cp orig local
printing to stdout
$ python simplemerge -p local base other
local
base
other
local:
$ cat local
local
base
conflicts
$ cp base conflict-local
$ cp other conflict-other
$ echo not other >> conflict-local
$ echo end >> conflict-local
$ echo end >> conflict-other
Pierre-Yves David
simplemerge: burn "minimal" feature to the ground...
r22023
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 $ python simplemerge -p conflict-local base conflict-other
base
<<<<<<< conflict-local
not other
=======
other
Ryan McElroy
merge: minimize conflicts when common base is not shown (issue4447)...
r28072 >>>>>>> conflict-other
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 end
[1]
1 label
$ python simplemerge -p -L foo conflict-local base conflict-other
base
<<<<<<< foo
not other
=======
other
Ryan McElroy
merge: minimize conflicts when common base is not shown (issue4447)...
r28072 >>>>>>> conflict-other
Pierre-Yves David
simplemerge: burn "minimal" feature to the ground...
r22023 end
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 [1]
2 labels
$ python simplemerge -p -L foo -L bar conflict-local base conflict-other
base
<<<<<<< foo
not other
=======
other
Ryan McElroy
merge: minimize conflicts when common base is not shown (issue4447)...
r28072 >>>>>>> bar
Pierre-Yves David
simplemerge: burn "minimal" feature to the ground...
r22023 end
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 [1]
Pierre-Yves David
simplemerge: support three labels when merging...
r22024 3 labels
$ python simplemerge -p -L foo -L bar -L base conflict-local base conflict-other
base
<<<<<<< foo
not other
end
||||||| base
=======
other
end
>>>>>>> bar
[1]
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 too many labels
Pierre-Yves David
simplemerge: support three labels when merging...
r22024 $ python simplemerge -p -L foo -L bar -L baz -L buz conflict-local base conflict-other
abort: can only specify three labels.
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 [255]
binary file
Augie Fackler
tests: use $PYTHON instead of hardcoding python...
r22947 $ $PYTHON -c "f = file('binary-local', 'w'); f.write('\x00'); f.close()"
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 $ cat orig >> binary-local
$ python simplemerge -p binary-local base other
Sune Foldager
fix test broken in merge from stable
r14330 warning: binary-local looks like a binary file.
[1]
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032
binary file --text
$ python simplemerge -a -p binary-local base other 2>&1
warning: binary-local looks like a binary file.
\x00local (esc)
base
other
help
$ python simplemerge --help
simplemerge [OPTS] LOCAL BASE OTHER
Simple three-way file merge utility with a minimal feature set.
Apply to LOCAL the changes necessary to go from BASE to OTHER.
By default, LOCAL is overwritten with the results of this operation.
options:
-L --label labels to use on conflict markers
-a --text treat all files as text
-p --print print results instead of overwriting LOCAL
Pierre-Yves David
simplemerge: burn "minimal" feature to the ground...
r22023 --no-minimal no effect (DEPRECATED)
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 -h --help display help and exit
-q --quiet suppress output
wrong number of arguments
$ python simplemerge
simplemerge: wrong number of arguments
simplemerge [OPTS] LOCAL BASE OTHER
Simple three-way file merge utility with a minimal feature set.
Apply to LOCAL the changes necessary to go from BASE to OTHER.
By default, LOCAL is overwritten with the results of this operation.
options:
-L --label labels to use on conflict markers
-a --text treat all files as text
-p --print print results instead of overwriting LOCAL
Pierre-Yves David
simplemerge: burn "minimal" feature to the ground...
r22023 --no-minimal no effect (DEPRECATED)
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 -h --help display help and exit
-q --quiet suppress output
[1]
bad option
$ python simplemerge --foo -p local base other
simplemerge: option --foo not recognized
simplemerge [OPTS] LOCAL BASE OTHER
Simple three-way file merge utility with a minimal feature set.
Apply to LOCAL the changes necessary to go from BASE to OTHER.
By default, LOCAL is overwritten with the results of this operation.
options:
-L --label labels to use on conflict markers
-a --text treat all files as text
-p --print print results instead of overwriting LOCAL
Pierre-Yves David
simplemerge: burn "minimal" feature to the ground...
r22023 --no-minimal no effect (DEPRECATED)
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 -h --help display help and exit
-q --quiet suppress output
[1]