monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] "warning: resolve non-content conflicts..."


From: William Uther
Subject: Re: [Monotone-devel] "warning: resolve non-content conflicts..."
Date: Tue, 27 Nov 2007 09:57:24 +1100


On 27/11/2007, at 7:17 AM, Benjamin Place wrote:


I'm trying to propagate some changes between two branches, and I'm getting:

  mtn: warning: resolve non-content conflicts and then try again.
  mtn: error: merge failed due to unresolved conflicts
  mtn: warning: rename target conflict: nodes 505, 485, both want
parent 347, name FileName.java
  mtn: warning: resolve non-content conflicts and then try again.
  mtn: error: merge failed due to unresolved conflicts

The merge is trying to give two files the same name, and failing.

In the instance you pasted, both files are trying to be named "FileName.java". The easy solution is to rename one of them.

mtn co -b branch1 new-wc
cd new-wc
mtn mv FileName.java FileName-branch1.java
mtn commit -m "rename to avoid conflict"

Now do your merge/propagate. The merged revision will have both files; FileName-branch1.java from one branch and FileName.java from the other branch.

The other option would be to delete the file on one side of the merge, but I would only do this once you're sure it is what you want. It is hard to undelete with history in mtn at the moment.

Be well,

Will       :-}

P.S. Above I didn't explain how you got there, just how to fix it. Imagine you did the following (and I'm typing this into my email client, not testing it. So there may be typos, etc.):

# First set things up:

mtn co -b branch1 branch1-wc
cd branch1-wc
mtn mkdir sharedDir
mtn mkdir dirA
mtn mkdir dirB
touch dirA/a-file
mtn add dirA/a-file
touch dirB/a-file
mtn add dirB/a-file
mtn commit -m "set up some files and dirs"
mtn propagate branch1 branch2

# Now both branch1 and branch2 have a directory called "sharedDir", and two other dirs each of which contains a file called "a-file", but the two "a-files" are different files.

# in branch1:
mtn mv dirA/a-file sharedDir/
mtn commit -m "move a-file to sharedDir"

# similar in branch2:
cd ..
mtn co -b branch2 branch2-wc
cd branch2-wc

mtn mv dirB/a-file sharedDir/
mtn commit -m "move a-file to sharedDir"

# notice what has happened. The two different files, each called "a- file" are now in the "same" place. # if you try to propagate in either direction you should get a conflict similar to the one you reported. # the solution is to move one of the "a-file"s so that they are not trying to be in the same place, which
# is what I suggested above.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]