Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is $Id$ sometimes not expanded in SVN?

Tags:

svn

I'm working on a project in which we're actively using the $Id$ string generated by subversion to write the version number in the documentation. For example, we parse this string

$Id: filename 999 2009-02-23 22:51:29Z author $

and print "999" in the documentation titlepage.

But every now and then, after a commit, the information is removed and we're left with just

$Id$ 

This obviously breaks things a little. Does anyone know why it might be happening?


Okay, the obvious answer was correct; svn:keywords weren't set for that file any more. But I swear they used to be! Any idea how/why svn:keywords would have been cleared from a file without anyone noticing/doing anything on purpose?

like image 254
Will Robertson Avatar asked Feb 23 '09 23:02

Will Robertson


People also ask

How do I find the size of a directory in SVN?

You can use the XML mode of the Subversion list command and sum over the file size. Using such an XPath processor on a repository with many files may yield high memory usage because tools like xmllint (that uses libxml2) often construct the complete document tree in memory before starting to sum over the elements.

What is SVN Propset?

Description. Set PROPNAME to PROPVAL on files, directories, or revisions. The first example creates a versioned, local property change in the working copy, and the second creates an unversioned, remote property change on a repository revision ( TARGET determines only which repository to access). Tip.


1 Answers

The svn:keywords property may not be properly set on that file. You need to set it to (at least) 'Id':

svn ps svn:keywords 'Id' filename.txt
like image 190
Sean Bright Avatar answered Oct 21 '22 15:10

Sean Bright