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

tree-conflicts: A java conflict.

From: Neels J. Hofmeyr <neels_at_elego.de>
Date: Thu, 20 Nov 2008 05:07:42 +0100

Hi tree-conflicts fans,

I've gotten around to writing an example of a Java refactoring sucked from
my fingers. I intuitively picked a rather bad case...

- The "diff --summarize" problem shows, because there are changes at
different directory levels.

- The missing move information problem shows, because the destinations of
the move are just added without reflecting text changes during the move.
Instead, it takes one side's changes and silently discards the other's.

- Three out of five variants give undesired/complex results.

Attached are the script itself and the output transcripts of the five
variants within, using trunk r34276.

[[[
for i in 1 2 3 4 5; do \
./java-refactor.sh.txt $i 2>&1 | tee java_variant${i}.txt; \
done
]]]

I think this is a very good case to illustrate what is missing and why. But
before I forward this to the dark side I'd like it reviewed, possibly
extended by better resolving, e.g. successfully reinstate theirs-full. And
maybe we should first implement the URL_at_REV information for tree-conflicts,
better illustrating resolve attempts.

Thanks,
~Neels

#!/bin/bash

## GENERIC PREPARATIONS

if [ -f /usr/local/bin/superpower ]; then
  # use my local way if my script is there (neels).
  echo "##### REMEMBER TO SETUP YOUR ENVIRONMENT #####"
else
  # the rest of the world:

  
  # The next line is the only line you should need to adjust.
  SVNDIR=/my/svn/trunk
  
  alias svn=${SVNDIR}/subversion/svn/svn
  alias svnserve=${SVNDIR}/subversion/svnserve/svnserve
  alias svnadmin=${SVNDIR}/subversion/svnadmin/svnadmin
fi

svn --version

# Select an access method. If svn://, the svnserve setup is
# handled automagically by this script; but if http://, then
# you'll have to configure it yourself first.
#
# URL=http://localhost/neels/repos
# URL=svn://localhost/repos
URL=file:///`pwd`/repos

rm -rf repos wc

svnadmin create repos

# These are for svnserve only.
echo "[general]" > repos/conf/svnserve.conf
echo "anon-access = write" >> repos/conf/svnserve.conf
echo "auth-access = write" >> repos/conf/svnserve.conf

# The server will only be contacted if $URL is svn://foo, of course.
svnserve --pid-file svnserve-pid -d -r `pwd`
# And put the kill command in a file, in case need to run it manually.
echo "kill -9 `cat svnserve-pid`" > k
chmod a+rwx k

svn co -q ${URL} wc

set -x
cd wc

## ACTUAL TEST

# Original Java package (entirely fictional).

mkdir -p trunk/com/yoyodyne/gui
cat > trunk/com/yoyodyne/gui/Labels.java <<END
package com.yoyodyne.gui;

public static class Labels {

    public static final String TITLE = "Yoyodyne Gadget";

}
END

cat > trunk/com/yoyodyne/gui/MainWindow.java <<END
package com.yoyodyne.gui;

import org.gtk.*;

public class MainWindow extends GtkWindow {

    public MainWindow(){
        this.setTitle(Labels.TITLE);
    }

}
END

svn add trunk
svn ci -m "commit original package"

# Someone branches it.
svn cp trunk branch
svn up .

# Now, there is conflicting development on trunk and branch.
# trunk: change the overall package name.
svn mv trunk/com/yoyodyne trunk/com/dynaco

cat > trunk/com/dynaco/gui/Labels.java <<END
package com.dynaco.gui;

public static class Labels {

    public static final String TITLE = "Dynaco Gadget";

}
END

cat > trunk/com/dynaco/gui/MainWindow.java <<END
package com.dynaco.gui;

import org.gtk.*;

public class MainWindow extends GtkWindow {

    public MainWindow(){
        this.setTitle(Labels.TITLE);
    }

}
END

svn ci -m "committing yoyodyne->dynaco on trunk" trunk

# branch: The Labels class is moved to another sub-package.
svn mkdir branch/com/yoyodyne/lang

svn mv branch/com/yoyodyne/gui/Labels.java branch/com/yoyodyne/lang/

cat > branch/com/yoyodyne/lang/Labels.java <<END
package com.yoyodyne.lang;

public static class Labels {

    public static final String TITLE = "Yoyodyne Gadget";

}
END

cat > branch/com/yoyodyne/gui/MainWindow.java <<END
package com.yoyodyne.gui;

import com.yoyodyne.lang.*;

import org.gtk.*;

public class MainWindow extends GtkWindow {

    public MainWindow(){
        this.setTitle(Labels.TITLE);
    }

}
END

svn ci -m "committing Labels.java=>lang on branch" branch

# So the conflicting changes are now in the repository, one on trunk,
# one on branch. Now, a developer guy wants to merge to trunk. He tries
# a couple of different approaches, the "variants":

# If this script is invoked with an argument, use it to indicate
# which variant to run.
variant=$1
if [ -z "$variant" ]; then
  variant=1
fi

if [ $variant = "1" ]; then
  echo "---- variant one, get branch up-to-date with trunk."
  svn merge $URL/trunk branch/
  # Fails to show any tree-conflics.
  # This should fail because the merge tries to delete com/yoyodyne
  # but that is not the same com/yoyodyne that was originally deleted
  # anymore. The branch modified it. We'd need to call diff to tell us
  # whether branch/com/yoyodyne and trunk/com/yoyodyne_at_1 are any different,
  # but diff needs fixing.
fi

if [ $variant = "2" ]; then
  echo "---- variant two, get subdir of branch up-to-date with trunk."
  svn merge $URL/trunk/com/dynaco branch/com/yoyodyne
  # reports a tree-conflict on branch/com/yoyodyne/gui/Labels.java,
  # because the branch moved it away to lang/Labels.java while trunk
  # wants to edit it.
  svn st
  svn info branch/com/yoyodyne/gui/Labels.java
  svn ci -m m
  # Commit fails. Good.
  svn resolve --accept=working branch/com/yoyodyne/gui/Labels.java
  svn st
  svn diff
  # This looks good. We've gotten all information available,
  # the resolve works.
fi

if [ $variant = "3" ]; then
  echo "---- variant three, merge branch to trunk as-is."
  svn merge $URL/branch trunk/
  # reports a tree-conflict on trunk/com/yoyodyne.
  svn st
  svn info trunk/com/yoyodyne
  svn ci -m m
  # Commit fails. Good.
  svn resolve --accept=working trunk/com/yoyodyne
  svn st
  svn diff
  # Ok, the conflict marker is gone. We said the current working
  # copy is what we want to keep, so this worked out.
fi

if [ $variant = "4" ]; then
  echo "---- variant four, merge branch to trunk as-is, accept theirs."
  svn merge $URL/branch trunk/
  # reports a tree-conflict on trunk/com/yoyodyne.
  svn st
  svn info trunk/com/yoyodyne
  svn ci -m m
  # Commit fails. Good.
  svn resolve --accept=theirs-full trunk/com/yoyodyne
  svn st
  svn diff
  # Hey, wait a minute, this does exactly the same as --accept=working.
  # That's not what we want here.
fi

if [ $variant = "5" ]; then
  echo "---- variant five, merge branch to trunk as-is, subdir only."
  svn merge $URL/branch/com/yoyodyne trunk/com/dynaco
  # reports a tree-conflict on trunk/com/dynaco/gui/Labels.java.
  # A new .../lang/Labels.java was added without comment.
  svn st
  svn info trunk/com/dynaco/gui/Labels.java
  svn ci -m m
  # Commit fails. Good.
  svn resolve --accept=working trunk/com/dynaco/gui/Labels.java
  svn st
  svn diff
  echo "---"
  cat trunk/com/dynaco/lang/Labels.java
  # Hm. We said --accept=working, and in doing so we agreed on deleting
  # our gui/Labels.java. A new lang/Labels.java was added, but we might
  # not see that that's related.
  # What's good: The change from the branch was brought in.
  # The new trunk/com/dynaco/lang/Labels.java is still saying
  # "package com.yoyodyne.lang.*;", which needs a local edit. Also,
  # the constant TITLE was (technically) reverted back to saying
  # "Yoyodyne" instead of "Dynaco" on current trunk. But there is
  # no conflict marker or anything that tells me about those.
  # This can't be fixed without proper move information in Subversion.
fi

## ACTUAL TEST ENDS
echo "====="
cd ..

./k

##### REMEMBER TO SETUP YOUR ENVIRONMENT #####
svn, version 1.6.0 (dev build)
   compiled Nov 20 2008, 03:19:10

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

+ cd wc
+ mkdir -p trunk/com/yoyodyne/gui
+ cat
+ cat
+ svn add trunk
A trunk
A trunk/com
A trunk/com/yoyodyne
A trunk/com/yoyodyne/gui
A trunk/com/yoyodyne/gui/Labels.java
A trunk/com/yoyodyne/gui/MainWindow.java
+ svn ci -m 'commit original package'
Adding trunk
Adding trunk/com
Adding trunk/com/yoyodyne
Adding trunk/com/yoyodyne/gui
Adding trunk/com/yoyodyne/gui/Labels.java
Adding trunk/com/yoyodyne/gui/MainWindow.java
Transmitting file data ..
Committed revision 1.
+ svn cp trunk branch
A branch
+ svn up .
At revision 1.
+ svn mv trunk/com/yoyodyne trunk/com/dynaco
A trunk/com/dynaco
D trunk/com/yoyodyne/gui/Labels.java
D trunk/com/yoyodyne/gui/MainWindow.java
D trunk/com/yoyodyne/gui
D trunk/com/yoyodyne
+ cat
+ cat
+ svn ci -m 'committing yoyodyne->dynaco on trunk' trunk
Adding trunk/com/dynaco
Sending trunk/com/dynaco/gui/Labels.java
Sending trunk/com/dynaco/gui/MainWindow.java
Deleting trunk/com/yoyodyne
Transmitting file data ..
Committed revision 2.
+ svn mkdir branch/com/yoyodyne/lang
A branch/com/yoyodyne/lang
+ svn mv branch/com/yoyodyne/gui/Labels.java branch/com/yoyodyne/lang/
A branch/com/yoyodyne/lang/Labels.java
D branch/com/yoyodyne/gui/Labels.java
+ cat
+ cat
+ svn ci -m 'committing Labels.java=>lang on branch' branch
Adding branch
Deleting branch/com/yoyodyne/gui/Labels.java
Sending branch/com/yoyodyne/gui/MainWindow.java
Adding branch/com/yoyodyne/lang
Adding branch/com/yoyodyne/lang/Labels.java
Transmitting file data ..
Committed revision 3.
+ variant=1
+ '[' -z 1 ']'
+ '[' 1 = 1 ']'
+ echo '---- variant one, get branch up-to-date with trunk.'
---- variant one, get branch up-to-date with trunk.
+ svn merge file:////arch/hg/svn-tc/test/repos/trunk branch/
--- Merging r2 through r3 into 'branch':
A branch/com/dynaco
A branch/com/dynaco/gui
A branch/com/dynaco/gui/Labels.java
A branch/com/dynaco/gui/MainWindow.java
D branch/com/yoyodyne
+ '[' 1 = 2 ']'
+ '[' 1 = 3 ']'
+ '[' 1 = 4 ']'
+ '[' 1 = 5 ']'
+ echo =====
=====
+ cd ..
+ ./k

##### REMEMBER TO SETUP YOUR ENVIRONMENT #####
svn, version 1.6.0 (dev build)
   compiled Nov 20 2008, 03:19:10

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

+ cd wc
+ mkdir -p trunk/com/yoyodyne/gui
+ cat
+ cat
+ svn add trunk
A trunk
A trunk/com
A trunk/com/yoyodyne
A trunk/com/yoyodyne/gui
A trunk/com/yoyodyne/gui/Labels.java
A trunk/com/yoyodyne/gui/MainWindow.java
+ svn ci -m 'commit original package'
Adding trunk
Adding trunk/com
Adding trunk/com/yoyodyne
Adding trunk/com/yoyodyne/gui
Adding trunk/com/yoyodyne/gui/Labels.java
Adding trunk/com/yoyodyne/gui/MainWindow.java
Transmitting file data ..
Committed revision 1.
+ svn cp trunk branch
A branch
+ svn up .
At revision 1.
+ svn mv trunk/com/yoyodyne trunk/com/dynaco
A trunk/com/dynaco
D trunk/com/yoyodyne/gui/Labels.java
D trunk/com/yoyodyne/gui/MainWindow.java
D trunk/com/yoyodyne/gui
D trunk/com/yoyodyne
+ cat
+ cat
+ svn ci -m 'committing yoyodyne->dynaco on trunk' trunk
Adding trunk/com/dynaco
Sending trunk/com/dynaco/gui/Labels.java
Sending trunk/com/dynaco/gui/MainWindow.java
Deleting trunk/com/yoyodyne
Transmitting file data ..
Committed revision 2.
+ svn mkdir branch/com/yoyodyne/lang
A branch/com/yoyodyne/lang
+ svn mv branch/com/yoyodyne/gui/Labels.java branch/com/yoyodyne/lang/
A branch/com/yoyodyne/lang/Labels.java
D branch/com/yoyodyne/gui/Labels.java
+ cat
+ cat
+ svn ci -m 'committing Labels.java=>lang on branch' branch
Adding branch
Deleting branch/com/yoyodyne/gui/Labels.java
Sending branch/com/yoyodyne/gui/MainWindow.java
Adding branch/com/yoyodyne/lang
Adding branch/com/yoyodyne/lang/Labels.java
Transmitting file data ..
Committed revision 3.
+ variant=2
+ '[' -z 2 ']'
+ '[' 2 = 1 ']'
+ '[' 2 = 2 ']'
+ echo '---- variant two, get subdir of branch up-to-date with trunk.'
---- variant two, get subdir of branch up-to-date with trunk.
+ svn merge file:////arch/hg/svn-tc/test/repos/trunk/com/dynaco branch/com/yoyodyne
--- Merging r2 through r3 into 'branch/com/yoyodyne':
   C branch/com/yoyodyne/gui/Labels.java
U branch/com/yoyodyne/gui/MainWindow.java
Summary of conflicts:
  Tree conflicts: 1
+ svn st
 M branch/com/yoyodyne
! C branch/com/yoyodyne/gui/Labels.java
M branch/com/yoyodyne/gui/MainWindow.java
+ svn info branch/com/yoyodyne/gui/Labels.java
Path: branch/com/yoyodyne/gui/Labels.java
Name: Labels.java
Node Kind: none
Tree conflict:
  The merge attempted to edit 'Labels.java'.
'Labels.java' does not exist locally. Maybe you renamed it? Or has it been
renamed in the history of the branch you are merging into?

+ svn ci -m m
subversion/libsvn_client/commit.c:860: (apr_err=155015)
svn: Commit failed (details follow):
subversion/libsvn_client/commit_util.c:288: (apr_err=155015)
svn: Aborting commit: '/arch/hg/svn-tc/test/wc/branch/com/yoyodyne/gui/Labels.java' remains in conflict
+ svn resolve --accept=working branch/com/yoyodyne/gui/Labels.java
Resolved conflicted state of 'branch/com/yoyodyne/gui/Labels.java'
+ svn st
 M branch/com/yoyodyne
M branch/com/yoyodyne/gui/MainWindow.java
+ svn diff

Property changes on: branch/com/yoyodyne
___________________________________________________________________
Added: svn:mergeinfo
   Merged /trunk/com/dynaco:r2-3

Index: branch/com/yoyodyne/gui/MainWindow.java
===================================================================
--- branch/com/yoyodyne/gui/MainWindow.java (revision 3)
+++ branch/com/yoyodyne/gui/MainWindow.java (working copy)
@@ -1,4 +1,4 @@
-package com.yoyodyne.gui;
+package com.dynaco.gui;
 
 import com.yoyodyne.lang.*;
 
+ '[' 2 = 3 ']'
+ '[' 2 = 4 ']'
+ '[' 2 = 5 ']'
+ echo =====
=====
+ cd ..
+ ./k

##### REMEMBER TO SETUP YOUR ENVIRONMENT #####
svn, version 1.6.0 (dev build)
   compiled Nov 20 2008, 03:19:10

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

+ cd wc
+ mkdir -p trunk/com/yoyodyne/gui
+ cat
+ cat
+ svn add trunk
A trunk
A trunk/com
A trunk/com/yoyodyne
A trunk/com/yoyodyne/gui
A trunk/com/yoyodyne/gui/Labels.java
A trunk/com/yoyodyne/gui/MainWindow.java
+ svn ci -m 'commit original package'
Adding trunk
Adding trunk/com
Adding trunk/com/yoyodyne
Adding trunk/com/yoyodyne/gui
Adding trunk/com/yoyodyne/gui/Labels.java
Adding trunk/com/yoyodyne/gui/MainWindow.java
Transmitting file data ..
Committed revision 1.
+ svn cp trunk branch
A branch
+ svn up .
At revision 1.
+ svn mv trunk/com/yoyodyne trunk/com/dynaco
A trunk/com/dynaco
D trunk/com/yoyodyne/gui/Labels.java
D trunk/com/yoyodyne/gui/MainWindow.java
D trunk/com/yoyodyne/gui
D trunk/com/yoyodyne
+ cat
+ cat
+ svn ci -m 'committing yoyodyne->dynaco on trunk' trunk
Adding trunk/com/dynaco
Sending trunk/com/dynaco/gui/Labels.java
Sending trunk/com/dynaco/gui/MainWindow.java
Deleting trunk/com/yoyodyne
Transmitting file data ..
Committed revision 2.
+ svn mkdir branch/com/yoyodyne/lang
A branch/com/yoyodyne/lang
+ svn mv branch/com/yoyodyne/gui/Labels.java branch/com/yoyodyne/lang/
A branch/com/yoyodyne/lang/Labels.java
D branch/com/yoyodyne/gui/Labels.java
+ cat
+ cat
+ svn ci -m 'committing Labels.java=>lang on branch' branch
Adding branch
Deleting branch/com/yoyodyne/gui/Labels.java
Sending branch/com/yoyodyne/gui/MainWindow.java
Adding branch/com/yoyodyne/lang
Adding branch/com/yoyodyne/lang/Labels.java
Transmitting file data ..
Committed revision 3.
+ variant=3
+ '[' -z 3 ']'
+ '[' 3 = 1 ']'
+ '[' 3 = 2 ']'
+ '[' 3 = 3 ']'
+ echo '---- variant three, merge branch to trunk as-is.'
---- variant three, merge branch to trunk as-is.
+ svn merge file:////arch/hg/svn-tc/test/repos/branch trunk/
--- Merging r2 through r3 into 'trunk':
   C trunk/com/yoyodyne
Summary of conflicts:
  Tree conflicts: 1
+ svn st
 M trunk
! C trunk/com/yoyodyne
+ svn info trunk/com/yoyodyne
Path: trunk/com/yoyodyne
Name: yoyodyne
Node Kind: none
Tree conflict:
  The merge attempted to edit 'yoyodyne'.
  You have deleted 'yoyodyne' locally.
  Maybe you renamed it?

+ svn ci -m m
subversion/libsvn_client/commit.c:860: (apr_err=155015)
svn: Commit failed (details follow):
subversion/libsvn_client/commit_util.c:288: (apr_err=155015)
svn: Aborting commit: '/arch/hg/svn-tc/test/wc/trunk/com/yoyodyne' remains in conflict
+ svn resolve --accept=working trunk/com/yoyodyne
Resolved conflicted state of 'trunk/com/yoyodyne'
+ svn st
 M trunk
+ svn diff

Property changes on: trunk
___________________________________________________________________
Added: svn:mergeinfo
   Merged /branch:r2-3

+ '[' 3 = 4 ']'
+ '[' 3 = 5 ']'
+ echo =====
=====
+ cd ..
+ ./k

##### REMEMBER TO SETUP YOUR ENVIRONMENT #####
svn, version 1.6.0 (dev build)
   compiled Nov 20 2008, 03:19:10

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

+ cd wc
+ mkdir -p trunk/com/yoyodyne/gui
+ cat
+ cat
+ svn add trunk
A trunk
A trunk/com
A trunk/com/yoyodyne
A trunk/com/yoyodyne/gui
A trunk/com/yoyodyne/gui/Labels.java
A trunk/com/yoyodyne/gui/MainWindow.java
+ svn ci -m 'commit original package'
Adding trunk
Adding trunk/com
Adding trunk/com/yoyodyne
Adding trunk/com/yoyodyne/gui
Adding trunk/com/yoyodyne/gui/Labels.java
Adding trunk/com/yoyodyne/gui/MainWindow.java
Transmitting file data ..
Committed revision 1.
+ svn cp trunk branch
A branch
+ svn up .
At revision 1.
+ svn mv trunk/com/yoyodyne trunk/com/dynaco
A trunk/com/dynaco
D trunk/com/yoyodyne/gui/Labels.java
D trunk/com/yoyodyne/gui/MainWindow.java
D trunk/com/yoyodyne/gui
D trunk/com/yoyodyne
+ cat
+ cat
+ svn ci -m 'committing yoyodyne->dynaco on trunk' trunk
Adding trunk/com/dynaco
Sending trunk/com/dynaco/gui/Labels.java
Sending trunk/com/dynaco/gui/MainWindow.java
Deleting trunk/com/yoyodyne
Transmitting file data ..
Committed revision 2.
+ svn mkdir branch/com/yoyodyne/lang
A branch/com/yoyodyne/lang
+ svn mv branch/com/yoyodyne/gui/Labels.java branch/com/yoyodyne/lang/
A branch/com/yoyodyne/lang/Labels.java
D branch/com/yoyodyne/gui/Labels.java
+ cat
+ cat
+ svn ci -m 'committing Labels.java=>lang on branch' branch
Adding branch
Deleting branch/com/yoyodyne/gui/Labels.java
Sending branch/com/yoyodyne/gui/MainWindow.java
Adding branch/com/yoyodyne/lang
Adding branch/com/yoyodyne/lang/Labels.java
Transmitting file data ..
Committed revision 3.
+ variant=4
+ '[' -z 4 ']'
+ '[' 4 = 1 ']'
+ '[' 4 = 2 ']'
+ '[' 4 = 3 ']'
+ '[' 4 = 4 ']'
+ echo '---- variant four, merge branch to trunk as-is, accept theirs.'
---- variant four, merge branch to trunk as-is, accept theirs.
+ svn merge file:////arch/hg/svn-tc/test/repos/branch trunk/
--- Merging r2 through r3 into 'trunk':
   C trunk/com/yoyodyne
Summary of conflicts:
  Tree conflicts: 1
+ svn st
 M trunk
! C trunk/com/yoyodyne
+ svn info trunk/com/yoyodyne
Path: trunk/com/yoyodyne
Name: yoyodyne
Node Kind: none
Tree conflict:
  The merge attempted to edit 'yoyodyne'.
  You have deleted 'yoyodyne' locally.
  Maybe you renamed it?

+ svn ci -m m
subversion/libsvn_client/commit.c:860: (apr_err=155015)
svn: Commit failed (details follow):
subversion/libsvn_client/commit_util.c:288: (apr_err=155015)
svn: Aborting commit: '/arch/hg/svn-tc/test/wc/trunk/com/yoyodyne' remains in conflict
+ svn resolve --accept=theirs-full trunk/com/yoyodyne
Resolved conflicted state of 'trunk/com/yoyodyne'
+ svn st
 M trunk
+ svn diff

Property changes on: trunk
___________________________________________________________________
Added: svn:mergeinfo
   Merged /branch:r2-3

+ '[' 4 = 5 ']'
+ echo =====
=====
+ cd ..
+ ./k

##### REMEMBER TO SETUP YOUR ENVIRONMENT #####
svn, version 1.6.0 (dev build)
   compiled Nov 20 2008, 03:19:10

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

+ cd wc
+ mkdir -p trunk/com/yoyodyne/gui
+ cat
+ cat
+ svn add trunk
A trunk
A trunk/com
A trunk/com/yoyodyne
A trunk/com/yoyodyne/gui
A trunk/com/yoyodyne/gui/Labels.java
A trunk/com/yoyodyne/gui/MainWindow.java
+ svn ci -m 'commit original package'
Adding trunk
Adding trunk/com
Adding trunk/com/yoyodyne
Adding trunk/com/yoyodyne/gui
Adding trunk/com/yoyodyne/gui/Labels.java
Adding trunk/com/yoyodyne/gui/MainWindow.java
Transmitting file data ..
Committed revision 1.
+ svn cp trunk branch
A branch
+ svn up .
At revision 1.
+ svn mv trunk/com/yoyodyne trunk/com/dynaco
A trunk/com/dynaco
D trunk/com/yoyodyne/gui/Labels.java
D trunk/com/yoyodyne/gui/MainWindow.java
D trunk/com/yoyodyne/gui
D trunk/com/yoyodyne
+ cat
+ cat
+ svn ci -m 'committing yoyodyne->dynaco on trunk' trunk
Adding trunk/com/dynaco
Sending trunk/com/dynaco/gui/Labels.java
Sending trunk/com/dynaco/gui/MainWindow.java
Deleting trunk/com/yoyodyne
Transmitting file data ..
Committed revision 2.
+ svn mkdir branch/com/yoyodyne/lang
A branch/com/yoyodyne/lang
+ svn mv branch/com/yoyodyne/gui/Labels.java branch/com/yoyodyne/lang/
A branch/com/yoyodyne/lang/Labels.java
D branch/com/yoyodyne/gui/Labels.java
+ cat
+ cat
+ svn ci -m 'committing Labels.java=>lang on branch' branch
Adding branch
Deleting branch/com/yoyodyne/gui/Labels.java
Sending branch/com/yoyodyne/gui/MainWindow.java
Adding branch/com/yoyodyne/lang
Adding branch/com/yoyodyne/lang/Labels.java
Transmitting file data ..
Committed revision 3.
+ variant=5
+ '[' -z 5 ']'
+ '[' 5 = 1 ']'
+ '[' 5 = 2 ']'
+ '[' 5 = 3 ']'
+ '[' 5 = 4 ']'
+ '[' 5 = 5 ']'
+ echo '---- variant five, merge branch to trunk as-is, subdir only.'
---- variant five, merge branch to trunk as-is, subdir only.
+ svn merge file:////arch/hg/svn-tc/test/repos/branch/com/yoyodyne trunk/com/dynaco
--- Merging r2 through r3 into 'trunk/com/dynaco':
A trunk/com/dynaco/lang
A trunk/com/dynaco/lang/Labels.java
U trunk/com/dynaco/gui/MainWindow.java
   C trunk/com/dynaco/gui/Labels.java
Summary of conflicts:
  Tree conflicts: 1
+ svn st
 M trunk/com/dynaco
A + trunk/com/dynaco/lang
A + trunk/com/dynaco/lang/Labels.java
      C trunk/com/dynaco/gui/Labels.java
M trunk/com/dynaco/gui/MainWindow.java
+ svn info trunk/com/dynaco/gui/Labels.java
Path: trunk/com/dynaco/gui/Labels.java
Name: Labels.java
URL: file:///arch/hg/svn-tc/test/repos/trunk/com/dynaco/gui/Labels.java
Repository Root: file:///arch/hg/svn-tc/test/repos
Repository UUID: fda69c94-b6b7-11dd-a671-4f146145028d
Revision: 2
Node Kind: file
Schedule: normal
Last Changed Author: neels
Last Changed Rev: 2
Last Changed Date: 2008-11-20 05:02:09 +0100 (Thu, 20 Nov 2008)
Text Last Updated: 2008-11-20 05:02:09 +0100 (Thu, 20 Nov 2008)
Checksum: 0533d07a7319b3e9669fa7323046b62b
Tree conflict:
  The merge attempted to delete 'Labels.java',
  or attempted to rename it.
Either you have edited 'Labels.java' locally, or it has been edited in the
history of the branch you are merging into, but those edits are not
present on the branch you are merging from.

+ svn ci -m m
subversion/libsvn_client/commit.c:860: (apr_err=155015)
svn: Commit failed (details follow):
subversion/libsvn_client/commit_util.c:288: (apr_err=155015)
svn: Aborting commit: '/arch/hg/svn-tc/test/wc/trunk/com/dynaco/gui/Labels.java' remains in conflict
+ svn resolve --accept=working trunk/com/dynaco/gui/Labels.java
Resolved conflicted state of 'trunk/com/dynaco/gui/Labels.java'
+ svn st
 M trunk/com/dynaco
A + trunk/com/dynaco/lang
A + trunk/com/dynaco/lang/Labels.java
M trunk/com/dynaco/gui/MainWindow.java
+ svn diff

Property changes on: trunk/com/dynaco
___________________________________________________________________
Added: svn:mergeinfo
   Merged /branch/com/yoyodyne:r2-3

Index: trunk/com/dynaco/gui/MainWindow.java
===================================================================
--- trunk/com/dynaco/gui/MainWindow.java (revision 2)
+++ trunk/com/dynaco/gui/MainWindow.java (working copy)
@@ -1,5 +1,7 @@
 package com.dynaco.gui;
 
+import com.yoyodyne.lang.*;
+
 import org.gtk.*;
 
 public class MainWindow extends GtkWindow {
+ echo ---

---
+ cat trunk/com/dynaco/lang/Labels.java
package com.yoyodyne.lang;
public static class Labels {
    public static final String TITLE = "Yoyodyne Gadget";
}
+ echo =====
=====
+ cd ..
+ ./k

Received on 2008-11-20 05:08:17 CET

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.