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

Re: Meaning of LastChangedRevision

From: <kfogel_at_collab.net>
Date: 2003-06-25 17:07:34 CEST

Vincent Lefevre <vincent+svn@vinc17.org> writes:
> I use the Id keyword in files and the LastChangedRevision component
> (the number after the file name) is quite strange: in general, it
> seems to be the revision where the file has changed, e.g. if the
> "current" revision is 17 and the file is committed to revision 59,
> then LastChangedRevision will be 17, not 59. But after a new checkout
> of the repository (this sometimes happens), LastChangedRevision will
> no longer be 17, but the last current revision or something like that.
>
> Wouldn't it be better if LastChangedRevision would always refer to
> the committed revision, like with RCS/CVS? At least something that
> is fixed (like the date), i.e. that doesn't depend on how or when
> the file has been checked out.

Here's what LastChangedRevision is all about:

Since revision numbers are per-tree, its possible for "the same
revision" of a file to exist across a range of revision numbers. For
example, in revision 10, you make a change to foo.c. Then in
revisions 11-20, you change other things, but not foo.c. Finally in
revision 21, you change foo.c again.

If you check out revision 15 of the tree, the $LastChangeRevision$
keyword in foo.c will say:

   $LastChangeRevision: 10 $

because the change in revision 10 gave foo.c the state it still has in
revision 15. If you check out revision 21 or higher, you'll see

   $LastChangeRevision: 21 $

...for the same reason.

> (BTW, I've been using Subversion for a few days. Thanks to all the
> developers for this wonderful software.)

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 25 17:56:55 2003

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

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