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

Re: From a cvs user... about revisions

From: Les Mikesell <lesmikesell_at_gmail.com>
Date: Sun, 11 Oct 2009 12:03:22 -0500

Harry Putnam wrote:
>>> Unlike CVS which assigns a revision number to a file, SVN assigns a
>> revision number to the whole repository.
>
> Yeah I got that part... that is the source of my misgivings.

Conceptually, the difference is just that the HEAD number advances for every
change in the repository, not separately for each file so there are jumps in the
numbers where a specific file was changed. But normally you either want the
latest or you have some reason to know the version that you do want.

>> Use the 'svn log <file>" command to show the history of the <file>
>> and you will see the specific revision numbers, just use that in the SVN
>> command
>
>> Here is a live snippet of one log of one of my files
>>
>> ------------------------------------------------------------------------
>> r4195 | pfarrell | 2009-10-07 00:30:03 -0400 (Wed, 07 Oct 2009) | 1 line
>>
>> create Pat private branch
>> ------------------------------------------------------------------------
>> r4024 | pfarrell | 2009-10-01 02:02:04 -0400 (Thu, 01 Oct 2009) | 2 lines
>>
>> use safeForwardToView()
>>
>> ------------------------------------------------------------------------
>> r3990 | pfarrell | 2009-09-29 14:29:16 -0400 (Tue, 29 Sep 2009) | 3 lines
>>
>> add subdirectory 'closed/' to urls that we expect to access when logged in.
>>
>
>> so if you want revision -r 3990, that's the one to use
>
> Thanks ... good info. It appears that you may have actually made log
> entries during commit... if you hadn't would it still be easy to find a
> change?

It's never easy if you have a large number of choices that may be in branches or
perhaps renamed earlier copies. That's the point of the log...

> I ask because during my cvs usage... I often commit without typing a
> log comment. It can work because I'm the only user... and will often
> be committing something I think is insignificant. But sometimes I'll
> want to look up one of those `insignificant' changes, and will know it
> was within a few commits ago or etc, so can call the revision straightaway.
>
> I might say cvs status path/file,,, to see current rev number.. then
>
> cvs diff -r N.N path/file to examine differences or
>
> cvs co -p -r N.N path/file > ~/file
>
> To get the actual revised file on STDOUT and redirect for a thorough
> examination.

Things like that don't work well on groups of files even in CVS (or at all on
renamed files). Normally in CVS you would use tags to identify things you want
to recall (because you have to in order to keep groups of files together) and
you can do that in svn as well even though the concept is a bit different. With
tags, you can use your own revision number/name concepts and ignore the
repository scheme.

> I guess maybe all the same things or similar things would be available
> in subversion... but the book makes it sound as if you wouldn't be
> able to associate specific changes with specific number of revisions
> back... since other revisions not effecting the file of interest might
> have occurred.

You can, but you'll waste a lot of time if you have to hunt backwards for
something you don't know much about. You might like viewvc (a web browsing
interface that works with both cvs and svn) for that kind of use. Adding a log
message during commits will make it much easier, though.

-- 
   Les Mikesell
    lesmikesell_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2406404
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-10-11 19:04:17 CEST

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