Closed
Bug 1039522
Opened 11 years ago
Closed 11 years ago
Include command to pull review request head
Categories
(MozReview Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mcote, Unassigned)
References
Details
Attachments
(1 file)
A really useful feature would be a URL in the review request (squashed or otherwise) that would allow you to check out that "branch" (head, I guess). This would make it simple to test the code under review and would bring this system into closer parity with GitHub.
A separate field would probably be best, but in the interest of getting things done, I'm totally okay with the link being in the Description field.
Assignee | ||
Comment 1•11 years ago
|
||
The commits view being introduced in bug 1034171 is probably a good place for these links.
Assignee | ||
Comment 2•11 years ago
|
||
/r/96 - Bug 1039522 - Include pull command in description of squashed request.
Attachment #8464229 -
Flags: review?(smacleod)
Attachment #8464229 -
Flags: review?(gps)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → mcote
Status: NEW → ASSIGNED
Summary: Link to review repo head for review-request commit → Include command to pull review request head
Comment 3•11 years ago
|
||
::: pylib/reviewboardmods/reviewboardmods/pushhooks.py
(Diff revision 1)
> + ['', 'hg pull -r %s reviews' % commits['individual'][-1]['id']])
We don't know for certain that the user has aliased *reviews* as the remote name. But this is easy enough to implement.
::: pylib/reviewboardmods/reviewboardmods/pushhooks.py
(Diff revision 1)
> + squashed_description[-1] += 'these commits:'
Do none of these changes to squash_description cause a test failure? I'm almost certain they would.
Assignee | ||
Comment 4•11 years ago
|
||
::: pylib/reviewboardmods/reviewboardmods/pushhooks.py
(Diff revision 1)
> + squashed_description[-1] += 'these commits:'
> Do none of these changes to squash_description cause a test failure? I'm almost certain they would.
Whoops, of course. Will fix them up.
::: pylib/reviewboardmods/reviewboardmods/pushhooks.py
(Diff revision 1)
> + ['', 'hg pull -r %s reviews' % commits['individual'][-1]['id']])
> We don't know for certain that the user has aliased *reviews* as the remote name. But this is easy enough to implement.
smacleod suggested we just standardize on a path name and implement it in the client later, so that's what I'm doing. :)
Comment 5•11 years ago
|
||
::: pylib/reviewboardmods/reviewboardmods/pushhooks.py
(Diff revision 1)
> + ['', 'hg pull -r %s reviews' % commits['individual'][-1]['id']])
> We don't know for certain that the user has aliased *reviews* as the remote name. But this is easy enough to implement.
Can we make it *review* instead of *reviews*? One less character to type :) And, *hg push review* kinda sounds more like a sentence: *Mercurial, push this for review.*
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 8464229 [details]
Review for review ID: bz://1039522/mcote
/r/96 - Bug 1039522 - Include pull command in description of squashed request.
/r/97 - Bug 1039522 - Update tests, change repo nick from 'reviews' to 'review'.
Comment 7•11 years ago
|
||
Looks good to me, after fixing the one issue. Please fold the two commits together before landing, they should really be one.
::: pylib/reviewboardmods/reviewboardmods/pushhooks.py
(Diff revision 2)
> + ['', 'hg pull -r %s review' % commits['individual'][-1]['id']])
nit: can we please make this:
['', 'hg pull review -r %s' % commits['individual'][-1]['id']])
Having "review" before the -r argument makes it flow really nicely in english :D
Along with the magic gps wants to add where the "review" path is auto detected and added, I wonder if in the future it'd be worth adding extra magic so that you could specify "-r <reviewid>" instead of the sha1... so it would be something like "hg pull review -r bz://1234/mcote" to pull down the commits. Could be a nice to have down the road.
Updated•11 years ago
|
Attachment #8464229 -
Flags: review?(smacleod) → review+
Assignee | ||
Comment 8•11 years ago
|
||
Agreed, would be nice. File a bug? :)
Assignee | ||
Comment 9•11 years ago
|
||
Pushed: http://hg.mozilla.org/hgcustom/version-control-tools/rev/79aea0531ff0
Then I realized I forgot to update the tests for the little change, so fixed those: http://hg.mozilla.org/hgcustom/version-control-tools/rev/d94741da4f19 :)
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 10•11 years ago
|
||
Regarding magic with -r identifiers, Mercurial does this via protocol handlers. e.g. bz://. One of the reasons I wanted to use proto:// handlers for the identifiers was to facilitate this kind of magic in the future :)
We could probably introduce rb://<number> to magically map RB review requests into known commit IDs. Good follow-up.
Updated•11 years ago
|
Attachment #8464229 -
Flags: review?(gps)
Updated•10 years ago
|
Product: bugzilla.mozilla.org → Developer Services
Updated•9 years ago
|
Product: Developer Services → MozReview
You need to log in
before you can comment on or make changes to this bug.
Description
•