[PATCH 1 of 5 RFC] tests: show added/modified/removed files when logging repos converted from bzr
Matt Harbison
mharbison72 at gmail.com
Fri Jul 27 18:10:08 UTC 2018
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1531499586 14400
# Fri Jul 13 12:33:06 2018 -0400
# Branch stable
# Node ID 3da5d60bf6e7ad121cea897e2f59846007f3cc9f
# Parent 0f948d821fe7e5ed18e6106c162375a11e8b0546
tests: show added/modified/removed files when logging repos converted from bzr
There's a bug related to incorrect manifest entries because memctx isn't
recalculating status[1], which can be triggered by an octopus fixup merge.
Seeing what the current status is (instead of just the aggregate list) will
hopefully help track this down. Additionally, this shows another bug that is
specific to how files are added to memctx in an octopus merge fixup commit.
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2018-July/118907.html
diff --git a/tests/bzr-definitions b/tests/bzr-definitions
--- a/tests/bzr-definitions
+++ b/tests/bzr-definitions
@@ -6,7 +6,7 @@ echo 'convert = ' >> $HGRCPATH
glog()
{
- hg log -G --template '{rev}@{branch} "{desc|firstline}" files: {files}\n' "$@"
+ hg log -G --template '{rev}@{branch} "{desc|firstline}" files+: [{file_adds}], files-: [{file_dels}], files: [{file_mods}]\n' "$@"
}
manifest()
diff --git a/tests/test-convert-bzr-ghosts.t b/tests/test-convert-bzr-ghosts.t
--- a/tests/test-convert-bzr-ghosts.t
+++ b/tests/test-convert-bzr-ghosts.t
@@ -31,9 +31,9 @@ ghost revisions
1 Initial layout setup
0 Commit with ghost revision
$ glog -R source-hg
- o 1 at source "Commit with ghost revision" files: somefile
+ o 1 at source "Commit with ghost revision" files+: [], files-: [], files: [somefile]
|
- o 0 at source "Initial layout setup" files: somefile
+ o 0 at source "Initial layout setup" files+: [somefile], files-: [], files: []
$ cd ..
diff --git a/tests/test-convert-bzr-merges.t b/tests/test-convert-bzr-merges.t
--- a/tests/test-convert-bzr-merges.t
+++ b/tests/test-convert-bzr-merges.t
@@ -39,6 +39,8 @@ test multiple merges at once
$ bzr merge -q --force ../source-branch2
$ bzr commit -q -m 'Merged branches' '--commit-time=2009-10-10 08:00:04 +0100'
$ cd ..
+
+BUG: file-branch2 should not be added in rev 4
$ hg convert --datesort --config convert.bzr.saverev=False source source-hg
initializing destination source-hg repository
scanning source...
@@ -50,17 +52,17 @@ test multiple merges at once
1 Added brach2 file
0 Merged branches
$ glog -R source-hg
- o 5 at source "(octopus merge fixup)" files:
+ o 5 at source "(octopus merge fixup)" files+: [], files-: [], files: []
|\
- | o 4 at source "Merged branches" files: file-branch2
+ | o 4 at source "Merged branches" files+: [file-branch1 file-branch2], files-: [], files: [file]
| |\
- o---+ 3 at source-branch2 "Added brach2 file" files: file-branch2
+ o---+ 3 at source-branch2 "Added brach2 file" files+: [file-branch2], files-: [], files: []
/ /
- | o 2 at source "Added parent file" files: file-parent
+ | o 2 at source "Added parent file" files+: [file-parent], files-: [], files: []
| |
- o | 1 at source-branch1 "Added branch1 file" files: file file-branch1
+ o | 1 at source-branch1 "Added branch1 file" files+: [file-branch1], files-: [], files: [file]
|/
- o 0 at source "Initial add" files: file
+ o 0 at source "Initial add" files+: [file], files-: [], files: []
$ manifest source-hg tip
% manifest of tip
diff --git a/tests/test-convert-bzr.t b/tests/test-convert-bzr.t
--- a/tests/test-convert-bzr.t
+++ b/tests/test-convert-bzr.t
@@ -42,9 +42,9 @@ back to the rename stuff
1 Initial add: a, c, e
0 rename a into b, create a, rename c into d
$ glog -R source-hg
- o 1 at source "rename a into b, create a, rename c into d" files: a b c d e f
+ o 1 at source "rename a into b, create a, rename c into d" files+: [b d f], files-: [c e], files: [a]
|
- o 0 at source "Initial add: a, c, e" files: a c e
+ o 0 at source "Initial add: a, c, e" files+: [a c e], files-: [], files: []
manifest
@@ -64,7 +64,7 @@ test --rev option
converting...
0 Initial add: a, c, e
$ glog -R source-1-hg
- o 0 at source "Initial add: a, c, e" files: a c e
+ o 0 at source "Initial add: a, c, e" files+: [a c e], files-: [], files: []
test with filemap
@@ -147,13 +147,13 @@ merge
1 Editing b
0 Merged improve branch
$ glog -R source-hg
- o 3 at source "Merged improve branch" files:
+ o 3 at source "Merged improve branch" files+: [], files-: [], files: [b]
|\
- | o 2 at source-improve "Editing b" files: b
+ | o 2 at source-improve "Editing b" files+: [], files-: [], files: [b]
| |
- o | 1 at source "Editing a" files: a
+ o | 1 at source "Editing a" files+: [], files-: [], files: [a]
|/
- o 0 at source "Initial add" files: a b
+ o 0 at source "Initial add" files+: [a b], files-: [], files: []
$ cd ..
@@ -250,13 +250,13 @@ Multiple branches
0 changea
updating tags
$ (cd repo-bzr; glog)
- o 3 at default "update tags" files: .hgtags
+ o 3 at default "update tags" files+: [.hgtags], files-: [], files: []
|
- o 2 at default "changea" files: a
+ o 2 at default "changea" files+: [], files-: [], files: [a]
|
- | o 1 at branch "addb" files: b
+ | o 1 at branch "addb" files+: [b], files-: [], files: []
|/
- o 0 at default "adda" files: a
+ o 0 at default "adda" files+: [a], files-: [], files: []
Test tags (converted identifiers are not stable because bzr ones are
More information about the Mercurial-devel
mailing list