M tests/test-summary-legacy.t +11 -1
@@ 62,6 62,8 @@ Create a host and add the guest repos
$ hg commit -m 0
Sync and test summary
+Expected: the grupdate call should work
+Expected: repo name; (target); tags joined with '/'; bookmarks ditto; active bookmark with * prefixed.
$ hg grupdate
cloning mygr-hggit
importing git objects into hg
@@ 76,6 78,7 @@ Sync and test summary
mygr-plain (default) tip
Add some bookmarks
+Expected: the bookmarks appear in the list of bookmarks
$ hg bookmark mark -R $TEST_TMPDIR/host/mygr-hggit
$ hg bookmark currentmark -R $TEST_TMPDIR/host/mygr-hggit
@@ 87,6 90,7 @@ Add some bookmarks
mygr-plain (default) tip currentmark/mark *currentmark
Make a change
+Expected: a trailing ' *' to mark the repo as modified
$ echo c1 > $TEST_TMPDIR/host/mygr-plain/f
$ echo c1 > $TEST_TMPDIR/host/mygr-hggit/f
@@ 96,6 100,7 @@ Make a change
mygr-plain (default) tip currentmark/mark *currentmark *
Validate -i option
+Expected: the correct node id appears in each guest's summary
$ ID_plain=$(echo $(hg -R mygr-plain id -i) | sed -r -e 's/\+$//')
$ SUMMARY_plain=$(hg grsummary -i | grep gr-plain)
$ EXPECTED_plain="mygr-plain (default) $ID_plain tip currentmark/mark *currentmark *"
@@ 107,15 112,21 @@ Validate -i option
$ bash -c "[ \"$EXPECTED_hggit\" == \"$SUMMARY_hggit\" ]"
Test --phase option
+Expected: Because an hggit repo keeps all its commits in draft phase,
+the checked-out commit of the hggit guest is in draft phase. This says
+nothing about whether the commit is published.
+Expected: the checked-out commit of the plain guest is public.
$ hg grsummary --phase
mygr-hggit (default) draft default/master/tip currentmark/mark/master *currentmark *
mygr-plain (default) public tip currentmark/mark *currentmark *
Test JSON
+Expected: valid JSON
$ hg grsummary --json
[{"current_bookmark": "currentmark", "tags": "default/master/tip", "changed": true, "branch": "default", "path": "mygr-hggit", "bookmarks": "currentmark/mark/master", "remote_name": "mygr-hggit-name", "id": "*"}, {"current_bookmark": "currentmark", "tags": "tip", "changed": true, "branch": "default", "path": "mygr-plain", "bookmarks": "currentmark/mark", "remote_name": "mygr-plain-name", "id": "*"}] (glob)
Test summary with unknown file
+Expected: a trailing ' *' to mark the repo as modified
$ hg -R mygr-plain revert --all --no-backup
reverting mygr-plain/f
$ hg -R mygr-hggit revert --all --no-backup
@@ 136,4 147,3 @@ Test summary with unknown file
$ hg grsummary
mygr-hggit (default) default/master/tip currentmark/mark/master *currentmark *
mygr-plain (default) tip currentmark/mark *currentmark *
-
M tests/test-summary.t +11 -0
@@ 59,6 59,8 @@ Create a host and add the guest repos
$ hg commit -m 0
Sync and test summary
+Expected: the grupdate call should work
+Expected: repo name; (target); tags joined with '/'; bookmarks ditto; active bookmark with * prefixed.
$ hg grupdate
cloning mygr-hggit
importing git objects into hg
@@ 73,6 75,7 @@ Sync and test summary
mygr-plain (default) tip
Add some bookmarks
+Expected: the bookmarks appear in the list of bookmarks
$ hg bookmark mark -R $TEST_TMPDIR/host/mygr-hggit
$ hg bookmark currentmark -R $TEST_TMPDIR/host/mygr-hggit
@@ 84,6 87,7 @@ Add some bookmarks
mygr-plain (default) tip currentmark/mark *currentmark
Make a change
+Expected: a trailing ' *' to mark the repo as modified
$ echo c1 > $TEST_TMPDIR/host/mygr-plain/f
$ echo c1 > $TEST_TMPDIR/host/mygr-hggit/f
@@ 93,6 97,7 @@ Make a change
mygr-plain (default) tip currentmark/mark *currentmark *
Validate -i option
+Expected: the correct node id appears in each guest's summary
$ ID_plain=$(echo $(hg -R mygr-plain id -i) | sed -r -e 's/\+$//')
$ SUMMARY_plain=$(hg grsummary -i | grep gr-plain)
$ EXPECTED_plain="mygr-plain (default) $ID_plain tip currentmark/mark *currentmark *"
@@ 104,15 109,21 @@ Validate -i option
$ bash -c "[ \"$EXPECTED_hggit\" == \"$SUMMARY_hggit\" ]"
Test --phase option
+Expected: Because an hggit repo keeps all its commits in draft phase,
+the checked-out commit of the hggit guest is in draft phase. This says
+nothing about whether the commit is published.
+Expected: the checked-out commit of the plain guest is public.
$ hg grsummary --phase
mygr-hggit (default) draft default/master/tip currentmark/mark/master *currentmark *
mygr-plain (default) public tip currentmark/mark *currentmark *
Test JSON
+Expected: valid JSON
$ hg grsummary --json
[{"current_bookmark": "currentmark", "tags": "default/master/tip", "changed": true, "branch": "default", "path": "mygr-hggit", "bookmarks": "currentmark/mark/master", "remote_name": "mygr-hggit-name", "id": "*"}, {"current_bookmark": "currentmark", "tags": "tip", "changed": true, "branch": "default", "path": "mygr-plain", "bookmarks": "currentmark/mark", "remote_name": "mygr-plain-name", "id": "*"}] (glob)
Test summary with unknown file
+Expected: a trailing ' *' to mark the repo as modified
$ hg -R mygr-plain revert --all --no-backup
reverting mygr-plain/f
$ hg -R mygr-hggit revert --all --no-backup