Reputation: 26171
A problem with subversion is that it identifies commits only by the user name. Git for example allows a full name and an email address to be added as meta information to the commit. Some organizations require user accounts that are hard to map to persons. Some of those organizations also require the use of svn. Making this situation workable for code reviewers leads me to the following questions:
or if that is impossible,
Upvotes: 2
Views: 121
Reputation: 121
If you need to do a complex mapping of "git users" to "subversion users" with git-svn, I recommend using the --authors-prog option to "git svn clone." For example, you'd create my-complex-mapping.sh which takes the subversion user as its first argument, and then echo the "Git User " name you want git to use. Then you'd run "git svn clone --authors-prog=$HOME/my-complex-mapping.sh"
Upvotes: 1
Reputation: 8978
You may set custom revision property on any the subversion revision (see http://svnbook.red-bean.com/en/1.7/svn.advanced.props.html for details).
$ svn propset property_name property_value -r<REV> --revprop
property 'property_name' set on repository revision <REV>
This could be called in post-commit hook script (the script could have a look at the revision author, look up the short author name to resolve full author information using some mapping file, e.g. authors.txt --- see below).
Git<->SVN tranlation solutions like subgit or git-svn can also use authors.txt mapping in the following format:
shortname = Long Name <[email protected]>
anothername = Another Long Name <[email protected]>
...
Path to authors.txt file should be specified by 'core.authorsFile' config option in subgit or '--authors-file=' cli option in git-svn for every git-svn command (for git-svn --authors-file works only for SVN->Git translation, Git->SVN always creates a revision under the username with which; for subgit the option works in both directions).
Upvotes: 1