[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: reposurgeon now writes Subversion repositories

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 1 Dec 2012 13:15:13 +0200

Alan Barrett wrote on Sat, Dec 01, 2012 at 12:05:48 +0300:
> Perhaps it would be a good first step to add examples to the
> documentation, showing how the admin can use "Full Name <email_at_address>"
> in the svn:author field, with all the common access methods.

Server-side implementation, independent of RA method: (via brane)
[[[
#!/usr/bin/env python

import sys
from svn.repos import *
from svn.fs import *
from svn.core import SVN_PROP_REVISION_AUTHOR

FULLNAMES = {
  'danielsh': 'Daniel Shahaf',
}

reposdir, txnname = sys.argv[1:3]

repos = svn_repos_open(reposdir, None)
fs = svn_repos_fs(repos)
txn = svn_fs_open_txn(fs, txnname, None)
propval = svn_fs_txn_prop(txn, SVN_PROP_REVISION_AUTHOR, None)
svn_fs_change_txn_prop(txn, SVN_PROP_REVISION_AUTHOR,
                       FULLNAMES.get(propval, propval), None)
]]]

Alternative server-side implementation (via markphip):
[[[
AuthLDAPRemoteUserAttribute cn
]]]

Alternative server-side implementation (via breser):
[[[
command="svnserve -t --tunnel-user='Daniel Shahaf'" ssh-rsa ...
]]]

Client-side implementation (via danielsh):
[[[
[ -n "${EMAIL}" ] && svn() {
 if [ x"$1" = x"ci" ] || [ x"$1" = x"commit" ]; then
  command svn --with-revprop=svn:x-committer-email=${EMAIL} "$@"
 else
  command svn "$@"
 fi
}
]]]
Received on 2012-12-01 12:16:14 CET

This is an archived mail posted to the Subversion Dev mailing list.