Den tors 30 juli 2026 kl 12:32 skrev Sascha Kolb <[email protected]>:
> Hello, > > We are planning to change the DNS root > > So > > [email protected] > > Will become > > [email protected] > > It's there any way to translate that > > > If a user committed before the change as > [email protected] > > Can I instruct SVN to use > [email protected] for ldap authentication but still commit as > [email protected] so that the user in the SVN is not altered and > consistent? > > Something like a translation table > > > I did not find much on that. > > Thanks a lot for your help. > > If you want to change the svn:author property you can do this in a pre-commit hook. Something like this will set the author to "sid" on all woody's commits: [[[ #!/usr/bin/python import sys import svn.fs import svn.repos repo = sys.argv[1] txn_name = sys.argv[2] repo = svn.core.svn_path_canonicalize(repo) fs = svn.repos.svn_repos_fs(svn.repos.svn_repos_open(repo)) txn = svn.fs.svn_fs_open_txn(fs, txn_name) author = svn.fs.svn_fs_txn_prop(txn, b"svn:author") if author == b"woody": svn.fs.svn_fs_change_txn_prop(txn, b"svn:author", b"sid") exit(0) ]]] (The translation table is left as an exercise for the reader) Cheers, Daniel
