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)

task
Not set
normal

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.
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.
I think this is useful as I often bisect on try and need to know which revision or config state I am testing
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
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.
Assuming bug 1400429 lands first, this is going to need to be rebased.
Depends on: 1400429
Attachment #8909471 - Flags: review?(armenzg)
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 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+
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}"
Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/db6679f42d98 Add ability to specify commit message to |mach try|, r=armenzg
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Product: TaskCluster → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: