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

r3311:96663230 default
r5378:8a2915f5 default
Show More
test-filebranch.out
72 lines | 2.9 KiB | text/plain | TextLexer
/ tests / test-filebranch.out
mpm@selenic.com
Fix long-standing excessive file merges...
r990 creating base
Thomas Arendsen Hein
Make hg update more verbose by default (issue12)...
r2175 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
mpm@selenic.com
Fix long-standing excessive file merges...
r990 creating branch a
creating branch b
we shouldn't have anything but n state here
n 644 2 bar
n 644 3 baz
n 644 3 foo
n 644 2 quux
merging
pulling from ../a
searching for changes
adding changesets
adding manifests
adding file changes
mpm@selenic.com
Update tests
r1043 added 1 changesets with 2 changes to 2 files (+1 heads)
Vadim Gelfer
add merge command. means same thing as "update -m"....
r2019 (run 'hg heads' to see heads, 'hg merge' to merge)
mpm@selenic.com
Fix long-standing excessive file merges...
r990 merging for foo
resolving manifests
getting bar
merging foo
Benoit Boissinot
ui: output the number of file updated/merged/removed/... on update...
r1922 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
mpm@selenic.com
Fix long-standing excessive file merges...
r990 we shouldn't have anything but foo in merge state here
m 644 3 foo
main: we should have a merge here
rev offset length base linkrev nodeid p1 p2
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 0 0 77 0 0 c36078bec30d 000000000000 000000000000
1 77 73 1 1 182b283965f1 c36078bec30d 000000000000
2 150 71 2 2 a6aef98656b7 c36078bec30d 000000000000
3 221 72 3 3 0c2cc6fc80e2 182b283965f1 a6aef98656b7
mpm@selenic.com
Clean up some merge logic...
r993 log should show foo and quux changed
Matt Mackall
Only show long hashes with --debug, not --verbose
r2966 changeset: 3:0c2cc6fc80e2
mpm@selenic.com
Clean up some merge logic...
r993 tag: tip
Matt Mackall
Only show long hashes with --debug, not --verbose
r2966 parent: 1:182b283965f1
parent: 2:a6aef98656b7
mpm@selenic.com
Clean up some merge logic...
r993 user: test
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 date: Mon Jan 12 13:46:40 1970 +0000
mpm@selenic.com
Clean up some merge logic...
r993 files: foo quux
description:
merge
mpm@selenic.com
Fix long-standing excessive file merges...
r990 foo: we should have a merge here
rev offset length base linkrev nodeid p1 p2
0 0 3 0 0 b8e02f643373 000000000000 000000000000
1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000
2 7 4 2 2 33d1fb69067a b8e02f643373 000000000000
3 11 4 3 3 aa27919ee430 2ffeddde1b65 33d1fb69067a
bar: we shouldn't have a merge here
rev offset length base linkrev nodeid p1 p2
0 0 3 0 0 b8e02f643373 000000000000 000000000000
1 3 4 1 2 33d1fb69067a b8e02f643373 000000000000
baz: we shouldn't have a merge here
rev offset length base linkrev nodeid p1 p2
0 0 3 0 0 b8e02f643373 000000000000 000000000000
1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000
quux: we shouldn't have a merge here
rev offset length base linkrev nodeid p1 p2
0 0 3 0 0 b8e02f643373 000000000000 000000000000
1 3 5 1 3 6128c0f33108 b8e02f643373 000000000000
mpm@selenic.com
Clean up some merge logic...
r993 manifest entries should match tips of all files
33d1fb69067a0139622a3fa3b7ba1cdb1367972e 644 bar
2ffeddde1b65b4827f6746174a145474129fa2ce 644 baz
aa27919ee4303cfd575e1fb932dd64d75aa08be4 644 foo
6128c0f33108e8cfbb4e0824d13ae48b466d7280 644 quux
mpm@selenic.com
Fix long-standing excessive file merges...
r990 everything should be clean now
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
4 files, 4 changesets, 10 total revisions