git cl try is broken for inter-dependent patches

37 views
Skip to first unread message

Gabriel Charette

unread,
Jun 19, 2012, 3:59:29 PM6/19/12
to Chromium-dev
Hi,

so I'm really happy that now if you base branch bar on top of branch foo (which say is based on master) when you git cl upload bar it only uploads the diff between bar and foo which means you can have 2 (or more, I recently pushed this to 4) dependent CLs reviewed at the same time (without cluttering the 2nd one with the 1st one's diff).

The problem now is that git try behaves the same way (i.e. only sends the diff between bar and foo). This is wrong however because that diff will not apply on the try servers (as those are on master and don't know about foo).

The right thing to do is to keep uploading only the partial diff with git cl upload, but to upload the full diff (w.r.t. master) for git tries.

How hard would it be to get that behavior working? The current workaround is to make a copy of the top CL, base it on master (git branch --set-upstream copy master), git cl upload the copy, and run try jobs on that, but its a lot of overhead and is annoying if you then wanna test say 2 out of 4 patches in your stack or something...

Thanks,
Gab

Dirk Pranke

unread,
Jun 19, 2012, 4:08:03 PM6/19/12
to g...@chromium.org, Chromium-dev
You can use 'git try --upstream-branch' to get the behavior you want here.

It seems to me that whether you want 'diff-against-upstream' or
'diff-against-master' depends on the content of your patches, and I'm
not sure if changing the default is warranted.

-- Dirk
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev

Gabriel Charette

unread,
Jun 19, 2012, 4:13:49 PM6/19/12
to Dirk Pranke, Chromium-dev
Oh, awesome!!

Changing the default behavior per see is not what I'm looking for, I thought there was only one behavior, but if you're saying `git try --upstream-branch master` will do exactly what I'm looking for, that's awesome, and I stand corrected :)!

Cheers,
Gab

Alec Flett

unread,
Jun 19, 2012, 6:09:46 PM6/19/12
to g...@chromium.org, Dirk Pranke, Chromium-dev
On an only vaguely related note, does anyone know of a similar way of doing
this (just the 'upload' portion is fine) for webkit-patch? I've tried once
or twice and failed...(I know this is more of a webkit question just hoping people who work on both sides like me, will be able to answer this)

Alec

James Robinson

unread,
Jun 19, 2012, 6:12:10 PM6/19/12
to alec...@chromium.org, g...@chromium.org, Dirk Pranke, Chromium-dev
On Tue, Jun 19, 2012 at 3:09 PM, Alec Flett <alec...@chromium.org> wrote:
On an only vaguely related note, does anyone know of a similar way of doing
this (just the 'upload' portion is fine) for webkit-patch? I've tried once
or twice and failed...(I know this is more of a webkit question just hoping people who work on both sides like me, will be able to answer this)

Take a look at the -g parameter for webkit-patch upload. "webkit-patch upload --help" to see the full list of options.

- James
Reply all
Reply to author
Forward
0 new messages