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

Re: merge not merging (useless result and poor docs)

From: matthew ford <matthew.ford_at_forward.com.au>
Date: 2005-01-24 01:19:51 CET

OK Ben,
Thanks for the assistance. Still battling away here tring to get a merge to
"work"

As a side issue I have a saying when designing UI's
"The user is always right"
and another one
"Its easy to make a program fool proof but hard to make it user proof.
Users do things a fool would never do."

So I am a user trying to do merge. I have used CVS and found I could merge
in 5mins and
then sort out the conflicts in an editor.

It has been 5 hours now and I still cannot get subversion to do a simple
merge.
Since the "user is always right" I think subversion merge is broken.

Back to the problem at hand.

I tried your suggestion of --ignore-ancestry and swapping the order of the
urls (why this order??)

svn merge --ignore-ancestry svn://localhost/svnRepos/trunk
svn://localhost/svnRepos/branch
This command seems to copy branch to trunk Not what I expected.

I expected to get a conflict on line
- *@author Dr. M.P. Ford make some changes here
+ *@author Dr. M.P. Ford make some different changes here

Next I tried your "normal" method of branching from the trunk and then
making changes in the branch and
trunk and trying to merge (I did not try merging to un-committed changes
which is what I would expect
to be able to do)

svn copy -m "branch1" svn://localhost/svnRepos/trunk
svn://localhost/svnRepos/branches/1
Committed revision 11

made changes to b1 and trunk
added file to b1 modified existing file committed
added file to trunk modified existing file, deleted a file (the only file in
a sub-dir, did not delete the sub-dir) committed

svn diff svn://localhost/svnRepos/trunk svn://localhost/svnRepos/branches/1
>diff.txt

svn diff --notice-ancestry svn://localhost/svnRepos/trunk
svn://localhost/svnRepos/branches/1 >diffna.txt

diff results are exactly the same ?? (see attachements)

svn merge svn://localhost/svnRepos/trunk svn://localhost/svnRepos/branches/1
gave the error output

C:\temp\svnTrunk>svn merge svn://localhost/svnRepos/trunk
svn://localhost/svnRep
os/branches/1 >merge.txt
svn: In directory 'src/au/com/forward/codeSections/testFiles'
svn: Error processing command 'modify-entry' in
'src/au/com/forward/codeSections
/testFiles'
svn: Error modifying entry for 'testin.cs'
svn: Can't add 'testin.cs' to deleted directory; try undeleting its parent
directory first

and still no conflict between
Index: oldFileInTrunk.txt
===================================================================
--- oldFileInTrunk.txt (.../trunk) (revision 16)
+++ oldFileInTrunk.txt (.../branches/1) (revision 16)
@@ -1 +1 @@
-This file existed in trunk prior to branch b1 has been modified in trunk
+This file existed in trunk prior to branch b1 has been modified in b1

Instead the branch file overwrote the trunk file. Also did NOT get the new
file from branch copied to trunk
i.e. merge not working.

Tried deleting Trunk and checking out again this time got
C:\temp\svnTrunk>svn merge svn://localhost/svnRepos/trunk
svn://localhost/svnRep
os/branches/1
U oldFileInTrunk.txt
A src\au\com\forward\codeSections\testFiles\testin.cs
A newInBranch.txt
D newInTrunk.txt

A bit better , but still no conflict in oldFileInTrunk.txt
and I lost my new file in trunk newInTrunk.txt
and
A src\au\com\forward\codeSections\testFiles\testin.cs
should be in conflic as this may be needed by the branch code but has been
deleted in trunk

P.S. I just had a call from my boss who rang to ask how to do a merge. He
cannot get it working either.

As for the Documenation

Basic command doc says
"svn merge sourceURL1[@N] sourceURL2[@M] [WCPATH]
In the first form, the source URLs are specified at revisions N and M. These
are the two sources to be compared.
The revisions default to HEAD if omitted."

There is no indication of what the order url1 url2 means in relation to
anything else so how do you know to use
svn merge --ignore-ancestry svn://localhost/svnRepos/trunk
svn://localhost/svnRepos/branch
instaead of
svn merge --ignore-ancestry svn://localhost/svnRepos/branch
svn://localhost/svnRepos/trunk

Note that the second order is consistent with the copy command from -> to
there does not seem to be any logic in the first order
As far as I can see there are no examples in the text cover this situation
(no examaple for svn merge --ignore-ancestry)

As a another issue the svn merge command syntax should be improved so you
can say
svn merge url
which would
look at the local WC and go back from url to the most recent copy point
(common ancester)
if there is one, otherwise use -ignore-ancestor if no common ancestor found,
 and then merge changes with local (possibly modified) WC

matthew

----- Original Message -----
From: "Ben Collins-Sussman" <sussman@collab.net>
To: "matthew ford" <matthew.ford@forward.com.au>
Cc: <users@subversion.tigris.org>
Sent: Monday, January 24, 2005 1:44 AM
Subject: Re: merge not merging (useless result and poor docs)

>
> On Jan 23, 2005, at 1:39 AM, matthew ford wrote:
> >
> > The docs need considerable improvement on this point, as does the
> > resulting
> > merge
> >
>
> Can you be specific as to how they need improvement? They go through
> bunches of examples. All of the examples assume there is some
> relationship between the branch and trunk, not two arbitrary trees that
> you happen to import. You're doing something different than the norm.
>
> The 'svn merge' command compares two trees, generates a patch, then
> applies that patch to a working copy. Yes, you have complete freedom
> to compare any two trees, and thereby generate any patch you want. But
> that does *not* mean that 'svn merge' always will do what you want.
> It's *your* responsbility to make sure that the patch being produced
> makes sense, and cleanly applies to your working copy.
>
> >
> >
> > Skipped 'src'
> > Skipped 'src'
> > Skipped 'src\au'
> > Skipped 'src\au\com'
> > Skipped 'src\au\com\forward'
> > Skipped 'src\au\com\forward\codeSections'
> > A src\au\com\forward\codeSections\DesignNotes.txt
> > A src\au\com\forward\codeSections\CodeSections.java
> > Skipped 'src\au\com\forward\codeSections\testFiles'
> > A src\au\com\forward\codeSections\testFiles\testin.cs
> > A src\au\com\forward\codeSections\CodeSections.cs
> > A src\au\com\forward\codeSections\buildzip.bat
> > A src\au\com\forward\codeSections\MainClass
> > A src\au\com\forward\codeSections\build.xml
> > Skipped 'docs'
> > Skipped 'docs'
> > A docs\htmldoc.exe
> >
>
> See those skipped messages? That indicates driver error. The merge
> command is trying to add and remove certain directories because they're
> not related to each other at all. Please read this section of chapter
> 4, regarding ancestry:
>
> http://svnbook.red-bean.com/en/1.1/ch04s03.html#svn-ch-4-sect-3.2.4
>
> Then after reverting, try the merge again with the --ignore-ancestry
> command.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

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

Received on Mon Jan 24 01:22:33 2005

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

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