You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Dongsheng Song <do...@gmail.com> on 2008/12/22 06:03:07 UTC

question about 'svnversion -c'

C:\svnbook\book>svnversion -nc
57:3384M

What's '57' means ?

Dongsheng Song

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=989430

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: question about 'svnversion -c'

Posted by Rob Hubbard <ro...@softel.co.uk>.
>	From: Hari Kodungallur [mailto:hkodungallur@gmail.com] 
>	
>	
>	On Sun, Dec 21, 2008 at 11:46 PM, Ryan Schmidt
<su...@ryandesign.com> wrote:
>	
>
>		On Dec 22, 2008, at 01:43, Dongsheng Song wrote:
>		
>		> 2008/12/22 Ryan Schmidt:
>		
>		>
>		> [dongsheng@x64-linux:~/var/svn/svnbook/book]%
svnversion
>		> 3386
>		> [dongsheng@x64-linux:~/var/svn/svnbook/book]%
svnversion -c
>		> 57:3384
>		>
>		
>		
>		I am trying to figure out a reason why svnversion would
print 3386, and the same command with -c would not have 3386 in the
range. Since 3386 is the highest rev in the working copy, there must be
some file/dir in the working copy that was last changed in 3386.
>		
>		thanks,
>		-Hari

 
That would only be true if the working copy points to the whole
repository.
 
If the working copy is only of the trunk, where there are other
branches, or of only one of many projects, then there could be changes
committed to the repository that are not represented in the working
copy.
 
In the example above:
 
    $ svn log -qvr3384:3386 http://svn.red-bean.com/svnbook
 
------------------------------------------------------------------------
    r3384 | sussman | 2008-12-19 14:19:20 +0000 (Fri, 19 Dec 2008)
    Changed paths:
       M /trunk/src/en/book/ch01-fundamental-concepts.xml
       M /trunk/src/en/book/ch04-branching-and-merging.xml
 
------------------------------------------------------------------------
    r3385 | jmfelderhoff | 2008-12-21 16:45:07 +0000 (Sun, 21 Dec 2008)
    Changed paths:
       M /trunk/src/de/book/ch04-branching-and-merging.xml
 
------------------------------------------------------------------------
    r3386 | jmfelderhoff | 2008-12-21 18:28:51 +0000 (Sun, 21 Dec 2008)
    Changed paths:
       M /trunk/src/de/book/ch04-branching-and-merging.xml
 
------------------------------------------------------------------------
 
you can see that in revisions 3385 and 3386, no change was made to the
English version of the book. I'd guess that your working copy points to
<http://svn.red-bean.com/svnbook/trunk/src/en/book/>. Try the command
 
    svn info
 
to find out.
 
Rob.

________________________________________________________________
This message has been independently scanned for the Softel Group and cleared of containing viruses and other malicious data.

Powering Television Beyond the Video (TM)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=989544

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: question about 'svnversion -c'

Posted by Hari Kodungallur <hk...@gmail.com>.
On Mon, Dec 22, 2008 at 12:41 AM, Erik Huelsmann <eh...@gmail.com> wrote:

> On Mon, Dec 22, 2008 at 9:00 AM, Hari Kodungallur
> <hk...@gmail.com> wrote:
> >
> > On Sun, Dec 21, 2008 at 11:46 PM, Ryan Schmidt
> > <su...@ryandesign.com> wrote:
> >>
> >> On Dec 22, 2008, at 01:43, Dongsheng Song wrote:
> >>
> >> > 2008/12/22 Ryan Schmidt:
> >> >
> >> >> On Dec 22, 2008, at 00:03, Dongsheng Song wrote:
> >> >>
> >> >>> C:\svnbook\book>svnversion -nc
> >> >>> 57:3384M
> >> >>>
> >> >>> What's '57' means ?
> >> >>
> >> >> From "svnversion --help" I see these descriptions:
> >> >>
> >> >>  -n [--no-newline]        : do not output the trailing newline
> >> >>  -c [--committed]         : last changed rather than current
> >> >> revisions
> >> >>
> >> >> So I think this means that the least-recently-changed committed
> >> >> file in your
> >> >> working copy was last changed in revision 57, and the most-
> >> >> recently-changed
> >> >> committed file in the working copy was last changed in revision
> >> >> 3384, and
> >> >> there are also uncommitted changes somewhere in your working copy
> >> >> (that's
> >> >> the "M").
> >> >
> >> > [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion
> >> > 3386
> >> > [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion -c
> >> > 57:3384
> >> >
> >> > But from the help message:
> >> > % svnversion -help
> >> > ...
> >> > Valid options:
> >> >   -n [--no-newline]        : do not output the trailing newline
> >> >   -c [--committed]         : last changed rather than current
> >> > revisions
> >> >   -h [--help]              : display this help
> >> >   --version                : show program version information
> >> >
> >> >   -c [--committed]         : last changed rather than current
> >> > revisions
> >> >
> >> > So I think the output should be:
> >> > [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion -c
> >> > 3384
> >>
> >> Unless you actually changed each and every file in your working copy
> >> in revision 3384, I don't think that's the output you're going to see.
> >>
> >> The output you got (57:3384) seems correct to me, assuming there is a
> >> file in your working copy that was changed in revision 57 and not after.
> >>
> >
> >
> > I am trying to figure out a reason why svnversion would print 3386, and
> the
> > same command with -c would not have 3386 in the range. Since 3386 is the
> > highest rev in the working copy, there must be some file/dir in the
> working
> > copy that was last changed in 3386.
>
> Not necessarily: if another file on another branch was changed in that
> revision, then the working copy can be 3386. That would be the exact
> same working copy as with r3385 and r3384 though.
>
>
Ah, yes. I always checkout trunk and branches separately. So I should have
known.

Thanks,
-Hari

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=989878

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: question about 'svnversion -c'

Posted by Erik Huelsmann <eh...@gmail.com>.
On Mon, Dec 22, 2008 at 9:00 AM, Hari Kodungallur
<hk...@gmail.com> wrote:
>
> On Sun, Dec 21, 2008 at 11:46 PM, Ryan Schmidt
> <su...@ryandesign.com> wrote:
>>
>> On Dec 22, 2008, at 01:43, Dongsheng Song wrote:
>>
>> > 2008/12/22 Ryan Schmidt:
>> >
>> >> On Dec 22, 2008, at 00:03, Dongsheng Song wrote:
>> >>
>> >>> C:\svnbook\book>svnversion -nc
>> >>> 57:3384M
>> >>>
>> >>> What's '57' means ?
>> >>
>> >> From "svnversion --help" I see these descriptions:
>> >>
>> >>  -n [--no-newline]        : do not output the trailing newline
>> >>  -c [--committed]         : last changed rather than current
>> >> revisions
>> >>
>> >> So I think this means that the least-recently-changed committed
>> >> file in your
>> >> working copy was last changed in revision 57, and the most-
>> >> recently-changed
>> >> committed file in the working copy was last changed in revision
>> >> 3384, and
>> >> there are also uncommitted changes somewhere in your working copy
>> >> (that's
>> >> the "M").
>> >
>> > [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion
>> > 3386
>> > [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion -c
>> > 57:3384
>> >
>> > But from the help message:
>> > % svnversion -help
>> > ...
>> > Valid options:
>> >   -n [--no-newline]        : do not output the trailing newline
>> >   -c [--committed]         : last changed rather than current
>> > revisions
>> >   -h [--help]              : display this help
>> >   --version                : show program version information
>> >
>> >   -c [--committed]         : last changed rather than current
>> > revisions
>> >
>> > So I think the output should be:
>> > [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion -c
>> > 3384
>>
>> Unless you actually changed each and every file in your working copy
>> in revision 3384, I don't think that's the output you're going to see.
>>
>> The output you got (57:3384) seems correct to me, assuming there is a
>> file in your working copy that was changed in revision 57 and not after.
>>
>
>
> I am trying to figure out a reason why svnversion would print 3386, and the
> same command with -c would not have 3386 in the range. Since 3386 is the
> highest rev in the working copy, there must be some file/dir in the working
> copy that was last changed in 3386.

Not necessarily: if another file on another branch was changed in that
revision, then the working copy can be 3386. That would be the exact
same working copy as with r3385 and r3384 though.

HTH,

Erik.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=989536

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: question about 'svnversion -c'

Posted by Hari Kodungallur <hk...@gmail.com>.
On Sun, Dec 21, 2008 at 11:46 PM, Ryan Schmidt <
subversion-2008c@ryandesign.com> wrote:

> On Dec 22, 2008, at 01:43, Dongsheng Song wrote:
>
> > 2008/12/22 Ryan Schmidt:
> >
> >> On Dec 22, 2008, at 00:03, Dongsheng Song wrote:
> >>
> >>> C:\svnbook\book>svnversion -nc
> >>> 57:3384M
> >>>
> >>> What's '57' means ?
> >>
> >> From "svnversion --help" I see these descriptions:
> >>
> >>  -n [--no-newline]        : do not output the trailing newline
> >>  -c [--committed]         : last changed rather than current
> >> revisions
> >>
> >> So I think this means that the least-recently-changed committed
> >> file in your
> >> working copy was last changed in revision 57, and the most-
> >> recently-changed
> >> committed file in the working copy was last changed in revision
> >> 3384, and
> >> there are also uncommitted changes somewhere in your working copy
> >> (that's
> >> the "M").
> >
> > [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion
> > 3386
> > [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion -c
> > 57:3384
> >
> > But from the help message:
> > % svnversion -help
> > ...
> > Valid options:
> >   -n [--no-newline]        : do not output the trailing newline
> >   -c [--committed]         : last changed rather than current
> > revisions
> >   -h [--help]              : display this help
> >   --version                : show program version information
> >
> >   -c [--committed]         : last changed rather than current
> > revisions
> >
> > So I think the output should be:
> > [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion -c
> > 3384
>
> Unless you actually changed each and every file in your working copy
> in revision 3384, I don't think that's the output you're going to see.
>
> The output you got (57:3384) seems correct to me, assuming there is a
> file in your working copy that was changed in revision 57 and not after.
>
>

I am trying to figure out a reason why svnversion would print 3386, and the
same command with -c would not have 3386 in the range. Since 3386 is the
highest rev in the working copy, there must be some file/dir in the working
copy that was last changed in 3386.

thanks,
-Hari

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=989510

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: question about 'svnversion -c'

Posted by Rob Hubbard <ro...@softel.co.uk>.
> I think the '-c' output should be a single value, not a range.

I don't agree. The existing behaviour is correct, and more useful. If
you're only interested in the most recent commit value, that could be
extracted with a command such as:

	$ svnversion -c | grep --only-matching "[0-9]\+" | tail -1

(I can perhaps see an argument for having the behaviour you prefer as an
option to svnversion.)

Rob.

________________________________________________________________
This message has been independently scanned for the Softel Group and cleared of containing viruses and other malicious data.

Powering Television Beyond the Video (TM)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=989620

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: question about 'svnversion -c'

Posted by Dongsheng Song <do...@gmail.com>.
2008/12/22 Ryan Schmidt <su...@ryandesign.com>:
> On Dec 22, 2008, at 01:43, Dongsheng Song wrote:
>
>> 2008/12/22 Ryan Schmidt:
>>
>>> On Dec 22, 2008, at 00:03, Dongsheng Song wrote:
>>>
>>>> C:\svnbook\book>svnversion -nc
>>>> 57:3384M
>>>>
>>>> What's '57' means ?
>>>
>>> From "svnversion --help" I see these descriptions:
>>>
>>>  -n [--no-newline]        : do not output the trailing newline
>>>  -c [--committed]         : last changed rather than current revisions
>>>
>>> So I think this means that the least-recently-changed committed file in
>>> your
>>> working copy was last changed in revision 57, and the
>>> most-recently-changed
>>> committed file in the working copy was last changed in revision 3384, and
>>> there are also uncommitted changes somewhere in your working copy (that's
>>> the "M").
>>
>> [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion
>> 3386
>> [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion -c
>> 57:3384
>>
>> But from the help message:
>> % svnversion -help
>> ...
>> Valid options:
>>  -n [--no-newline]        : do not output the trailing newline
>>  -c [--committed]         : last changed rather than current revisions
>>  -h [--help]              : display this help
>>  --version                : show program version information
>>
>>  -c [--committed]         : last changed rather than current revisions
>>
>> So I think the output should be:
>> [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion -c
>> 3384
>
> Unless you actually changed each and every file in your working copy in
> revision 3384, I don't think that's the output you're going to see.
>
> The output you got (57:3384) seems correct to me, assuming there is a file
> in your working copy that was changed in revision 57 and not after.
>

I think the '-c' output should be a single value, not a range.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=989554

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: question about 'svnversion -c'

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Dec 22, 2008, at 01:43, Dongsheng Song wrote:

> 2008/12/22 Ryan Schmidt:
>
>> On Dec 22, 2008, at 00:03, Dongsheng Song wrote:
>>
>>> C:\svnbook\book>svnversion -nc
>>> 57:3384M
>>>
>>> What's '57' means ?
>>
>> From "svnversion --help" I see these descriptions:
>>
>>  -n [--no-newline]        : do not output the trailing newline
>>  -c [--committed]         : last changed rather than current  
>> revisions
>>
>> So I think this means that the least-recently-changed committed  
>> file in your
>> working copy was last changed in revision 57, and the most- 
>> recently-changed
>> committed file in the working copy was last changed in revision  
>> 3384, and
>> there are also uncommitted changes somewhere in your working copy  
>> (that's
>> the "M").
>
> [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion
> 3386
> [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion -c
> 57:3384
>
> But from the help message:
> % svnversion -help
> ...
> Valid options:
>   -n [--no-newline]        : do not output the trailing newline
>   -c [--committed]         : last changed rather than current  
> revisions
>   -h [--help]              : display this help
>   --version                : show program version information
>
>   -c [--committed]         : last changed rather than current  
> revisions
>
> So I think the output should be:
> [dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion -c
> 3384

Unless you actually changed each and every file in your working copy  
in revision 3384, I don't think that's the output you're going to see.

The output you got (57:3384) seems correct to me, assuming there is a  
file in your working copy that was changed in revision 57 and not after.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=989503

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: question about 'svnversion -c'

Posted by Dongsheng Song <do...@gmail.com>.
[dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion
3386
[dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion -c
57:3384

But from the help message:
% svnversion -help
...
Valid options:
  -n [--no-newline]        : do not output the trailing newline
  -c [--committed]         : last changed rather than current revisions
  -h [--help]              : display this help
  --version                : show program version information

  -c [--committed]         : last changed rather than current revisions

So I think the output should be:
[dongsheng@x64-linux:~/var/svn/svnbook/book]% svnversion -c
3384

2008/12/22 Ryan Schmidt <su...@ryandesign.com>:
> On Dec 22, 2008, at 00:03, Dongsheng Song wrote:
>
>> C:\svnbook\book>svnversion -nc
>> 57:3384M
>>
>> What's '57' means ?
>
> From "svnversion --help" I see these descriptions:
>
>  -n [--no-newline]        : do not output the trailing newline
>  -c [--committed]         : last changed rather than current revisions
>
> So I think this means that the least-recently-changed committed file in your
> working copy was last changed in revision 57, and the most-recently-changed
> committed file in the working copy was last changed in revision 3384, and
> there are also uncommitted changes somewhere in your working copy (that's
> the "M").
>
>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=989498

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: question about 'svnversion -c'

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Dec 22, 2008, at 00:03, Dongsheng Song wrote:

> C:\svnbook\book>svnversion -nc
> 57:3384M
>
> What's '57' means ?

 From "svnversion --help" I see these descriptions:

   -n [--no-newline]        : do not output the trailing newline
   -c [--committed]         : last changed rather than current revisions

So I think this means that the least-recently-changed committed file  
in your working copy was last changed in revision 57, and the most- 
recently-changed committed file in the working copy was last changed  
in revision 3384, and there are also uncommitted changes somewhere in  
your working copy (that's the "M").

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=989436

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].