Regression: Could not upload branch to codereview with local master |
|||||||
Issue description
My tree structurefor depot_tools is as below:
origin/master
master
some_fix * [ ahead 1 ]
I tried to upload some_fix but got:
Upload upstream branch master first.
It is likely that this branch has been rebased since its last upload, so you just need to upload it again.
(If you uploaded it with --no-squash, then branch dependencies are not supported, and you should reupload with --squash.)
It was necessary for me to set some_fix's upstream to origin/master for me to upload. I don't think the requirement that the upstream branch be uploaded is too useful. It breaks the local master workflow, and I sometimes make little hack-branches (remove an unrelated DCHECK firing too often) that I base real work branches off.
,
Jan 20 2017
,
Jan 20 2017
This is effectively a duplicate of issue 649846 . Both of these are saying "we need a way to upload a diff other than an actual branch tracking a branch which has already been uploaded". I expect that they'll be implemented via the same code path. Something that can take in a list of commit hashes (generated either via "git log <diff args>" or "git log @{u}" as requested in this bug) and rebase/cherry-pick them on top of origin/master before upload. Since tandrii@ owns that one, assigning this one to him as well. tandrii@: might be worth filing a bug for tracking the implementation detail work for generating the shadow commit, and marking it as blocking both of these.
,
Jan 22 2017
I think it's important to track this as a separate bug. Note that Issue 649846 is a long-standing issue with git cl upload for people who want to specify extra arguments. Although calamity@ didn't explicitly state it, this is a *regression* for PolyGerrit. Uploading with a non-uploaded upstream works perfectly fine with a Reitveld server (and I assume many people -- at least the two of us for starters -- rely on this workflow). Updated the title to reflect that this is a regression. This should be a blocker for switching the main Chromium repo to PolyGerrit.
,
Jan 23 2017
We are tracking it as separate bug, that's why we didn't dedup it. I intend to start working on this bug by end of next week.
,
Jan 23 2017
Yes, and note that both this bug and the other bug are marked as blocking the migration itself (they're in Milestone-Dogfood and Milestone-Launch, respectively). We definitely recognize that these are real issues and real regressions.
,
Jan 25 2017
> tandrii@: might be worth filing a bug for tracking the implementation detail work for generating the shadow commit, and marking it as blocking both of these. git cl already creates shadow commit, but on top of incorrect parent (effectively hardcoded as upstream, which is either shadow commit of local branch OR remote's branch that is being tracked).
,
Jan 25 2017
Right, I meant to track the work of generating the shadow commit with variable args. Then the current code could just say "diff against upstream, on top of upstream", resolving this bug could say "diff against upstream, on top of origin/master", and resolving issue 649846 could say "diff with args, against origin/master".
,
Mar 28 2017
tandrii@: this says "Started". Do you have a CL where you've started work on making gerrit git-cl upload agnostic of master? It would be really nice to solve this in the next couple days before dogfood and I thought this had been solved but I'm not sure of the actual state here.
,
Mar 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/tools/depot_tools/+/f97e33d27f2d0522c7c200fdc80d0129fb3d6437 commit f97e33d27f2d0522c7c200fdc80d0129fb3d6437 Author: Aaron Gable <agable@chromium.org> Date: Thu Mar 30 22:49:03 2017 Gerrit git-cl: special-case branches tracking 'master' This is a hack to support the most common git workflow: keeping a local branch named 'master' which is a replica of 'origin/master' with no local changes, and basing all feature branches off of that. Test: * created master branch, created feature branch, uploaded CL correctly * created master branch, landed change on master branch, created feature branch, uploaded CL, CL contains change on master too * created non-master branch, created feature branch, failed to upload CL Bug: 682104 Change-Id: I8481b787e6dcab162d2846c07f1ddad950f491e0 Reviewed-on: https://chromium-review.googlesource.com/464107 Reviewed-by: Andrew Bonventre <andybons@google.com> Commit-Queue: Aaron Gable <agable@chromium.org> [modify] https://crrev.com/f97e33d27f2d0522c7c200fdc80d0129fb3d6437/git_cl.py
,
Mar 30 2017
I've fixed this by special-casing 'master' when computing the upstream here: https://chromium-review.googlesource.com/c/464107/ It's not the way I'd like to do this (I'd like to do it as described in comment 3), but this does resolve the issue at hand. I'll leave the better implementation of supporting full git-diff args to tandrii in the Launch milestone. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by jparent@chromium.org
, Jan 18 2017