[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: SVN keyword replacement

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Tue, 19 Feb 2019 14:09:02 -0500

Mark Phippard wrote on Tue, 19 Feb 2019 18:30 +00:00:
> One idea that occurred to me would be adding a new value of %W that is
> similar to %P except the path is relative to the root of the working
> copy. Assuming that is generally the root of your project, such as
> /trunk this would give the sort of path you desire. I do not know if
> there would be any general objections to a value that varied so easily
> based on something as arbitrary as the working copy root though. That
> said, given that keywords are only expanded in the working copy it does
> not seem unreasonable to hand this decision over to the user.

I'm not a fan of this. The working copy root can be either above or
below the usual/customary level for creating the tag: when rolling a
Subversion release my wcroot may be ^/subversion,
^/subversion/branches/1.11.x, or
^/subversion/branches/1.11.x/tools/dist. Ultimately, it's a random
environmental value, like ~/.subversion/config settings. Any workflow
that diffs these files using anything other 'svn diff' — for example, diff(1)
or rsync — is going to run into the differences. (For example, our release

There were discussions of this back in 2011/2012, for example, about
recursing upwards to the nearest path-wise ancestor that has an
svn:branchroot=yes property set, or the nearest path-wise ancestor that
is a copyfrom-wise descendant of trunk (i.e., has the same node-id as
trunk's noderev). [1] This has the advantage that the keyword will be
expanded in the same way in all working copies, and even in
mod_dav_svn [2].

Cheers,

Daniel

https://svn.haxx.se/dev/archive-2012-07/0168.shtml
(message-id 4CE3F25B-E509-4743-B839-7D60C1797303_at_snakebite.org)

[2] https://subversion.apache.org/docs/release-notes/1.8#davkeywordexpansion
(we need a search engine for our release notes...)
Received on 2019-02-19 20:09:15 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.