You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Tanaka Akira <ak...@fsij.org> on 2006/08/14 04:41:48 UTC

svn status -v

Hi.  I found a curious result of svn status -v.

1. create a repository and checkout it.

| nute% cd /tmp
| nute% rm -rf r w
| nute% svnadmin create /tmp/r
| nute% svn co file:///tmp/r w
| Checked out revision 0.
| nute% cd /tmp/w

2. create d1 and d1/f.

| nute% mkdir d1
| nute% echo 1 > d1/f
| nute% svn add d1
| A         d1
| A         d1/f
| nute% svn commit -m mesg
| Adding         d1
| Adding         d1/f
| Transmitting file data .
| Committed revision 1.

3. copy d1 to d2.

| nute% svn cp d1 d2
| A         d2
| nute% svn commit -m mesg
| Adding         d2
| 
| Committed revision 2.

4. the committed revision of d2/f is 2.

| nute% svn up
| nute% svn status -v
|                 2        2 akr          .
|                 2        1 akr          d1
|                 2        1 akr          d1/f
|                 2        2 akr          d2
|                 2        2 akr          d2/f

5. update to revision 1, and update to revision 2.

| nute% svn up -r 1
| D    d2
| Updated to revision 1.
| nute% svn up -r 2
| A    d2
| A    d2/f
| Updated to revision 2.

6. the committed revision of d2/f is 1.

| nute% svn status -v
|                 2        2 akr          .
|                 2        1 akr          d1
|                 2        1 akr          d1/f
|                 2        2 akr          d2
|                 2        1 akr          d2/f

The committed revision of d2/f is changed from 2 to 1.

Is the change is intentional?

I checked Subversion 1.2.3 from Debian, Subversion 1.3.2 and
Subversion 1.5.0-dev checkouted today.
-- 
Tanaka Akira

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

Re: svn status -v

Posted by David Glasser <gl...@mit.edu>.
On 8/18/06, Branko Čibej <br...@xbc.nu> wrote:
> Tanaka Akira wrote:
> > The last committed revision should be 2 which is the commit
> > for svn cp.
> >
> That's the last committed revision for d2. d2/f is the same object as
> d1/f, and it wasn't changed in revision 2.

So, whether or not the actual answer is "1" or "2", the original
message shows that you can get svn st -v to claim that it's *both* at
different times. That does seem buggy to me.

--dave

-- 
David Glasser | glasser@mit.edu | http://www.davidglasser.net/

Re: svn status -v

Posted by Branko Čibej <br...@xbc.nu>.
Tanaka Akira wrote:
> In article <44...@xbc.nu>,
>   Branko Čibej <br...@xbc.nu> writes:
>
>   
>> I agree it's a bit confusing, but it's not really wrong ... the last
>> "svn status" says that d2/f was last changed in revision 1, which is
>> true, because it's actually the same file as d1/f. When you committed
>> the the copy of d1 to d2, the client assumed it was creating a new d2/f,
>> but that's not what actually happens in the repository. The really
>> confusing bit is that "svn up -r1 d2/f" will complain that d2/f doesn't
>> exist in revision 1 ... but that's also true. :)
>>     
>
> I found "svn log -r COMMITTED d2/f" causes an error.
>
> nute% svn log -r COMMITTED d2/f
> svn: File not found: revision 1, path '/d2/f'
>
> I think it is a bug.
>
> The last committed revision should be 2 which is the commit
> for svn cp.
>   
That's the last committed revision for d2. d2/f is the same object as
d1/f, and it wasn't changed in revision 2.

The real question here is: do we want to expose the fact that the FS is
a DAG to users like this? I have no problem with it, but it can be
confusing, as this conversation shows.

-- Brane

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

Re: svn status -v

Posted by Tanaka Akira <ak...@fsij.org>.
In article <44...@xbc.nu>,
  Branko Čibej <br...@xbc.nu> writes:

> I agree it's a bit confusing, but it's not really wrong ... the last
> "svn status" says that d2/f was last changed in revision 1, which is
> true, because it's actually the same file as d1/f. When you committed
> the the copy of d1 to d2, the client assumed it was creating a new d2/f,
> but that's not what actually happens in the repository. The really
> confusing bit is that "svn up -r1 d2/f" will complain that d2/f doesn't
> exist in revision 1 ... but that's also true. :)

I found "svn log -r COMMITTED d2/f" causes an error.

nute% svn log -r COMMITTED d2/f
svn: File not found: revision 1, path '/d2/f'

I think it is a bug.

The last committed revision should be 2 which is the commit
for svn cp.
-- 
Tanaka Akira

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


Re: svn status -v

Posted by Branko Čibej <br...@xbc.nu>.
Tanaka Akira wrote:
> Hi.  I found a curious result of svn status -v.
>
> 1. create a repository and checkout it.
>
> | nute% cd /tmp
> | nute% rm -rf r w
> | nute% svnadmin create /tmp/r
> | nute% svn co file:///tmp/r w
> | Checked out revision 0.
> | nute% cd /tmp/w
>
> 2. create d1 and d1/f.
>
> | nute% mkdir d1
> | nute% echo 1 > d1/f
> | nute% svn add d1
> | A         d1
> | A         d1/f
> | nute% svn commit -m mesg
> | Adding         d1
> | Adding         d1/f
> | Transmitting file data .
> | Committed revision 1.
>
> 3. copy d1 to d2.
>
> | nute% svn cp d1 d2
> | A         d2
> | nute% svn commit -m mesg
> | Adding         d2
> | 
> | Committed revision 2.
>
> 4. the committed revision of d2/f is 2.
>
> | nute% svn up
> | nute% svn status -v
> |                 2        2 akr          .
> |                 2        1 akr          d1
> |                 2        1 akr          d1/f
> |                 2        2 akr          d2
> |                 2        2 akr          d2/f
>
> 5. update to revision 1, and update to revision 2.
>
> | nute% svn up -r 1
> | D    d2
> | Updated to revision 1.
> | nute% svn up -r 2
> | A    d2
> | A    d2/f
> | Updated to revision 2.
>
> 6. the committed revision of d2/f is 1.
>
> | nute% svn status -v
> |                 2        2 akr          .
> |                 2        1 akr          d1
> |                 2        1 akr          d1/f
> |                 2        2 akr          d2
> |                 2        1 akr          d2/f
>
> The committed revision of d2/f is changed from 2 to 1.
>
> Is the change is intentional?
>   

I agree it's a bit confusing, but it's not really wrong ... the last
"svn status" says that d2/f was last changed in revision 1, which is
true, because it's actually the same file as d1/f. When you committed
the the copy of d1 to d2, the client assumed it was creating a new d2/f,
but that's not what actually happens in the repository. The really
confusing bit is that "svn up -r1 d2/f" will complain that d2/f doesn't
exist in revision 1 ... but that's also true. :)

-- Brane

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