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

Re: file/dir checkout within subversion...+ possible bug

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-08-26 16:20:16 CEST

On Wed, 2004-08-25 at 16:18, Andrew Barber wrote:

> 24:/tmp/foo>svn copy -r HEAD $FOO_REPO/trunk/xos_xossim.h xos_xossim.h
>
> 25:/tmp/foo>svn status
> A + xos_xossim.h

Your copy command created a new file, and scheduled it for addition.
The only difference between your copy command and 'touch foo; svn add
foo', is that your schedule-add file has some history attached to it.
The plus sign means it's a 'copy', or an 'add with history'.

>
> 26:/tmp/foo>svn update -r 50000 xos_xossim.h
> At revision 50000.

I'm surprised this worked... I would have expected an error. I don't
think I've ever seen anyone try to backdate a schedule-add file before!
What's the use case for that?

>
> 27:/tmp/foo>svn status -v xos_xossim.h
> A + - 55717 jmlewis1 xos_xossim.h
>
> 28:/tmp/foo>svn info xos_xossim.h
> Path: xos_xossim.h
> Name: xos_xossim.h
> URL: file:///u/abarber/SVN_ROOT/tags/test2/xos_xossim.h
> Revision: 0
> Node Kind: file
> Schedule: add
> Copied From URL: file:///u/abarber/SVN_ROOT/trunk/xos_xossim.h
> Copied From Rev: 56640
> Last Changed Author: joe1
> Last Changed Rev: 55717
> Last Changed Date: 2004-06-02 17:18:43 -0400 (Wed, 02 Jun 2004)
> Text Last Updated: 2004-08-25 16:47:11 -0400 (Wed, 25 Aug 2004)
> Properties Last Updated: 2004-08-25 16:47:11 -0400 (Wed, 25 Aug 2004)
> Checksum: ae3d054de5b556a46e2463e2976cfc97
>
> Now the WC seems to not know from what revision this file came from .
> Shouldn't info and status -v return 50000 or 56640? It seems that
> doesn't quite restore the file to the previous state. If I edit the
> file I found that status didn't return an M status for it, it still said A.

Ah, interesting. It looks like the 'svn up -r50000' command didn't
error, but it didn't do anything either. The file is scheduled for
addition, which means it has no working-revision in the working copy.
Why? Because it doesn't exist in the repository yet.

As for the display issue: it's possible to have a file that is
schedule-add and locally modified at the same time. But long, long ago,
we decided that printing 'A' has precedence over printing 'M'. There's
only one column to show letters, so we had to choose precedence. Have
no fear, though: when you commit, your file will be created in the
repository by copying from the (Copied-from-URL, Copied-from-rev), and
then your local edits will be transmitted on top of that. So everything
is working expected.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Aug 26 16:21:19 2004

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