[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: 'svn ls' not consistent with w.c. status? (1.4.3)

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-06-07 00:02:05 CEST

On Jun 6, 2007, at 16:56, Toby Thain wrote:

> On 6-Jun-07, at 6:28 PM, Ryan Schmidt wrote:
>>>> Also, to comment on Blair's point, I think even if we are to
>>>> consider mixed revisions, it is an issue. If you made the commit
>>>> from your working copy, you expect that your working copy will
>>>> reflect that commit that you made
>> The working copy does reflect the commit you just made. But the
>> "svn ls" command, as explained, shows what's in the repository,
>> not what's in your working copy, and it works by default on the
>> revision of the directory you're in when you run the command.
> That would explain what I saw. But I found it surprising enough
> that I posted here...
>>> Yes, that was also my expectation. This isn't a mixed-rev w.c.,
>>> so what I saw was at least counter-intuitive, if not actually
>>> incorrect.
>> Most working copies are mixed-revision. At the very latest, your
>> working copy became mixed-revision as soon as you committed, as I
>> explained above.
> Alright. So it's normal that running 'svn up' (which had no updates
> to bring down) would change the view of 'ls'?

Let's say the revision of your directory was r11. You committed a
file which created r12 in the repository. "svn ls" uses the revision
of the directory you're in when it queries the repository, by
default. So "svn ls" would show you info about r11 of the repository.

"svn up" will bring all elements in the directory, including the
directory, up to the HEAD revision of the repository, which, if you
haven't made any other changes, is still r12. "svn ls" will now tell
you baout revision 12 of the repository.

> After the 'svn up', is it a mixed rev w.c. or not? And what's the
> revision of . after the 'svn up'? It would still be r11, right? So
> why did ls suddenly show me something new? I'm still not clear. But
> I may just be dense.

Use "svnversion" to determine if you're in a mixed-revision working
copy. If you are, it will print more than one number.

Also try "svn info" which will show you the revision of the item on
which you ran the command, or the current directory if you did not

If you ran "svn up" at the root of your working copy, then your
entire working copy is of a single revision -- until you next commit
something. If, however, you ran "svn up" in a subdirectory of your
working copy, then everything in that subdirectory is of a single
revision, but its parent directory and any other subdirectories may
well still be of other revisions.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 7 00:02:55 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.