On Mon, Dec 18, 2017 at 8:44 AM, Branko Čibej <br...@apache.org> wrote: > On 18.12.2017 08:16, Andreas Krey wrote: >> On Sun, 17 Dec 2017 01:22:06 +0000, Branko ??ibej wrote: >> ... >>> The /path/ of the file implies which branch or tag it belongs to. There >>> is no other information you need. >> Oh yes, there is. Knowing which files are included in the tag >> is fine (and a very basic property), but I'd also like to be >> able to find out >> >> - which revision of the source tree the tag was taken of, > > Recorded as the copied-from revision. > >> - which subtree it was taken of, > > Recorded as the copied-from path. > >> - and from the other end: which is the last tag >> taken from a specific subtree. > > Ah, that one is not recorded.
Indeed, that's a well known shortcoming of the way tags are currently emulated in SVN (the emulation doesn't support looking up the list of tags a file was ever copied to, because we have no "copy-to" information). To support this, SVN would either have to record copy-to information, or add a new tag feature / concept. I just browsed to some old Subversion notes, and found this particular issue mentioned in the notes of "EuroOSCON 2005" [1]. Time flies :-) ... For making the /tags directory "write-once", most installations use some pre-commit hook. I've been using a variation of David Weintraub's excellent pre-commit-access-control-hook.pl [2]. Here you can give /tags the "add-only" permission (configured in some ini file). I've googled around a bit, and David has continued his set of Subversion hook scripts on GitHub [3], so there you can find a newer version of those scripts. [1] The bullet starting with 'Subversion has no way to answer "What branches/tags is this version of this file present in?"' in http://svn.apache.org/repos/asf/subversion/trunk/notes/EuroOSCON-2005-vc-bof.txt [2] https://svn.haxx.se/users/archive-2006-11/0564.shtml [3] https://github.com/qazwart/SVN-Precommit-Kitchen-Sink-Hook And his SVN-Watcher hook: https://github.com/qazwart/SVN-Watcher-Hook -- Johan