No announcement yet.

Changing svn:author from username in a commit hook script

  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing svn:author from username in a commit hook script

    I'm trying to determine if it's possible to modify the author of a commit in a hook so that if it matches one of a list of usernames, it will set the name to their role. For example, if my username is dillja and I'm configuration management, I'd like to set it to 'cm'. The reason is that there are several people who share the same role, so I'd like to intercept the user of the commit and replace it. As staff changes, it becomes difficult to determine which commits are performed by 'cm'.

    dillja -> cm
    johnsond -> cm
    washingtong -> cm

    If that works, then the next step would be to allow cm and only cm users to make commits to a particular branch (either hardcoded or some kind of regex). We're trying to enforce some process over who can commit to what branch.

    Anybody run across this issue before? Would prefer Windows batch if you have any ideas to try.

    John D.

  • #2
    Honestly, I wouldn't change the "author" - I'd add a property to the commit that contained the role. Cheers.