another problem with reviewboard

33 views
Skip to first unread message

John Ioannidis

unread,
May 1, 2014, 9:19:56 PM5/1/14
to pants-devel
I'm not sure what I did wrong, but when I posted https://rbcommons.com/s/twitter/r/278/ it included all the diffs from master, rather than just the changes in the one file I was editing. 

Is there a way to *remove* files from a review? 

Thanks

/ji

Eric Ayers

unread,
May 1, 2014, 9:45:53 PM5/1/14
to j...@twitter.com, pants-devel
This happened to me too.  I think the solution was to fetch upstream into master, then rebase your branch and upload again.

John Sirois

unread,
May 2, 2014, 12:03:53 PM5/2/14
to Eric Ayers, John Ioannidis, pants-devel
Everyone seems to do these things differently, but I like to use a pure rebase workflow and explicit rbt parent.

The outline:

1 time only In my own github fork of pantsbuild/pants:
myfork/pants (master) $ git remote add pants https://github.com/pantsbuild/pants.git

Now for a single feature for example:
myfork/pants (master) $ git checkout -b jsirois/feature pants master
myfork/pants (jsirois/feature) $ git commit -am 'wip1'
myfork/pants (jsirois/feature) $ git commit -am 'wip2'
myfork/pants (jsirois/feature) $ git commit -am 'wip3'
myfork/pants (jsirois/feature) $ git rebase -i # turn all my commits into 1 with the commit message matching what I want for the description of the RB and the eventual mainline commit message
myfork/pants (jsirois/feature) $ git push origin HEAD # shortcut for git push origin [my current branch name]
myfork/pants (jsirois/feature) $ rbt post --parent=HEAD~1 # I'll actually create a pull reqeuest from the branch pushed in the last step from the github UI and associate it with the RB
myfork/pants (jsirois/feature) $ git commit -am 'fix1'
myfork/pants (jsirois/feature) $ git push origin HEAD
myfork/pants (jsirois/feature) $ rbt post --parent=HEAD~2
myfork/pants (jsirois/feature) $ git pull --rebase # refresh against something that just got into pantsbuild/pants master that I want
myfork/pants (jsirois/feature) $ git commit -am 'fix2'
myfork/pants (jsirois/feature) $ git commit -am 'fix3'
myfork/pants (jsirois/feature) $ git rebase -i # again turn the 2 into 1
myfork/pants (jsirois/feature) $ git push origin HEAD
myfork/pants (jsirois/feature) $ rbt post --parent=HEAD~3

The key thing there is always rebasing and always using --parent.  I have come to like this because it keeps my commits:
1.) matching the hunks the RB reviewers see
2.) nicely linear on top of my tracking branch's latest commit

With this approach there are never any surprises when I `rbt post`.  If I say --parent=HEAD~N then the diff posted is exactly HEAD~N...HEAD every time no matter my pull pattern on the branch.
--
John Sirois
303-512-3301





John Sirois

unread,
May 2, 2014, 12:04:30 PM5/2/14
to Eric Ayers, John Ioannidis, pants-devel
On Fri, May 2, 2014 at 10:03 AM, John Sirois <jsi...@twitter.com> wrote:
Everyone seems to do these things differently, but I like to use a pure rebase workflow and explicit rbt parent.

The outline:

1 time only In my own github fork of pantsbuild/pants:
myfork/pants (master) $ git remote add pants https://github.com/pantsbuild/pants.git

Now for a single feature for example:
myfork/pants (master) $ git checkout -b jsirois/feature pants master

Typo:
myfork/pants (master) $ git checkout -b jsirois/feature pants/master



--
John Sirois
303-512-3301





Reply all
Reply to author
Forward
0 new messages