##// END OF EJS Templates
convert: add a mode where mercurial_sink skips empty revisions....
convert: add a mode where mercurial_sink skips empty revisions. The getchanges function of some converter_source classes can return some false positives. I.e. they sometimes claim that a file "foo" was changed in some revision, even though its contents are still the same. convert_svn is particularly bad, but I think this can also happen with convert_cvs and, at least in theory, with mercurial_source. For regular conversions this is not really a problem - as long as getfile returns the right contents, we'll get a converted revision with the right contents. But when we use --filemap, this could lead to superfluous revisions being converted. Instead of fixing every converter_source, I decided to change mercurial_sink to work around this problem. When --filemap is used, we're interested only in revisions that touch some specific files. If a revision doesn't change any of these files, then we're not interested in it (at least for revisions with a single parent; merges are special). For mercurial_sink, we abuse this property and rollback a commit if the manifest text hasn't changed. This avoids duplicating the logic from localrepo.filecommit to detect unchanged files.

File last commit:

r4387:93a4e72b default
r5378:8a2915f5 default
Show More
test-merge7
66 lines | 853 B | text/plain | TextLexer
Matt Mackall
Repair ancestor logic, fix up test cases
r1351 #!/bin/sh
# initial
hg init test-a
cd test-a
cat >test.txt <<"EOF"
1
2
3
EOF
hg add test.txt
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "Initial" -d "1000000 0"
Matt Mackall
Repair ancestor logic, fix up test cases
r1351
# clone
cd ..
hg clone test-a test-b
# change test-a
cd test-a
cat >test.txt <<"EOF"
one
two
three
EOF
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "Numbers as words" -d "1000000 0"
Matt Mackall
Repair ancestor logic, fix up test cases
r1351
# change test-b
cd ../test-b
cat >test.txt <<"EOF"
1
2.5
3
EOF
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "2 -> 2.5" -d "1000000 0"
Matt Mackall
Repair ancestor logic, fix up test cases
r1351
# now pull and merge from test-a
Matt Mackall
Make test-merge7 repeatable
r1352 hg pull ../test-a
Alexis S. L. Carvalho
change tests to use simplemerge by default
r4365 hg merge
Matt Mackall
Repair ancestor logic, fix up test cases
r1351 # resolve conflict
cat >test.txt <<"EOF"
one
two-point-five
three
EOF
rm -f *.orig
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "Merge 1" -d "1000000 0"
Matt Mackall
Repair ancestor logic, fix up test cases
r1351
# change test-a again
cd ../test-a
cat >test.txt <<"EOF"
one
two-point-one
three
EOF
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "two -> two-point-one" -d "1000000 0"
Matt Mackall
Repair ancestor logic, fix up test cases
r1351
# pull and merge from test-a again
cd ../test-b
Matt Mackall
Make test-merge7 repeatable
r1352 hg pull ../test-a
Alexis S. L. Carvalho
change tests to use simplemerge by default
r4365 hg merge --debug
Matt Mackall
Repair ancestor logic, fix up test cases
r1351
Alexis S. L. Carvalho
run-tests.py: pass -L/--label to simplemerge...
r4387 cat test.txt
Matt Mackall
Repair ancestor logic, fix up test cases
r1351
Benoit Boissinot
switch to the .hg/store layout, fix the tests
r3853 hg debugindex .hg/store/data/test.txt.i
Matt Mackall
Repair ancestor logic, fix up test cases
r1351
hg log