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

Re: Replacing only long keywords

From: Kalle Olavi Niemitalo <kon_at_iki.fi>
Date: 2005-08-18 06:48:57 CEST

Dale Hirt <dale@sbcltd.com> writes:

> Subversion only expands those keywords which you EXPLICITLY
> tell it to expand. Check the svn:keyword property on your
> document to see which keywords are expanded. You can add or
> remove whatever you wish.
>
> Please see the following in the Subversion manual:
> http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.4

The sidebar "Keywords and Spurious Differences" there states:

"Note also that we set the svn:keywords property to "Date Author"
yet the keyword anchor used the alias $LastChangedDate$ and still
expanded correctly."

It looks like Jörg Sommer would want to have a way to expand
$LastChangedRevision$ without expanding $Rev$. I think this is a
quite reasonable request, and I was actually surprised by the
current behaviour when I was hacking psvn.el to support
setting svn:keywords via checkboxes.

If this feature were added, how would one trigger it? My first
thought was to make each alias expand only if it was explicitly
listed in svn:keywords; one would have to specify "Rev" to expand
$Rev$, and "LastChangedRevision" to expand $LastChangedRevision$.
This would be simple and easy to use, but it would be an
incompatible change; repository maintainers all over the world
would have to update their svn:keywords properties before the
changed Subversion client could be used with their repositories,
and even then, keywords would not be correctly expanded in
historical revisions.

Other possibilities:

- A client-side configuration or command-line option. Not good
  because every client of the repository would need the same
  setting in order to avoid corrupting files.

- A new syntax in svn:keywords. For example, "Date" would expand
  both $Date$ and $LastChangedDate$ like it does now, but
  "$Date$" might expand only $Date$.

- An entirely new property, e.g. svn:keywords2 or
  svn:keyword-aliases.

In any case, this change would have to be coordinated with the
custom keywords patches (issue 890), of which some part has been
scheduled for Subversion 1.3.

  • application/pgp-signature attachment: stored
Received on Thu Aug 18 06:48:27 2005

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.