Post difference between svn branch and tag on overview board
I want to post an SVN diff on an overview board; diff is generated between HEAD branches and base tag.
I used this command to generate a diff file:
svn diff https:/path/to/branch/head https:/path/to/tag
note that
-
I tried to use the command
rbt diff revision1:revision2
to generate diff. I have a problem where the overview board only accepts a range of revisions inside a branch for commit only (not taking a revision from tags). -
I tried to diff using the command
svn diff
and then download the file usingrbt post --diff-filename
, but the command returned with an error requiring the base directory; I added a base directory to be the root usingrbt post --basedir https:/path/to/root
; overviewboards accept but show diffs on the web page as diff betweenhttps:/path/to/root/branches/featureName/path/to/changed/files
andhttps:/path/to/root/path/to/changed/files
without showing diff is between branch and tag, eghttps:/path/to/root/tag/path/to/changed/files
.
Is there a way to do this kind of work?
source to share
You can post a diff like this using the RBTools command post
.
Let's say, for example, your Subversion repository is registered with the following URL on the message board:
http://svn.example.org/foo/base/group
(where foo
is noise and base
is your repository base)
Then suppose we have two tags
http://svn.example.org/foo/base/group/module/tag/abc1
http://svn.example.org/foo/base/group/module/tag/abc2
where is abc2
based on abc1
and makes some changes.
To create a view request for these changes, first, we do a diff with Subversion:
base=http://svn.example.org/foo/base/group
svn diff $base/module/tag/abc1 $base/module/tag/abc2 \
> --patch-compatible > change_xyz.diff
We can publish a diff with rbt post
, but for that we need a Subversion working directory. Enough empty:
svn co --depth=empty $base
cd group
The command rbt
needs some configuration to make it easier to maintain the username and password, can also be saved in a launch control file, for example:
cat > .reviewboardrc <<EOF REVIEWBOARD_URL = 'http://reviewboard.example.org/' REPOSITORY = 'somerepo' PASSWORD = 'einsfueralles' USERNAME = 'juser' EOF
When publishing, diff rbt
resolves relative paths in the diff file to the working directory, so we need to add the missing parts with the option --basedir
:
rbt post --diff-filename ../change_xyz.diff --basedir module/tag
If everything works fine, rbt
downloads the diff and referenced files into a new draft and prints the new urls, e.g .:
http://reviewboard.example.org/r/23/
http://reviewboard.example.org/r/23/diff/
The draft can then be edited and finally published via the web interface. The command rbt post
also has several options to add additional data (for example --summary
, --description
) and / or publish it directly (see --publish
).
source to share