git: update test output to reflect reality; r?glob
At some point, a Mercurial or git-cinnabar change caused git-cinnabar to
stop printing "remote: " prefixes on data originated from remotes.
Where this bug resides, I'm not sure. git-mozreview is dead code
walking. I'm inclined to just accept the test output change and
move on. I've already made glandium aware of the potential issue
in case the bug is in cinnabar.
MozReview-Commit-ID: Jxvrlf6lEVO
--- a/git/tests/test-mozreview-commit-selection.t
+++ b/git/tests/test-mozreview-commit-selection.t
@@ -26,21 +26,21 @@ Single commit on topic branch will submi
$ git checkout -b topic1
Switched to a new branch 'topic1'
$ echo topic1_1 > foo
$ git commit --all -m 'Bug 1 - commit 1'
[topic1 e42bea0] Bug 1 - commit 1
1 file changed, 1 insertion(+)
$ git mozreview push
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 1 changesets with 1 changes to 1 files
- remote: recorded push in pushlog
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 1 files
+ recorded push in pushlog
submitting 1 commits for review
commit: e42bea0 Bug 1 - commit 1
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/2 (draft)
(review requests lack reviewers; visit review url to assign reviewers)
@@ -50,21 +50,21 @@ Single commit on topic branch will submi
Additional commit on topic branch will submit 2 commits
$ echo topic1_2 > foo
$ git commit --all -m 'Bug 1 - commit 2'
[topic1 d79633b] Bug 1 - commit 2
1 file changed, 1 insertion(+), 1 deletion(-)
$ git mozreview push
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 1 changesets with 1 changes to 1 files
- remote: recorded push in pushlog
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 1 files
+ recorded push in pushlog
submitting 2 commits for review
commit: e42bea0 Bug 1 - commit 1
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/2
commit: d79633b Bug 1 - commit 2
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/3 (draft)
@@ -81,21 +81,21 @@ branch-based development model a bit bet
$ git checkout -b topic2
Switched to a new branch 'topic2'
$ echo topic2_1 > foo
$ git commit --all -m 'Bug 1 - commit 3'
[topic2 8de2e3a] Bug 1 - commit 3
1 file changed, 1 insertion(+), 1 deletion(-)
$ git mozreview push
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 1 changesets with 1 changes to 1 files
- remote: recorded push in pushlog
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 1 files
+ recorded push in pushlog
submitting 3 commits for review
commit: e42bea0 Bug 1 - commit 1
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/2
commit: d79633b Bug 1 - commit 2
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/3
@@ -113,33 +113,33 @@ Submitting commits referencing multiple
$ git checkout topic1
Switched to branch 'topic1'
$ echo topic1_3 > foo
$ git commit --all -m 'Bug 2 - Another bug'
[topic1 d49c64f] Bug 2 - Another bug
1 file changed, 1 insertion(+), 1 deletion(-)
$ git mozreview push
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 1 changesets with 1 changes to 1 files (+1 heads)
- remote: recorded push in pushlog
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 1 files (+1 heads)
+ recorded push in pushlog
error: cannot submit reviews referencing multiple bugs
hint: limit reviewed commits by specifying a commit or revrange as an argument
[1]
Specifying a refspec to review works
$ git mozreview push HEAD~3..HEAD~1
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 0 changesets with 0 changes to 1 files
+ adding changesets
+ adding manifests
+ adding file changes
+ added 0 changesets with 0 changes to 1 files
submitting 2 commits for review
commit: e42bea0 Bug 1 - commit 1
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/2
commit: d79633b Bug 1 - commit 2
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/3
@@ -148,38 +148,38 @@ Specifying a refspec to review works
publish these review requests now (Yn)? y
(published review request 1)
Specifying a single commit on bottom of stack works
$ git mozreview push e42bea0
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 0 changesets with 0 changes to 1 files
+ adding changesets
+ adding manifests
+ adding file changes
+ added 0 changesets with 0 changes to 1 files
submitting 1 commits for review
commit: e42bea0 Bug 1 - commit 1
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/2
(review requests lack reviewers; visit review url to assign reviewers)
publish these review requests now (Yn)? y
(published review request 1)
Specifying a single commit in middle of stack works
$ git mozreview push d79633b
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 0 changesets with 0 changes to 1 files
+ adding changesets
+ adding manifests
+ adding file changes
+ added 0 changesets with 0 changes to 1 files
submitting 1 commits for review
commit: d79633b Bug 1 - commit 2
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/2 (draft)
(review requests lack reviewers; visit review url to assign reviewers)
@@ -188,21 +188,21 @@ Specifying a single commit in middle of
Specifying a single commit on top of stack works
$ echo topic1_4 > foo
$ git commit --all -m 'Bug 2 - Commit 2'
[topic1 fa60885] Bug 2 - Commit 2
1 file changed, 1 insertion(+), 1 deletion(-)
$ git mozreview push HEAD
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 1 changesets with 1 changes to 1 files
- remote: recorded push in pushlog
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 1 files
+ recorded push in pushlog
submitting 1 commits for review
commit: fa60885 Bug 2 - Commit 2
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/6 (draft)
(review requests lack reviewers; visit review url to assign reviewers)
@@ -229,15 +229,17 @@ We don't review merge commits
create mode 100644 baz
$ git merge --commit -m 'Bug 3 - Merge' parent1
Merge made by the 'recursive' strategy.
bar | 1 +
1 file changed, 1 insertion(+)
create mode 100644 bar
$ git mozreview push
- abort: error performing cinnabar push: Pushing merges is not supported yet
+ fatal: 'cinnabar' appears to be a git command, but we were not
+ able to execute it. Maybe git-cinnabar is broken?
+ abort: error performing cinnabar push; please report this bug
[1]
Cleanup
$ mozreview stop
stopped 9 containers
--- a/git/tests/test-mozreview-push-basic.t
+++ b/git/tests/test-mozreview-push-basic.t
@@ -31,21 +31,21 @@ Create some commits to review
$ echo 2 > foo
$ git commit --all -m 'Bug 1 - Foo 2'
[my-topic f6c6fd8] Bug 1 - Foo 2
1 file changed, 1 insertion(+), 1 deletion(-)
mozreview push will submit for code review
$ git mozreview push
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 2 changesets with 2 changes to 1 files
- remote: recorded push in pushlog
+ adding changesets
+ adding manifests
+ adding file changes
+ added 2 changesets with 2 changes to 1 files
+ recorded push in pushlog
submitting 2 commits for review
commit: 4ba654c Bug 1 - Foo 1
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/2 (draft)
commit: f6c6fd8 Bug 1 - Foo 2
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/3 (draft)
@@ -73,16 +73,17 @@ Reviews should be published and Bugzilla
p2rb.reviewer_map: '{}'
commit_extra_data:
p2rb: true
p2rb.base_commit: 96ee1d7354c4ad7372047672c36a1f561e3a6a4c
p2rb.commits: '[["f7ac6c88ab11801e6f7e22b2de292ed6bd1932a4", 2], ["fc8ecbaed44d222dcc9735a5019f21ca00e003b4",
3]]'
p2rb.discard_on_publish_rids: '[]'
p2rb.first_public_ancestor: 96ee1d7354c4ad7372047672c36a1f561e3a6a4c
+ p2rb.has_commit_message_filediff: true
p2rb.identifier: bz://1/mynick
p2rb.is_squashed: true
p2rb.unpublished_rids: '[]'
diffs:
- id: 1
revision: 1
base_commit_id: 96ee1d7354c4ad7372047672c36a1f561e3a6a4c
name: diff
@@ -110,22 +111,25 @@ Reviews should be published and Bugzilla
- Bug 1 - Foo 1
- ''
- 'MozReview-Commit-ID: 124Bxg'
target_people: []
extra_data:
calculated_trophies: true
commit_extra_data:
p2rb: true
+ p2rb.author: test <test@example.com>
p2rb.commit_id: f7ac6c88ab11801e6f7e22b2de292ed6bd1932a4
+ p2rb.commit_message_filediff_ids: '{"1": 2}'
+ p2rb.commit_message_filename: commit-message-96ee1
p2rb.first_public_ancestor: 96ee1d7354c4ad7372047672c36a1f561e3a6a4c
p2rb.identifier: bz://1/mynick
p2rb.is_squashed: false
diffs:
- - id: 2
+ - id: 3
revision: 1
base_commit_id: 96ee1d7354c4ad7372047672c36a1f561e3a6a4c
name: diff
extra: {}
patch:
- diff --git a/foo b/foo
- '--- a/foo'
- +++ b/foo
@@ -162,26 +166,28 @@ Reviews should be published and Bugzilla
cc: []
comments:
- author: default@example.com
id: 1
tags: []
text: ''
- author: default@example.com
id: 2
- tags: []
+ tags:
+ - mozreview-request
text:
- Created attachment 1
- Bug 1 - Foo 1
- ''
- 'Review commit: http://$DOCKER_HOSTNAME:$HGPORT1/r/2/diff/#index_header'
- 'See other reviews: http://$DOCKER_HOSTNAME:$HGPORT1/r/2/'
- author: default@example.com
id: 3
- tags: []
+ tags:
+ - mozreview-request
text:
- Created attachment 2
- Bug 1 - Foo 2
- ''
- 'Review commit: http://$DOCKER_HOSTNAME:$HGPORT1/r/3/diff/#index_header'
- 'See other reviews: http://$DOCKER_HOSTNAME:$HGPORT1/r/3/'
component: TestComponent
depends_on: []
@@ -190,44 +196,44 @@ Reviews should be published and Bugzilla
resolution: ''
status: NEW
summary: bug1
Pushing from a subdirectory works
$ mkdir subdir
$ cd subdir && git mozreview push
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 0 changesets with 0 changes to 1 files
+ adding changesets
+ adding manifests
+ adding file changes
+ added 0 changesets with 0 changes to 1 files
submitting 2 commits for review
commit: 4ba654c Bug 1 - Foo 1
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/2
commit: f6c6fd8 Bug 1 - Foo 2
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/3
(review requests lack reviewers; visit review url to assign reviewers)
- publish these review requests now (Yn)? y
+ publish these review requests now (Yn)? y
(published review request 1)
Pushing from a worktree works
$ git worktree add -b foo ../worktree
Preparing subdir/../worktree (identifier worktree)
HEAD is now at f6c6fd8 Bug 1 - Foo 2
$ cd ../worktree && git mozreview push
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 0 changesets with 0 changes to 1 files
+ adding changesets
+ adding manifests
+ adding file changes
+ added 0 changesets with 0 changes to 1 files
submitting 2 commits for review
commit: 4ba654c Bug 1 - Foo 1
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/2
commit: f6c6fd8 Bug 1 - Foo 2
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/3
@@ -236,20 +242,20 @@ Pushing from a worktree works
publish these review requests now (Yn)? y
(published review request 1)
hg:// URLs work
$ git config mozreview.remote hg://${DOCKER_HOSTNAME}:${HGPORT}:http/test-repo
$ git mozreview push
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 0 changesets with 0 changes to 1 files
+ adding changesets
+ adding manifests
+ adding file changes
+ added 0 changesets with 0 changes to 1 files
submitting 2 commits for review
commit: 4ba654c Bug 1 - Foo 1
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/2
commit: f6c6fd8 Bug 1 - Foo 2
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/3
@@ -259,20 +265,20 @@ hg:// URLs work
publish these review requests now (Yn)? y
(published review request 1)
Old configuration using an actual git remote works gracefully
$ git config mozreview.remote review
$ git remote add review hg::http://$DOCKER_HOSTNAME:$HGPORT/test-repo
$ git mozreview push
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 0 changesets with 0 changes to 1 files
+ adding changesets
+ adding manifests
+ adding file changes
+ added 0 changesets with 0 changes to 1 files
submitting 2 commits for review
commit: 4ba654c Bug 1 - Foo 1
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/2
commit: f6c6fd8 Bug 1 - Foo 2
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/3
@@ -281,20 +287,20 @@ Old configuration using an actual git re
publish these review requests now (Yn)? y
(published review request 1)
No "mozreview.remote" defaults to "review"
$ git config --unset mozreview.remote
$ git mozreview push
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 0 changesets with 0 changes to 1 files
+ adding changesets
+ adding manifests
+ adding file changes
+ added 0 changesets with 0 changes to 1 files
submitting 2 commits for review
commit: 4ba654c Bug 1 - Foo 1
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/2
commit: f6c6fd8 Bug 1 - Foo 2
review: http://$DOCKER_HOSTNAME:$HGPORT1/r/3