I could make git-cl track what your patch was last uploaded against, and warn on dcommit if that upload was not based on an upstream svn commit. That would be pretty easy: - on upload, stuff the diff base into a property of the branch - on dcommit, call something like "git cat-file -p DIFFBASE | egrep -q ^git-svn-id:"
I seem to recall Paweł sending me a patch to do something like #1 but it's probably buried in my inbox somewhere... :\ On Thu, May 21, 2009 at 10:34 AM, Marc-Antoine Ruel <[email protected]> wrote: > [+chromium-dev] > Well, the plain old: > If "diff of stuff being committed" != "diff of codereview" > Error -> "You are trying to commit code that is different from what you > reviewed." > Note that this applies to svn too. I think I could implement that on a > PRESUBMIT script. I'm just afraid it'd slow down the commit. :/ One thing > to help would be to cache the diff on upload. > M-A > On Wed, May 20, 2009 at 12:44 PM, Evan Martin <[email protected]> wrote: >> >> I would like this as a feature, since I do it too. >> >> The technical implementation is a bit tricky, since git doesn't really >> know how branches are related. They're just pointers into the commit >> graph. You could do something like "on commit, verify that no other >> branch is a subset of this one" but that might be fragile and won't >> catch the case where you have something like >> >> A---B <- review1 >> \ >> C---D---E <- review2 >> >> and then you do a new commit on review1 due to review feedback, and >> then try to dcommit review2, and review1 is no longer a strict subset >> of review2. >> >> On Wed, May 20, 2009 at 6:15 AM, Marc-Antoine Ruel <[email protected]> >> wrote: >> > Just askin', would it be possible when a code review (branch) is based >> > on another code review (another branch) to block the check-in of the >> > dependent code review until the root code review is checked-in? >> > >> > Because I messed up and checked-in the dependent change without >> > checking-in the initial change, the single commit included both >> > changes. Not a big deal but still not cool even if it's 100% my fault. >> > >> > I guess I could implement that as a git hook but would it be useful to >> > have it in git-cl? Maybe not, what do you think? >> > >> > M-A >> > > > --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
