tests/test-merge-local.out
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
Sat, 09 Jun 2007 01:04:28 -0300
changeset 4531 b51a8138292a
parent 4417 0912d8df5e19
child 6004 5af5f0f9d724
permissions -rw-r--r--
Avoid extra filelogs entries. Right now, there are some situations in which localrepo.filecommit can create filelog entries even though they're not needed. For example: - permissions for a file have changed; - qrefresh can create a filelog entry identical to its parent (see the added test); - convert-repo creates extra filelog entries in every merge where the first parent has added files (for example, changeset ebebe9577a1a of the kernel repo added extra filelog entries to files in the arch/blackfin directory, even though the merge should only touch the drivers/ata directory). This makes "hg log file" in a converted repo less useful than it could be, since it may mention many merges that don't actually touch that specific file. They all come from the same basic problem: localrepo.commit (through filecommit) creates new filelog entries for all files passed to it (except for some cases during a merge). Patch and test case provided by Benoit. This should fix issue351.

# 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 zzz1_merge_ok failed!
merging zzz2_merge_bad
merging zzz2_merge_bad failed!
3 files updated, 0 files merged, 2 files removed, 2 files unresolved
There are unresolved merges with locally modified files.
You can redo the full merge using:
  hg update 0
  hg update 1
2 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 conflicts
warning: conflicts during merge.
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
There are unresolved merges with locally modified files.
You can finish the partial merge using:
  hg update 0
  hg update 1
2 files updated, 0 files merged, 3 files removed, 0 files unresolved
--- a/zzz1_merge_ok
+++ b/zzz1_merge_ok
+new first line
+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
# 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