You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Gustavo Niemeyer <ni...@conectiva.com> on 2003/11/05 22:56:12 UTC

Unexpected output from "svn log"

Hello folks!

I was just testing "svn log", and found something strange in
the latest versions (I'm running 0.32.1). It looks like when
I do some change in the local repository, I'm unable to see
them in "svn log" until I run "svn update".

Here is an example:

[niemeyer@nebular ..apt-rpm/apt-pkg]% svnversion .
159:171
[niemeyer@nebular ..apt-rpm/apt-pkg]% svn log | head -2
------------------------------------------------------------------------
rev 159:  niemeyer | 2003-10-31 13:45:42 -0200 (Fri, 31 Oct 2003) | 3
lines
[niemeyer@nebular ..apt-rpm/apt-pkg]% svn update
At revision 171.
[niemeyer@nebular ..apt-rpm/apt-pkg]% svn log | head -2
------------------------------------------------------------------------
rev 171:  niemeyer | 2003-11-05 19:13:27 -0200 (Wed, 05 Nov 2003) | 4
lines


-- 
Gustavo Niemeyer
http://niemeyer.net

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

Re: Unexpected output from "svn log"

Posted by Branko Čibej <br...@xbc.nu>.
kfogel@collab.net wrote:

>Branko Čibej <br...@xbc.nu> writes:
>  
>
>>Your '.' directory is probably at version 159. That's where 'svn log'
>>gets its version number, if you don't give it parameters.
>>    
>>
>
>No, 'svn log' chooses a default path based on the current directory,
>but for revision it defaults to HEAD.  Try it.
>  
>
That's not how I read the following fragment from log-cmd.c:

  else if (opt_state->start_revision.kind == svn_opt_revision_unspecified)
    {
      const char *target = APR_ARRAY_IDX (targets, 0, const char *);

      /* If the first target is a URL, then we default to HEAD:1.
         Otherwise, the default is BASE:1. */
      if (svn_path_is_url (target))
        opt_state->start_revision.kind = svn_opt_revision_head;
      else
        opt_state->start_revision.kind = svn_opt_revision_base;


Defaulting to HEAD for targets in the WC would be broken, because you've
no gurantee that the path still exists in the repository.


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: Unexpected output from "svn log"

Posted by Philip Martin <ph...@codematters.co.uk>.
kfogel@collab.net writes:

> If 'svn log' expands, via the implicit-dot rule, to 'svn log .', then
> I was running it on a working copy path, and getting HEAD not BASE.

Are you using an (extremely) old client?  The BASE:1 behaviour is
documented in the help output, it appears to be implemented in the
code, and I get BASE:1 when I try it.

-- 
Philip Martin

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

Re: Unexpected output from "svn log"

Posted by kf...@collab.net.
"C. Michael Pilato" <cm...@collab.net> writes:
> Karl is really busy with Subversion work (and has been all day), so
> I'll relay to others that he admitted to me in the office today that
> there was some oops in his testing scenario which explains why he got
> different results than, well, the rest of the world. :-)

Sorry, I had a weird mailer timeout or I would have sent this myself.
Yes, please ignore my bogus claim that log defaulted to HEAD not BASE
-- pilot error, too boring to explain.  Apologies for any wasted time.

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

Re: Unexpected output from "svn log"

Posted by "C. Michael Pilato" <cm...@collab.net>.
Branko Čibej <br...@xbc.nu> writes:

> Yes, I did try it with a svn compiled from version 7646, and the log was
> _not_ anchored at HEAD, but at BASE. It makes me wonder which version
> you're using.

Karl is really busy with Subversion work (and has been all day), so
I'll relay to others that he admitted to me in the office today that
there was some oops in his testing scenario which explains why he got
different results than, well, the rest of the world. :-)

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


Re: Unexpected output from "svn log"

Posted by Branko Čibej <br...@xbc.nu>.
kfogel@collab.net wrote:

>"C. Michael Pilato" <cm...@collab.net> writes:
>  
>
>>Sorry, Karl, you're absolutely wrong on this.  Yes, for a URL, HEAD is
>>chosen, but for a working copy path, it's BASE.
>>    
>>
>
>Uh, I did test this before I ran it.
>
>I ran 'svn log' in a working copy, and it generated a log to r7646,
>yet no item in the working copy was higher than r7628.
>
>If 'svn log' expands, via the implicit-dot rule, to 'svn log .', then
>I was running it on a working copy path, and getting HEAD not BASE.
>
>Like I said in my original mail to Brane, "try it" :-).
>  
>
Yes, I did try it with a svn compiled from version 7646, and the log was
_not_ anchored at HEAD, but at BASE. It makes me wonder which version
you're using.


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: Unexpected output from "svn log"

Posted by kf...@collab.net.
"C. Michael Pilato" <cm...@collab.net> writes:
> Sorry, Karl, you're absolutely wrong on this.  Yes, for a URL, HEAD is
> chosen, but for a working copy path, it's BASE.

Uh, I did test this before I ran it.

I ran 'svn log' in a working copy, and it generated a log to r7646,
yet no item in the working copy was higher than r7628.

If 'svn log' expands, via the implicit-dot rule, to 'svn log .', then
I was running it on a working copy path, and getting HEAD not BASE.

Like I said in my original mail to Brane, "try it" :-).

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

Re: Unexpected output from "svn log"

Posted by "C. Michael Pilato" <cm...@collab.net>.
"Alon Ziv" <al...@nolaviz.org> writes:

> Isn't this one more thing that may be fixed with the same changes
> discussed for "new diff syntax"? I.e., have "svn log" also have a PEG
> revision (HEAD for a URL, BASE for a WC path), and let it use the
> (default) revision range 1:HEAD always, converting it to actual paths by
> following history?

I'll say "yes" while hand-waving about the details and complications
of really implementing such a thing.  The fact of the matter is that
we will have no way other than trial-and-error to determine if we've
chosen the wrong location for, say, HEAD, and if we get it wrong, the
operation simply *must* error out (it is *not* acceptable to change
the range to 1:PEG under-the-hood, for example).  So, sometimes you'll
get an error like "Subversion can't find /your/path@3419 in revision
4512", and sometimes you won't.

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

RE: Unexpected output from "svn log"

Posted by Alon Ziv <al...@nolaviz.org>.
Isn't this one more thing that may be fixed with the same changes
discussed for "new diff syntax"? I.e., have "svn log" also have a PEG
revision (HEAD for a URL, BASE for a WC path), and let it use the
(default) revision range 1:HEAD always, converting it to actual paths by
following history?

	-Alon Ziv

-----Original Message-----
From: cmpilato@localhost.localdomain
[mailto:cmpilato@localhost.localdomain] On Behalf Of C. Michael Pilato
Sent: Thursday, November 06, 2003 4:33 PM
To: kfogel@collab.net
Cc: Branko ?ibej; Gustavo Niemeyer; dev@subversion.tigris.org
Subject: Re: Unexpected output from "svn log"

kfogel@collab.net writes:

> Branko Čibej <br...@xbc.nu> writes:
> > Your '.' directory is probably at version 159. That's where 'svn
log'
> > gets its version number, if you don't give it parameters.
> 
> No, 'svn log' chooses a default path based on the current directory,
> but for revision it defaults to HEAD.  Try it.

Sorry, Karl, you're absolutely wrong on this.  Yes, for a URL, HEAD is
chosen, but for a working copy path, it's BASE.

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


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


Re: Unexpected output from "svn log"

Posted by "C. Michael Pilato" <cm...@collab.net>.
kfogel@collab.net writes:

> Branko Čibej <br...@xbc.nu> writes:
> > Your '.' directory is probably at version 159. That's where 'svn log'
> > gets its version number, if you don't give it parameters.
> 
> No, 'svn log' chooses a default path based on the current directory,
> but for revision it defaults to HEAD.  Try it.

Sorry, Karl, you're absolutely wrong on this.  Yes, for a URL, HEAD is
chosen, but for a working copy path, it's BASE.

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


Re: Unexpected output from "svn log"

Posted by kf...@collab.net.
Branko Čibej <br...@xbc.nu> writes:
> Your '.' directory is probably at version 159. That's where 'svn log'
> gets its version number, if you don't give it parameters.

No, 'svn log' chooses a default path based on the current directory,
but for revision it defaults to HEAD.  Try it.

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


Re: Unexpected output from "svn log"

Posted by Branko Čibej <br...@xbc.nu>.
Gustavo Niemeyer wrote:

>Hello folks!
>
>I was just testing "svn log", and found something strange in
>the latest versions (I'm running 0.32.1). It looks like when
>I do some change in the local repository, I'm unable to see
>them in "svn log" until I run "svn update".
>
>Here is an example:
>
>[niemeyer@nebular ..apt-rpm/apt-pkg]% svnversion .
>159:171
>[niemeyer@nebular ..apt-rpm/apt-pkg]% svn log | head -2
>  
>
Your '.' directory is probably at version 159. That's where 'svn log'
gets its version number, if you don't give it parameters.


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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