Is there a way to set subversion properties on a git repository that was created by git-svn?
In my case, I want to edit the version of svn:external
, svn:ignore
and svn:executable
.
However, the only way to do so seems to involve a check-out with the subversion client. Is there a way to edit svn properties without having to check out the repository twice (one time for git and one time with svn for the properties)?
git-svn is a specialized tool for Git users to interact with Git repositories. It works by providing a Git frontend to an SVN backend. With git-svn, you use Git commands on the local repository, so it's just like using normal Git. However, behind the scenes, the relevant SVN commands are sent to the server.
It totally works. you have check the use svn repository and possibly specify username so it prompts for password.... but it works.
They are stored in the svn:log property. You can add the --revprop flag to the various property commands to view & edit this property.
Note: git 2.3.0 (February 2015) supports proset with git svn
.
See commit 83c9433 by Alfred Perlstein (splbio
):
git-svn
: support forgit-svn propset
This change allows
git-svn
to support setting subversion properties.It is useful for manually setting properties when committing to a subversion repo that requires properties to be set without requiring moving your changeset to separate subversion checkout in order to set props.
There is a nit to point out: the code does not support adding props unless there are also content changes to the files as well.
This is demonstrated in the testcase.
So, as seen in t/t9148-git-svn-propset.sh
, this now works:
git svn propset "$1" "$2" "$file" # like git svn propset "svn:keywords" "FreeBSD=%H" "foo"
git-svn
does not support Subversion properties. When I run into this problem, I usually end up having two checkouts.
This is mentioned in the git-svn
documentation under BUGS:
We ignore all SVN properties except svn:executable. Any unhandled properties are logged to
$GIT_DIR/svn/<refname>/unhandled.log
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With