Ph. Jolidon
Ph. Jolidon

Reputation: 1

TortoiseSVN : Propagating user informations in the Commit message

We wrote an C# .NET 4.6 application that uses Tortoise v1.8.10 as client and VisualSVN v3.3.1 as server.

Several users share the same machine. They log on the machine using a common Windows domain account since not all users may have their own domain account (temp users, external clients, ..).

For this reason we developed a built-in User Management System that uses its own username & password database to check the users permissions.

The VisualSVN server is configured to use both the Basic and the Integrated Windows Authentication mode.

Because of the Windows Integrated Authentication mode the username of the common Windows account is used to protocol a commit request.

We want instead that our own username be used for such commit requests or, at least, that we may tell Tortoise per program to use it in the log message.

Does anybody have a solution for this problem ?

I've seen in a later post: If you want to fix the authorship of your commits, you can use the svn propset --reveprop command to set the svn:author revision property for a particular revision. You'll have to enable the pre-revprop-change.sh hook because the default is to disallow revision property changes.

How may I get the revision number of the commit since I started TortoiseProc.exe in a separate process ?

How may I enable this hook on the server's side ?

Thanks, Phil.

Upvotes: 0

Views: 102

Answers (1)

Lazy Badger
Lazy Badger

Reputation: 97355

Use The Right Things (tm) in The Right Way (tm)

  • TortoiseProc (GUI-tool, which require user-intervention for pressing buttons, selecting options etc.) is at least funny choice - because non-interactive fully automated CLI preferred in most case
  • You can (have?) to store in each commit in some default conventional location (directory-root of commit tree may be good candidate) Well, SVN Book prompts me to use --with-revprop option for commit instead of directory-property as more natural way custom SVN-property, which holds "good username" of committer and extract and apply value in this property in post-commit hook for replacement of not good Domain Username.
  • Read SVN Book about hooks in common and specially about pre-revprop-change hook, check and modify|rename default pre-revprop-change.tmpl, which is created in every SVN-repository along with other hooks templates

Upvotes: 2

Related Questions