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

[Fwd: svn copy bug from working copy]

From: Cengiz Alaettinoglu <cengiz_at_packetdesign.com>
Date: 2005-03-18 02:53:27 CET

This bug report did not get much traction in the users@ mailing list.
Someone suggested I post it here.

subversion is a relief over cvs. This kind of bug is probably a corner
cases that are expected in not-yet-matured software. Here it is.

Cengiz

attached mail follows:


The following bug report is with subversion version 1.1.2 at client
running Fedora Core 3 and the server is running 1.1.1 on FreeBSD 4.10,
with an FSFS repository.

Add file foo containing 1 to the repository
  [elf tmp]$ svn mkdir $SVNROOT/bug
  [elf tmp]$ svn co $SVNROOT/bug
  [elf tmp]$ cd bug
  [elf bug]$ echo 1 > foo
  [elf bug]$ svn add foo
  [elf bug]$ svn commit

Check this out to a different directory

  [elf bug]$ cd ..
  [elf tmp]$ svn co $SVNROOT/bug bug-copy2
  [elf tmp]$ cd bug-copy2/
  [elf bug-copy2]$ ls
  foo
  [elf bug-copy2]$ cat foo
  1

Modify the file and commit

  [elf bug-copy2]$ echo 3 > foo
  [elf bug-copy2]$ svn commit

Go to the original copy and modify there also

  [elf bug-copy2]$ cd ../bug
  [elf bug]$ echo 5 > foo

We are not ready to commit these changes to the trunk, make a branch for
them

  [elf bug]$ svn copy . $SVNROOT/bug-branch

Check out the branch

  [elf bug]$ cd ..
  [elf tmp]$ svn co $SVNROOT/bug-branch
  [elf tmp]$ cd bug-branch/
  [elf bug-branch]$ ls
  foo
  [elf bug-branch]$ cat foo
  5

foo on trunk contained 1 and then 3. But foo on the branch contained 1
and
then 5 (never had a version containing 3). But below diff -r 23647 says
otherwise.

  [elf bug-branch]$ svn log foo

------------------------------------------------------------------------
  r23648 | cengiz | 2005-03-07 21:26:15 -0800 (Mon, 07 Mar 2005) | 2
lines

  Create a branch.

------------------------------------------------------------------------
  r23646 | cengiz | 2005-03-07 21:20:40 -0800 (Mon, 07 Mar 2005) | 2
lines

  Foo contains 1.

------------------------------------------------------------------------
  [elf bug-branch]$ svn diff -r 23648
  [elf bug-branch]$ svn diff -r 23647
  Index: foo
  ===================================================================
  --- foo (.../bug) (revision 23647)
  +++ foo (.../bug-branch) (working copy)
  @@ -1 +1 @@
  -3
  +5
  [elf bug-branch]$ svn diff -r 23646
  Index: foo
  ===================================================================
  --- foo (.../bug) (revision 23646)
  +++ foo (.../bug-branch) (working copy)
  @@ -1 +1 @@
  -1
  +5

I can speculate that when copying the branch svn made a copy from
the HEAD of trunk instead of from the BASE version of the working
directory.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 21 15:10:46 2005

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

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