Mercurial > hg > mercurial-crew-with-dirclash
view tests/test-newbranch.out @ 5378:8a2915f57dfc
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.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Thu, 04 Oct 2007 23:21:37 -0300 |
parents | 6858a7477a5e |
children |
line wrap: on
line source
marked working directory as branch foo foo marked working directory as branch bar % branch shadowing abort: a branch of the same name already exists (use --force to override) marked working directory as branch default 0 files updated, 0 files merged, 0 files removed, 0 files unresolved foo 0 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) foo changeset: 5:5f8fb06e083e branch: foo tag: tip parent: 4:4909a3732169 parent: 3:bf1bc2f45e83 user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: merge changeset: 4:4909a3732169 branch: foo parent: 1:b699b1cec9c2 user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: modify a branch changeset: 3:bf1bc2f45e83 user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: clear branch name changeset: 2:67ec16bde7f1 branch: bar user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: change branch name changeset: 1:b699b1cec9c2 branch: foo user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: add branch name changeset: 0:be8523e69bf8 user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: initial foo 5:5f8fb06e083e default 3:bf1bc2f45e83 (inactive) bar 2:67ec16bde7f1 (inactive) foo default bar % test for invalid branch cache rolling back last transaction changeset: 4:4909a3732169 branch: foo tag: tip parent: 1:b699b1cec9c2 user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: modify a branch Invalid branch cache: unknown tip changeset: 4:4909a3732169c0c20011c4f4b8fdff4e3d89b23f branch: foo tag: tip parent: 1:b699b1cec9c2966b3700de4fef0dc123cd754c31 parent: -1:0000000000000000000000000000000000000000 manifest: 4:d01b250baaa05909152f7ae07d7a649deea0df9a user: test date: Mon Jan 12 13:46:40 1970 +0000 files: a extra: branch=foo description: modify a branch 4:4909a3732169 4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4 bf1bc2f45e834c75404d0ddab57d53beab56e2f8 default 4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo 67ec16bde7f1575d523313b9bca000f6a6f12dca bar % update with no arguments: tipmost revision of the current branch bf1bc2f45e83 4909a3732169 (foo) tip marked working directory as branch foobar abort: branch foobar not found % fastforward merge marked working directory as branch ff adding ff 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) foo changeset: 6:f0c74f92a385 branch: foo tag: tip parent: 4:4909a3732169 parent: 5:c420d2121b71 user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: Merge ff into foo a ff