##// END OF EJS Templates
patch: support diff data loss detection and upgrade...
patch: support diff data loss detection and upgrade In worst case, generating diff in upgrade mode can be two times more expensive than generating it in git mode directly: we may have to regenerate the whole diff again whenever a git feature is detected. Also, the first diff attempt is completely buffered instead of being streamed. That said, even without having profiled it yet, I am convinced we can fast-path the upgrade mode if necessary were it to be used in regular diff commands, and not only in mq where avoiding data loss is worth the price.

File last commit:

r8834:6d36fc70 default
r10189:e451e599 default
Show More
test-merge1
112 lines | 2.0 KiB | text/plain | TextLexer
Thomas Arendsen Hein
Don't use 'set -x', fix exports, sed and hexdump usage for Solaris.
r800 #!/bin/sh
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407
Alexis S. L. Carvalho
test-merge1: avoid a shell script
r4294 cat <<EOF > merge
import sys, os
Patrick Mezard
tests: Windows compatibility fixes...
r7080
try:
import msvcrt
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
except ImportError:
pass
Alexis S. L. Carvalho
test-merge1: avoid a shell script
r4294 print "merging for", os.path.basename(sys.argv[1])
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 EOF
Alexis S. L. Carvalho
test-merge1: avoid a shell script
r4294 HGMERGE="python ../merge"; export HGMERGE
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407
mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #0" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 echo This is file b1 > b
hg add b
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #1" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407
hg update 0
echo This is file c1 > c
hg add c
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #2" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 echo This is file b1 > b
mpm@selenic.com
Fix bug with co -C across branches, update tests
r1236 echo %% no merges expected
Dirkjan Ochtman
merge: rename -S/--show option to -P/--preview
r8834 hg merge -P 1
Alexis S. L. Carvalho
test-merge1: avoid a shell script
r4294 hg merge 1
Benoit Boissinot
fix traceback of extdiff after a merge...
r3330 hg diff --nodates
hg status
Thomas Arendsen Hein
Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm.
r3988 cd ..; rm -r t
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407
mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #0" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 echo This is file b1 > b
hg add b
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #1" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407
hg update 0
echo This is file c1 > c
hg add c
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #2" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 echo This is file b2 > b
Benoit Boissinot
abort when merging two heads and repository has local changes
r1581 echo %% merge should fail
Alexis S. L. Carvalho
test-merge1: avoid a shell script
r4294 hg merge 1
mpm@selenic.com
Fix bug with co -C across branches, update tests
r1236 echo %% merge of b expected
Alexis S. L. Carvalho
test-merge1: avoid a shell script
r4294 hg merge -f 1
Benoit Boissinot
fix traceback of extdiff after a merge...
r3330 hg diff --nodates
hg status
Thomas Arendsen Hein
Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm.
r3988 cd ..; rm -r t
mpm@selenic.com
Fix bug with co -C across branches, update tests
r1236 echo %%
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407
mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #0" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 echo This is file b1 > b
hg add b
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #1" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 echo This is file b22 > b
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #2" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 hg update 1
echo This is file c1 > c
hg add c
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #3" -d "1000000 0"
mpm@selenic.com
Fix bug with co -C across branches, update tests
r1236
echo 'Contents of b should be "this is file b1"'
mpm@selenic.com
Fix up test-merge1...
r430 cat b
mpm@selenic.com
Fix bug with co -C across branches, update tests
r1236
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 echo This is file b22 > b
Benoit Boissinot
abort when merging two heads and repository has local changes
r1581 echo %% merge fails
Alexis S. L. Carvalho
test-merge1: avoid a shell script
r4294 hg merge 2
mpm@selenic.com
Fix bug with co -C across branches, update tests
r1236 echo %% merge expected!
Alexis S. L. Carvalho
test-merge1: avoid a shell script
r4294 hg merge -f 2
Benoit Boissinot
fix traceback of extdiff after a merge...
r3330 hg diff --nodates
hg status
Thomas Arendsen Hein
Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm.
r3988 cd ..; rm -r t
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407
mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #0" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 echo This is file b1 > b
hg add b
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #1" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 echo This is file b22 > b
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #2" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 hg update 1
echo This is file c1 > c
hg add c
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "commit #3" -d "1000000 0"
mpm@selenic.com
[PATCH] Merging identical changes from another branch...
r407 echo This is file b33 > b
Benoit Boissinot
abort when merging two heads and repository has local changes
r1581 echo %% merge of b should fail
Alexis S. L. Carvalho
test-merge1: avoid a shell script
r4294 hg merge 2
Benoit Boissinot
abort when merging two heads and repository has local changes
r1581 echo %% merge of b expected
Alexis S. L. Carvalho
test-merge1: avoid a shell script
r4294 hg merge -f 2
Benoit Boissinot
fix traceback of extdiff after a merge...
r3330 hg diff --nodates
hg status