You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Grant Edwards <gr...@visi.com> on 2008/07/10 16:51:03 UTC

How to get a "recursive" log?

According to the svn book:

  Shows log messages from the repository. If no arguments are
  supplied, svn log shows the log messages for all files and
  directories inside of (and including) the current working
  directory of your working copy.

That's sure not how it seems to work when I do it.  When I do
an "svn log" in a working copy, all I see are changes to the
directory itself.  If I do "svn info" and then do an "svn log"
on the URL returned by the "info" command, I see logs for "all
files and directories inside of" of the URL.

How do I get a log for all changes made to a working tree
without having to do an "svn log" on each and every file and
directory?
  
-- 
Grant Edwards                   grante             Yow! And furthermore,
                                  at               my bowling average is
                               visi.com            unimpeachable!!!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to get a "recursive" log?

Posted by Blair Zajac <bl...@orcaware.com>.
Grant Edwards wrote:
> On 2008-07-10, Paul Koning <Pa...@dell.com> wrote:
> 
>> Commands in general default to the rev of whatever you point
>> to.  For example, "svn log" without rev range means the range
>> is 1 to the rev of the file or directory you specified.  If
>> you don't specify one, "." is assumed.
>>
>> So in this example, "svn log" means "svn log ." and since . is
>> at rev 12 that means "svn log . -r 1:12" (or 12:1, I forget).
>>
>> On the other hand, svn log applied to a repository default to
>> 1 through latest rev.
> 
> I think I get it.  Is that in the manual somewhere?
> 
>> In summary -- roughly speaking, svn log will show you the log
>> up to the point of you last "svn update".  If you want the
>> full log, either do an svn update, or find out the current
>> repository head rev number and specify that explicitly in the
>> svn log command.
> 
> The more I work with SVN, the less sense it seems to make. I
> did an "svn update" (which appeared to do nothing), and as you
> state, now svn log prints everything.

See these two sections which should help clarify this:

http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.in-action.mixedrevs
http://svnbook.red-bean.com/en/1.4/svn.tour.history.html

Regards,
Blair


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to get a "recursive" log?

Posted by Grant Edwards <gr...@visi.com>.
On 2008-07-10, Paul Koning <Pa...@dell.com> wrote:

> Commands in general default to the rev of whatever you point
> to.  For example, "svn log" without rev range means the range
> is 1 to the rev of the file or directory you specified.  If
> you don't specify one, "." is assumed.
>
> So in this example, "svn log" means "svn log ." and since . is
> at rev 12 that means "svn log . -r 1:12" (or 12:1, I forget).
>
> On the other hand, svn log applied to a repository default to
> 1 through latest rev.

I think I get it.  Is that in the manual somewhere?

> In summary -- roughly speaking, svn log will show you the log
> up to the point of you last "svn update".  If you want the
> full log, either do an svn update, or find out the current
> repository head rev number and specify that explicitly in the
> svn log command.

The more I work with SVN, the less sense it seems to make. I
did an "svn update" (which appeared to do nothing), and as you
state, now svn log prints everything.

-- 
Grant Edwards                   grante             Yow! In Newark the
                                  at               laundromats are open 24
                               visi.com            hours a day!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to get a "recursive" log?

Posted by Paul Koning <Pa...@dell.com>.
>>>>> "Grant" == Grant Edwards <gr...@visi.com> writes:

 Grant> On 2008-07-10, Erik Huelsmann <eh...@gmail.com> wrote:
 >>>> Shows log messages from the repository. If no arguments are
 >>>> supplied, svn log shows the log messages for all files and
 >>>> directories inside of (and including) the current working
 >>>> directory of your working copy.
 >>>> 
 >>>> That's sure not how it seems to work when I do it.  When I do an
 >>>> "svn log" in a working copy, all I see are changes to the
 >>>> directory itself.
 >>>  Perhaps I'm misunderstanding what the phrase "inside of" means
 >>> in this context.  [What _does_ it mean in this context?]
 >>  Could you provide a script which shows the problem?

 Grant> See below.  I've truncated the output from that last "svn log"
 Grant> command, since it was quite long (as it should have been).

 >> (BTW: I think you're experiencing the consequences of 'mixed
 >> revision working copies'.)

 Grant> Sorry, I've no clue what that means.

The other day I pointed out that each file in a working directory has
an associated revision number -- that's the revision number
corresponding to the content of that file.  If you commit a change to
one file, that one file's rev number is updated, but the rest still
reflect the last checkout or update.

So suppose you have this sequence:

   svn co <foo>
   checked out rev 12
   ...
   svn co bar.txt
   committed rev 18

File bar.txt is now marked as rev 18 in your w.d. but the rest of the
w.d. is at rev 12.  (If you do "svn update" it will all be at rev 18,
or above if other commits have happened.)

Finally...

Commands in general default to the rev of whatever you point to.  For
example, "svn log" without rev range means the range is 1 to the rev
of the file or directory you specified.  If you don't specify one, "."
is assumed.

So in this example, "svn log" means "svn log ." and since . is at rev
12 that means "svn log . -r 1:12" (or 12:1, I forget).

On the other hand, svn log applied to a repository default to 1
through latest rev.

In summary -- roughly speaking, svn log will show you the log up to
the point of you last "svn update".  If you want the full log, either
do an svn update, or find out the current repository head rev number
and specify that explicitly in the svn log command.

    paul


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to get a "recursive" log?

Posted by Grant Edwards <gr...@visi.com>.
On 2008-07-10, Erik Huelsmann <eh...@gmail.com> wrote:

>>>   Shows log messages from the repository. If no arguments are
>>>   supplied, svn log shows the log messages for all files and
>>>   directories inside of (and including) the current working
>>>   directory of your working copy.
>>>
>>> That's sure not how it seems to work when I do it.  When I do
>>> an "svn log" in a working copy, all I see are changes to the
>>> directory itself.
>>
>> Perhaps I'm misunderstanding what the phrase "inside of" means
>> in this context.  [What _does_ it mean in this context?]
>
> Could you provide a script which shows the problem?

See below.   I've truncated the output from that last "svn log"
command, since it was quite long (as it should have been).

> (BTW: I think you're experiencing the consequences of 'mixed
> revision working copies'.)

Sorry, I've no clue what that means.





------------------------------8<------------------------------
$ svn info
Path: .
URL: svn://lnxdb/devicemaster/ecos/ecosapps/branches/MatrixSSL
Repository Root: svn://lnxdb/devicemaster
Repository UUID: 11e97225-5210-0410-b87b-0f6ef07e6056
Revision: 2091
Node Kind: directory
Schedule: normal
Last Changed Author: grante
Last Changed Rev: 2091
Last Changed Date: 2008-05-31 13:57:37 -0500 (Sat, 31 May 2008)


$ svn log --stop-on-copy
------------------------------------------------------------------------
r2091 | grante | 2008-05-31 13:57:37 -0500 (Sat, 31 May 2008) | 6 lines


Create new branch in which to work on MatrixSSL/SSH support.
Old branch is either broken in svn or triggers a bug in the svn
command line client.


------------------------------------------------------------------------


$ svn log --stop-on-copy svn://lnxdb/devicemaster/ecos/ecosapps/branches/MatrixSSL
------------------------------------------------------------------------
r2183 | grante | 2008-07-07 11:07:19 -0500 (Mon, 07 Jul 2008) | 2 lines

alpha 12

------------------------------------------------------------------------
r2182 | grante | 2008-07-07 11:06:59 -0500 (Mon, 07 Jul 2008) | 6 lines

Add code to verify uploaded key/cert files before storing them
in flash.

Fix potential memory leak in matrixDhReadMem() routine.


------------------------------------------------------------------------
r2180 | grante | 2008-07-02 22:31:24 -0500 (Wed, 02 Jul 2008) | 2 lines

version bump

------------------------------------------------------------------------
r2179 | grante | 2008-07-02 22:30:39 -0500 (Wed, 02 Jul 2008) | 4 lines

Changed %hd conversion specifers to %d in EMAIL_CONFIG READ
handler.  %hd was printing garbage.

[...]
------------------------------8<------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to get a "recursive" log?

Posted by Erik Huelsmann <eh...@gmail.com>.
On Thu, Jul 10, 2008 at 6:59 PM, Grant Edwards <gr...@visi.com> wrote:
> On 2008-07-10, Grant Edwards <gr...@visi.com> wrote:
>> According to the svn book:
>>
>>   Shows log messages from the repository. If no arguments are
>>   supplied, svn log shows the log messages for all files and
>>   directories inside of (and including) the current working
>>   directory of your working copy.
>>
>> That's sure not how it seems to work when I do it.  When I do
>> an "svn log" in a working copy, all I see are changes to the
>> directory itself.
>
> Perhaps I'm misunderstanding what the phrase "inside of" means
> in this context.  [What _does_ it mean in this context?]

Could you provide a script which shows the problem? (BTW: I think
you're experiencing the consequences of 'mixed revision working
copies'.)

Bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to get a "recursive" log?

Posted by Grant Edwards <gr...@visi.com>.
On 2008-07-10, Grant Edwards <gr...@visi.com> wrote:
> According to the svn book:
>
>   Shows log messages from the repository. If no arguments are
>   supplied, svn log shows the log messages for all files and
>   directories inside of (and including) the current working
>   directory of your working copy.
>
> That's sure not how it seems to work when I do it.  When I do
> an "svn log" in a working copy, all I see are changes to the
> directory itself.

Perhaps I'm misunderstanding what the phrase "inside of" means
in this context.  [What _does_ it mean in this context?]

-- 
Grant Edwards                   grante             Yow! LOOK!!  Sullen
                                  at               American teens wearing
                               visi.com            MADRAS shorts and "Flock of
                                                   Seagulls" HAIRCUTS!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to get a "recursive" log?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2008/7/10 Grant Edwards <gr...@visi.com>:
> According to the svn book:
>
>  Shows log messages from the repository. If no arguments are
>  supplied, svn log shows the log messages for all files and
>  directories inside of (and including) the current working
>  directory of your working copy.
>
> That's sure not how it seems to work when I do it.  When I do
> an "svn log" in a working copy, all I see are changes to the
> directory itself.  If I do "svn info" and then do an "svn log"
> on the URL returned by the "info" command, I see logs for "all
> files and directories inside of" of the URL.
>
> How do I get a log for all changes made to a working tree
> without having to do an "svn log" on each and every file and
> directory?
>
> --
> Grant Edwards
>

Returning to your first message.

IMHO, the answer is very simple, and it is where Subversion differs
from CVS.

Change to a file is always propagated to its parent directory.

Asking for the list of changes on the root of repository, you will
get the list of _all_ revisions, 1..N of the repository.

Asking at a subdirectory of it, you will get a sublist of it -- only
those revisions that occurred in that subdirectory or below it.

Asking for the list of changes on the root of a project, you will get
a list of all changes that occurred  to that project. There is no need
to ask individual files.

I also suggest you to look at the chapter "Bubble-Up Method" here:
http://subversion.tigris.org/design.html#server.fs.struct.bubble-up
I find it very impressive.

Also, try to use -v option to svn log command. It lists the paths that
were changed in the revisions that you are listing.

About specifying the revision ranges:
There do exist some keywords, used instead of revision numbers,
such as HEAD, BASE etc. There is no need to know the exact
number - use the keyword instead. Read about them in the book.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org