The behavior did change, and it was an intentional change to make things
consistent across all the different SCM implementations. The new behavior
is, basically:

* When no revisions are specified, show the diff between HEAD and the
TRACKING_BRANCH
* When one revision is specified, show the diff between that revision and
its parent
* When two revisions are specified, show the diff between those two
revisions.

Unfortunately, that does make your case more complicated. Aside from what
you did with your _MERGE_BASE_CMD, there are a couple solutions I can think
of:

1. Set TRACKING_BRANCH to "master" instead of "origin/master" and then
avoid fast-forwarding the local head until your branch is done with review
(you can still fetch from origin but leave master pointing to the base of
your branch). This would work but really isn't great.
2. Much better, use "rbt post origin/master...HEAD" to post your branch
(note the 3 dots between revs).
3. Best, create an alias for #2 (using ALIASES in .reviewboardrc) so that
you can to something like "rbt p" and have it post what you want.

Hope this helps,
-David

On Wed, Jul 24, 2019 at 3:31 PM Noach Magedman <[email protected]> wrote:

> I can get the behavior I want by adding the following to my .reviewboardrc:
>
> # .reviewboardrc
> _MERGE_BASE_CMD = ["git", "merge-base", "origin/master", "HEAD", ]
> _merge_base = subprocess.Popen(_MERGE_BASE_CMD,
>                                stdout=subprocess.PIPE
>                                ).communicate()[0].strip().decode('utf-8')
> TRACKING_BRANCH = _merge_base
>
>
>
>
> ... however it gives me an ugly (and I daresay, incorrect) warning message
> before showing the (correct!) diff output:
>
> WARNING: Could not determine specific upstream remote to use for diffs. We
> recommend setting TRACKING_BRANCH in reviewboardrc to your nearest
> upstream remote branch.
>
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "Review Board Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/reviewboard/be602eac-61c3-4d23-a1d3-2494b23c566d%40googlegroups.com
> <https://groups.google.com/d/msgid/reviewboard/be602eac-61c3-4d23-a1d3-2494b23c566d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/CAFS3VNVGZQOg1PKJ0uBZU7WHhUZMxhUV99mkh8%3Dsy65hSuFgQA%40mail.gmail.com.

Reply via email to