CVS users section

C. Michael Pilato cmpilato at red-bean.com
Mon Apr 6 15:56:27 CDT 2009


Trenton D. Adams wrote:
> Hi Guys,
> 
> There's one hurdle that I just haven't seemed to be able to get over,
> when switching from CVS to SVN.  When I do an "svn log" on a local copy,
> with no arguments, I expect to see the logs for that entire tree, and all
> the files in it.  This was CVS behaviour.
>
> Personally, I think this is a regression in SVN, when compared with CVS.
> But, at the least, I would highly recommend adding something about it to
> the book.

I'm not seeing what you see when I compare 'cvs log' with 'svn log'.

Let's assume I have a src tree in CVS like so:

   /project
      /src
         /includes
         /library
      /www

I checkout my "project" module, creating a working copy named "project".  If
I 'cd' into project/ and run 'cvs log', yes, I see all the history the files
in and under "project".  If I 'cd' some more, say, into src/library and run
'cvs log' again, I see only logs for files in and under "library".

Now, let's port the example to Subversion, where I have the same
in-repository tree, except that it lives under a /trunk top-level directory.
 I checkout my working copy of /trunk/project to "project", 'cd project',
and 'svn log'.  What do I see?   I see (as expected, and as in CVS) logs for
all the files and directories in and under /trunk/project.  If I 'cd' again
into src/library and repeat the 'svn log' (or just type 'svn log
src/library'), I see (again, as expected, and as in CVS) the logs for files
and directories in and under "library".

Now, there are two differences that might be affecting how you view this:

  * 'cvs log' will show changes on the main line and all tags and branches;
    'svn log' will not (because branches and tags have their own distinct
    repository locations in Subversion).

  * 'cvs log' always shows the latest changes; 'svn log' will only show
    you (by default) the logs *as of the current revision of your working
    copy directory*.  (But you can override this default by using
    'svn log . at HEAD' .)

As far as I can recall, but both of these facts are documented in the book.

> Also, there's a few other issues with log information.  In CVS, I only
> ever had to do a log command on the local copy, to get the log
> information.  Now, with SVN, you have to use the remote repository URL,
> such as "svn log svn+ssh://somehost/home/svn/repo/blah_project", to get
> all of the logs for that project.  Again, I think that's a regression,
> but it should probably be mentioned in the book.

Sorry, but as reported, this isn't true.  I would encourage you to hop over
to users at subversion.tigris.org and see how your understanding of 'svn log'
compares with reality.  Maybe you are hitting one of the common traps that
new Subversion users tend to fall into?  If you find that you are, please
report back here with what you learn, and we can see about pointing out
those traps a little more clearly in the book.

Thanks!

-- 
C. Michael Pilato <cmpilato at red-bean.com> | http://cmpilato.blogspot.com/




More information about the svnbook-dev mailing list