You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Rob Oxspring <ro...@imapmail.org> on 2003/10/16 12:00:17 UTC

log vs log

Is there a rationale behind different results for running "svn log" against
a working copy verses the "equivelant" url?  I've long been happily using
"svn log ." to find what changes have happened *within* the current
directory and have just twigged that instead of that, it's quite reasonably
showing the changes that happened *to* the current directory.

I was pretty sure that I'd been able to answer the question in the past so
figured that I needed to supply the --recursive option, but this isn't
accepted by the log command.  After reading the output of "svn log --help" I
realised that I needed the url version of the command and now I have the
information I wanted.

Having got the information out, I'm still a little confused as to the
reasoning behind the distinction.  I would have thought that each should be
as recursive as the other and that the --recursive / --non-recursive (or in
future --depth) option should make the difference.

Will add an enhancment request if people think its sensible,

Thanks,

Rob (starting to ponder whether mixed rev working copies might be part of
the issue...)


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

Re: log vs log

Posted by "C. Michael Pilato" <cm...@collab.net>.
"Rob Oxspring" <ro...@imapmail.org> writes:

> Is there a rationale behind different results for running "svn log" against
> a working copy verses the "equivelant" url?  I've long been happily using
> "svn log ." to find what changes have happened *within* the current
> directory and have just twigged that instead of that, it's quite reasonably
> showing the changes that happened *to* the current directory.

Anytime you run 'svn log WCPATH', that gets translated under-the-hood into
'svn log -rBASE url-of-WCPATH'.  So the state of your working copy (as
far as what revision of the target you have) definitely does play a
role in how 'svn log' works.

> I was pretty sure that I'd been able to answer the question in the past so
> figured that I needed to supply the --recursive option, but this isn't
> accepted by the log command.  After reading the output of "svn log --help" I
> realised that I needed the url version of the command and now I have the
> information I wanted.

Log is always recursive.  I wonder what distinctions you were seeing
between the WCPATH and URL versions of the commandline... ?


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

Re: log vs log

Posted by Philip Martin <ph...@codematters.co.uk>.
"Rob Oxspring" <ro...@imapmail.org> writes:

> Is there a rationale behind different results for running "svn log" against
> a working copy verses the "equivelant" url?  I've long been happily using
> "svn log ." to find what changes have happened *within* the current
> directory and have just twigged that instead of that, it's quite reasonably
> showing the changes that happened *to* the current directory.

The difference between 'svn log path' and 'svn log URL' is that if no
revision arguments are given path targets default to BASE:1 while URL
targets default to HEAD:1.  This difference is deliberate, although I
don't recall the rationale.

We ought to document this behaviour in the 'svn log --help' text.

> Rob (starting to ponder whether mixed rev working copies might be part of
> the issue...)

Yes.

-- 
Philip Martin

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

Re: log vs log

Posted by Rob Oxspring <ro...@imapmail.org>.
----- Original Message ----- 
From: "Julian Foad" <ju...@btopenworld.com>
To: "Rob Oxspring" <ro...@imapmail.org>
Cc: <de...@subversion.tigris.org>
Sent: Thursday, October 16, 2003 3:05 PM
Subject: Re: log <wc> vs log <url>


 > Rob Oxspring wrote:
> > Is there a rationale behind different results for running "svn log"
against
> > a working copy verses the "equivelant" url?  I've long been happily
using
> > "svn log ." to find what changes have happened *within* the current
> > directory and have just twigged that instead of that, it's quite
reasonably
> > showing the changes that happened *to* the current directory.
>
> Both forms of "log" are inherently recursive.  There is no non-recursive
option.
> The only difference I can think of is that "svn log URL" logs up to the
HEAD
> revision if you don't specify a revision, and "svn log WC-PATH" logs up to
the
> BASE revision of the WC-PATH.  Ah, perhaps that's what is catching you: if
you
> have modified stuff inside the WC-PATH but have not done an "svn update"
on
> WC-PATH itself, then the log up to the BASE revision of WC-PATH will not
be
> showing the changes inside the directory because they happened more
recently
> than BASE.

Thanks Julian - you've hit the nail on the head.  I hadn't done a full
update for a little while and so, for the directory at least, BASE and HEAD
had drifted enough to confuse me.  Obviously I'd agree with Philip that
wc@BASE vs url@HEAD should be made clear in the --help text but I'll leave
it to you guys to figure if/how/where to document it.

Thanks all, keep up the good work,

Rob


>
>
> Try "svn log -rHEAD:1 ."
>
> - Julian
>


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

Re: log vs log

Posted by Julian Foad <ju...@btopenworld.com>.
Rob Oxspring wrote:
> Is there a rationale behind different results for running "svn log" against
> a working copy verses the "equivelant" url?  I've long been happily using
> "svn log ." to find what changes have happened *within* the current
> directory and have just twigged that instead of that, it's quite reasonably
> showing the changes that happened *to* the current directory.

Both forms of "log" are inherently recursive.  There is no non-recursive option.  The only difference I can think of is that "svn log URL" logs up to the HEAD revision if you don't specify a revision, and "svn log WC-PATH" logs up to the BASE revision of the WC-PATH.  Ah, perhaps that's what is catching you: if you have modified stuff inside the WC-PATH but have not done an "svn update" on WC-PATH itself, then the log up to the BASE revision of WC-PATH will not be showing the changes inside the directory because they happened more recently than BASE.

Try "svn log -rHEAD:1 ."

- Julian

> 
> I was pretty sure that I'd been able to answer the question in the past so
> figured that I needed to supply the --recursive option, but this isn't
> accepted by the log command.  After reading the output of "svn log --help" I
> realised that I needed the url version of the command and now I have the
> information I wanted.
> 
> Having got the information out, I'm still a little confused as to the
> reasoning behind the distinction.  I would have thought that each should be
> as recursive as the other and that the --recursive / --non-recursive (or in
> future --depth) option should make the difference.
> 
> Will add an enhancment request if people think its sensible,
> 
> Thanks,
> 
> Rob (starting to ponder whether mixed rev working copies might be part of
> the issue...)


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