Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium

New issue 3510 by fel...@cypriano.me: Make Automatically `rbt post` automatically detect the tracking branch
http://code.google.com/p/reviewboard/issues/detail?id=3510

What version are you running?
RBCommons + RBTools 0.6.2

Describe the enhancement and the motivation for it.

Based on the documentation (https://github.com/reviewboard/rbtools/blob/master/docs/rbtools/rbt/configuration.rst#tracking_branch) `rbt post` under Git assumes the closes remote branch is `master` and you need to use `--tracking-branch` to change it if the tracking branch is not master.

The way I use branches is that all feature branches come from master, I commit and push feature branches to origin/feature-branch-name so that our CI can grab the changes and run the tests; after everything is green (including code review) the branch is merged into master. So if I understood correctly TRACKING_BRANCH is `origin/feature-branch-name` and BRANCH is `master`.

My suggestion is to make `rbt post` smarter under Git. We can get the name of the tracking branch and use it:

```
git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)
```

or

```
git rev-parse --abbrev-ref --symbolic-full-name @{u}
```

So `rbt post` could get the result from one of those commands and use it as the tracking branch if there's no --tracking-branch option nor TRACKING_BRANCH in .reviewboardrc file.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.

Reply via email to