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

Running "svn log" on directories

From: Chuan-kai Lin <linchuan_at_cse.ogi.edu>
Date: 2004-02-18 01:42:27 CET

Greetings all,

I have been puzzled by the behavior of "svn log" when it is run on
directories. It took me a while to figure out what really happened,
and I thought perhaps some of you can enlighten me on why things are
designed the way they are now.

I am now using r8509. One day I wanted to get a summary of all the
changes of the project to date, so I typed

  svn log foo

where foo is a local directory containing the checked-out project.
svn promptly printed out the log for revision 1 (r1) and nothing else.
I figured that perhaps svn is only printing the log entries of the
directory itself but not of the entire directory tree, so I tried

  svn log -R foo

and of course this does not work either. Reading the help message and
the options listing does not help much, so I gave up.

And just this afternoon, when reading through the Subversion book, I
noticed (again!) that the default "svn log" revision range for local
path is BASE:1, so I tried this:

  svn log -r HEAD:1 foo

and all the logs (of changes of files in the directory) showed up.
Somehow the default revision range issue never occurred to me as
relevant when I read the help text. Problem solved.

Now, why is the default revision range BASE:1 instead of HEAD:1?
Apparently "svn log" is designed to work recursively when given a
directory argument, and in that case HEAD:1 seems to be a much more
reasonable choice. Committing files in the directory does not change
the BASE value of the directory itself, and I cannot see why would
anyone want the log of all the changes of all the files in the
directory but only those no later than the last-change date of the
directory itself.

For nonrecursive operation, BASE:1 makes sense.

For recursive operation, HEAD:1 makes more sense because BASE of the
directory can be very different from BASE of the entire directory tree.

So am I missing anything obvious on why BASE:1 is a better choice?

-- 
Chuan-kai Lin
http://www.cse.ogi.edu/~linchuan/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 18 02:00:48 2004

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.