Implementing a pre commit dialog using tsvn:userdirproperties

1

2

As part of TortoiseSVN 1.8+ we can now use both tsvn:userfileproperties and tsvn:userdirproperties containing a newline separated list of custom properties.

You can also specify whether a custom dialog is used to add/edit your property. TortoiseSVN offers four different dialogs, depending on the type of your property.

Unfortunately, I've been unable to find a working example of how to set these properties.

I've set tsvn:userdirproperties to the following value:

my:build_trigger=state;Do you want to trigger a manifest build or flush the caches?(Skip;0;Rebuild;1;Build & Flush;2)

However no dialog is ever shown after any commits.

See TortoiseSVN documentation for incomplete examples.

svandragt

Posted 2014-01-20T15:37:22.863

Reputation: 2 933

Answers

1

You misunderstood usage of tsvn: custom properties and editors

  1. Custom property works as any other Subversion property: it's just additional attribute with some data, stored in repository
  2. Custom editor invoked only and if "Edit" button pressed in properties window of TortoiseSVN interface

Also, you can't change any data, associated with transaction (and properties is part of transaction-data) in pre-commit hook. You can only get value of property (svnlook pg), which have to be defined before

Lazy Badger

Posted 2014-01-20T15:37:22.863

Reputation: 3 557