Closed
Bug 1400469
Opened 7 years ago
Closed 7 years ago
mach try should have a way to add a description to a try push
Categories
(Firefox Build System :: Task Configuration, task)
Firefox Build System
Task Configuration
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla58
People
(Reporter: bzbarsky, Assigned: ahal)
References
Details
Attachments
(1 file)
When I'm doing multiple try pushes (using push to try) to test variations on something, it's very useful to be able to add a description to the try changeset to describe what it's testing. I don't see an obvious way to do something like that with mach try.
Assignee | ||
Comment 2•7 years ago
|
||
Another use case brought up in bug 1400588 is adding CLOSED TREE, e.g when it's ok to push to try if you only schedule certain platforms.
Comment 3•7 years ago
|
||
I think this is useful as I often bisect on try and need to know which revision or config state I am testing
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•7 years ago
|
||
This works by using -m the same way hg/git do. You can either pass in a string, or leave it blank to pop open an editor (the EDITOR environment variable needs to be set for this to work). The computed message (either the try syntax or 'Pushed via `mach try fuzzy`...') will still show up in the commit message, by default like this:
My custom commit message
try: -b o -p linux
Though, if you want it all on the same line, you can still do:
./mach try -b o -p linux -m "My custom commit message, {msg}"
This results in a commit message like:
My custom commit message, try: -b o -p linux
The reason for this default is that it works nicely for both single and multi-line commit messages.
Assignee | ||
Comment 6•7 years ago
|
||
Assuming bug 1400429 lands first, this is going to need to be rebased.
Assignee | ||
Updated•7 years ago
|
Attachment #8909471 -
Flags: review?(armenzg)
Assignee | ||
Comment 7•7 years ago
|
||
I cancelled the review for now as I'll wait for the other bug to land and rebase. The rebase won't quite be trivial, so worth waiting before doing the review.
Comment hidden (mozreview-request) |
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8909471 [details]
Bug 1400469 - Add ability to specify commit message to |mach try|,
https://reviewboard.mozilla.org/r/180962/#review187614
I just have the question below. This looks good.
::: tools/tryselect/cli.py:75
(Diff revision 2)
> + with tempfile.NamedTemporaryFile(mode='r') as fh:
> + subprocess.call([os.environ['EDITOR'], fh.name])
> + args.message = fh.read().strip()
> +
> + if '{msg}' not in args.message:
> + args.message = '{}\n\n{}'.format(args.message, '{msg}')
Why do you keep the string '{msg}'?
Is this what happens?
> --message "hi!"
turns into this?
> hi!
>
>
> {msg}
Is this so you can use format later on?
> message.format(msg=msg)
Attachment #8909471 -
Flags: review?(armenzg) → review+
Assignee | ||
Comment 10•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8909471 [details]
Bug 1400469 - Add ability to specify commit message to |mach try|,
https://reviewboard.mozilla.org/r/180962/#review187614
> Why do you keep the string '{msg}'?
>
> Is this what happens?
> > --message "hi!"
>
> turns into this?
> > hi!
> >
> >
> > {msg}
>
> Is this so you can use format later on?
> > message.format(msg=msg)
Yeah, that's more or less it. The string that gets substituted into {msg} is the computed string (that would normally be printed without using --message). By default the computed string goes two lines below the specified message, but I figured some developers would want it to show up on the same line like this:
My patch description, try: -b o -p ...
This way they can control where the computed string ends up like this:
./mach try -b o -p ... -m "My patch description, {msg}"
Comment 11•7 years ago
|
||
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/db6679f42d98
Add ability to specify commit message to |mach try|, r=armenzg
Comment 12•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Updated•7 years ago
|
Product: TaskCluster → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•