> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2012c_at_ryandesign.com]
> Sent: 05 December 2013 09:29
>
> On Dec 5, 2013, at 03:23, Cooke, Mark wrote:
>
> >> Note that "bare" svnversion can give a range as well:
> >>
> >> % svnversion -c ~srv/conf
> >> 105:143
> >> % svnversion ~srv/conf
> >> 142:143
> >
> > Understood, however for my example I get a different "sort"
> > of answer with(out) `-c` on all my WCs (including an
> > unmodified fresh checkout), without `-c` gave a single
> > revision, with `-c` always gives a range. That seems to me
> > to be inconsistent (even wrong):
>
> The output makes sense to me:
>
> > {{{
> > D:\PROJECTS\Support\Code>svn --version
> > svn, version 1.7.10 (r1485443)
> > compiled Jun 1 2013, 07:40:50
> > <snip>
> >
> > D:\PROJECTS\Support\Code>svn up .
> > Updating '.':
> > At revision 638.
> >
> > D:\PROJECTS\Support\Code>svnversion .
> > 638
>
> This means that all the items in this working copy are "at"
> revision 638, i.e. you ran "svn up -r 638" (or just "svn up"
> if 638 is the HEAD revision). It means this is not a
> mixed-revision working copy, and that none of the items were
> in a modified state, which can be good to know.
>
>
> > D:\PROJECTS\Support\Code>svnversion . -c
> > 235:635
> > }}}
>
> This means the least recently changed item in this working
> copy was changed in revision 235 and the most recently
> changed item was changed in revision 635.
Ok, I agree that makes sense (and is even consistent with an interpretation of the help text). But is it what a user would want to know? I wanted just the most recent committed version, I wonder if that is too specific? ...I can get it by parsing the output using `-c`. What would you ever want to know the earliest commited revision for?
Basically, `-c` will always give you a range as soon as any file has been added/modified/deleted after the initial commit.
Seeing as this is long established output I would not propose changing the output of `-c`. I think (a) the help text could be expanded for the `-c` option and (b) a new option for just the "most recent commit" would be useful. Both should still use the `MSP` postfixes too.
A) the current behaviour contradicts the headling "single number for fully updated WC" description:
{{{
Note that the -c option will almost always return a range, it is a rare working copy to have had only one commit or to update all files at the same time.
}}}
B) useful for adding this WC's most-recent-commit revision to version info:
{{{
-m [--most-recent-commit] : report the most recent change revision only
}}}
Does anyone agree? Is this worth a ticket?
~ mark c
Received on 2013-12-05 11:15:26 CET