##// 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:

r8167:6c82beaa default
r10189:e451e599 default
Show More
test-issue522
31 lines | 632 B | text/plain | TextLexer
Alexis S. L. Carvalho
merge: forcefully mark files that we get from the second parent as dirty...
r5210 #!/bin/sh
# In the merge below, the file "foo" has the same contents in both
# parents, but if we look at the file-level history, we'll notice that
# the version in p1 is an ancestor of the version in p2. This test
# makes sure that we'll use the version from p2 in the manifest of the
# merge revision.
hg init repo
cd repo
echo foo > foo
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -qAm 'add foo'
Alexis S. L. Carvalho
merge: forcefully mark files that we get from the second parent as dirty...
r5210
echo bar >> foo
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -m 'change foo'
Alexis S. L. Carvalho
merge: forcefully mark files that we get from the second parent as dirty...
r5210
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg backout -r tip -m 'backout changed foo'
Alexis S. L. Carvalho
merge: forcefully mark files that we get from the second parent as dirty...
r5210
hg up -C 0
touch bar
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -qAm 'add bar'
Alexis S. L. Carvalho
merge: forcefully mark files that we get from the second parent as dirty...
r5210
hg merge --debug
hg debugstate | grep foo
hg st -A foo
Martin Geisler
tests: removed redundant "-d '0 0'" from test scripts...
r8167 hg ci -m 'merge'
Alexis S. L. Carvalho
merge: forcefully mark files that we get from the second parent as dirty...
r5210
hg manifest --debug | grep foo
hg debugindex .hg/store/data/foo.i