Mercurial > hg
view tests/test-merge-local.out @ 11638:79231258503b stable
transplant: crash if repo.commit() finds nothing to commit
(makes issue2135, issue2264 more obvious, but does nothing to fix
either one)
This seems to happen in two distinct cases:
* patch.patch() claims success but changes nothing (e.g.
the transplanted changeset adds an empty file that already
exists)
* patch.patch() makes changes, but repo.status() fails to report them
Both of these seem like bugs in other parts of Mercurial, so arguably
it's not transplant's job to detect the failure to commit. However:
* detecting the problem as soon as possible is desirable
* it prevents a more obscure crash later, in transplants.write()
* there might be other lurking (or future) bugs that cause
repo.commit() to do nothing
Also, in the case of issue2264 (source changesets silently dropped by
transplant), the only way to spot the problem currently is the crash
in transplants.write(). Failure to transplant a patch should abort
immediately, whether it's user error (patch does not apply) or a
Mercurial bug (e.g. repo.status() failing to report changes).
author | Greg Ward <greg-hg@gerg.ca> |
---|---|
date | Sun, 18 Jul 2010 21:29:29 -0400 |
parents | 6f1894d6a6b0 |
children |
line wrap: on
line source
# revision 0 adding copy adding move adding remove adding unchanged adding zzz1_merge_ok adding zzz2_merge_bad # revision 1 # local changes to revision 0 4 files updated, 0 files merged, 3 files removed, 0 files unresolved --- a/zzz1_merge_ok +++ b/zzz1_merge_ok +new last line --- a/zzz2_merge_bad +++ b/zzz2_merge_bad +another last line M zzz1_merge_ok M zzz2_merge_bad # local merge with bad merge tool merging zzz1_merge_ok merging zzz2_merge_bad merging zzz2_merge_bad failed! 3 files updated, 1 files merged, 2 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges merging zzz1_merge_ok merging zzz2_merge_bad warning: conflicts during merge. merging zzz2_merge_bad failed! 2 files updated, 1 files merged, 3 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges --- a/zzz1_merge_ok +++ b/zzz1_merge_ok +new last line --- a/zzz2_merge_bad +++ b/zzz2_merge_bad +another last line +======= M zzz1_merge_ok M zzz2_merge_bad ? zzz2_merge_bad.orig # local merge with conflicts merging zzz1_merge_ok merging zzz2_merge_bad warning: conflicts during merge. merging zzz2_merge_bad failed! 3 files updated, 1 files merged, 2 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges merging zzz1_merge_ok merging zzz2_merge_bad warning: conflicts during merge. merging zzz2_merge_bad failed! 2 files updated, 1 files merged, 3 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges --- a/zzz1_merge_ok +++ b/zzz1_merge_ok +new last line --- a/zzz2_merge_bad +++ b/zzz2_merge_bad +another last line +======= +======= +new last line +======= M zzz1_merge_ok M zzz2_merge_bad ? zzz2_merge_bad.orig # local merge without conflicts merging zzz1_merge_ok 4 files updated, 1 files merged, 2 files removed, 0 files unresolved --- a/zzz1_merge_ok +++ b/zzz1_merge_ok +new last line M zzz1_merge_ok ? zzz2_merge_bad.orig