bzr-svn question?
Jelmer Vernooij
jelmer at samba.org
Fri Mar 13 23:25:17 GMT 2009
Hi Paul,
On Fri, Mar 13, 2009 at 02:02:41PM -0400, Fanelli, Paul wrote:
> You can disregard my last email. I didn't understand how the svn hooks
> work.
> Now I think I better understand what's going on. At least, some of it
> :-).
> My question is, how do you get the bzr:author property into svn via the
> bzr-svn plugin?
> I was able to get and set the svn:author property:
> 'svn propget svn:author -revprop -r xxxx' to get it, and
> 'svn propset svn:author -revprop -r xxxx pfanelli' to set
> it.
> In order for the property set to work, I had to add the following to the
> pre-revprop-change hook:
> if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:author" ]; then
> exit 0
> fi
> Now I just needed to find a place to run the svn propget and propset
> commands. So I thought that the post-commit hook would be a good place.
> I added the following to post-commit:
> BZR_AUTHOR=`/usr/local/bin/svn propget bzr:author --revprop -r "$REV"
> "$REPOS"
> /usr/local/bin/svn propset svn:author --revprop -r "$REV" "$BZR_AUTHOR"
> "$REPOS"
> Once I wrote that, I realized that I would need to get the bzr:author
> into the commit.
> So, how do you get the bzr:author into the commit?
> Is this the right way to do this?
No, there isn't a need to bother with bzr:author here. You should just
need to set the right option (override-svn-revprops = svn:author IIRC)
in ~/.bazaar/subversion.conf, see the bzr-svn FAQ for details.
Cheers,
Jelmer
--
Jelmer Vernooij <jelmer at samba.org> - http://jelmer.vernstok.nl/
00:23:12 up 19 days, 6:36, 10 users, load average: 1.77, 1.94, 2.25
More information about the bazaar
mailing list