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

Could merging be any more cumbersome?

From: Rick Mann <rmann_at_latencyzero.com>
Date: 2005-08-05 04:29:41 CEST

I'm running svn version 1.2.1 (r15230).

We have a "trunk/db" and a "branches/relaunch/db". I did some work in
relaunch, which was copied on revision 11251. Trunk's head is 11585.
Relaunch's is up to 11592. I would like to merge changes from
relaunch back to trunk. So, I follow the instructions in the SVN
Book, and try this:

$ cd trunk/db
$ svn merge --dry-run -r 11251:HEAD svn://build/kmrepo/branches/
A test
A test/config
A test/config/test-config.xml
A test/config/log4j.xml
A test/src
A test/src/java
A test/src/java/foocompany
A test/src/java/foocompany/AbstractTest.java
A test/src/java/foocompany/db
A test/src/java/foocompany/db/TestInsert.java
CU project/DB.mcp
U project
C src/java/com/foocompany/app/NBDTopicItem.java
C src/java/com/foocompany/app/NBDTopicHeading.java
A src/java/com/foocompany/app/TopicElementBase.java
C src/java/com/foocompany/app/AdWellRuleBase.java
U src/java/com/foocompany/app/NBDTopic.java
C src/java/com/foocompany/app/database/AdWellRulePInterface.java
C src/java/com/foocompany/app/database/NBDTopicSearchPInterface.java
C src/java/com/foocompany/app/database/NBDTopicPInterface.java
A src/java/com/foocompany/app/database/TopicElementPInterface.java
U src/java/com/foocompany/app/Customer.java
C src/java/com/foocompany/app/NBDTopicItemBase.java
C src/java/com/foocompany/app/NBDTopicHeadingBase.java
C src/java/com/foocompany/app/NBDTopicSearchBase.java
A src/java/com/foocompany/app/TopicElement.java
C src/java/com/foocompany/app/NBDTopicBase.java
U src/java/com/foocompany/database/SpyDatabase.java
U src/java/com/foocompany/database/SQLGenerator.java
U src/java/com/foocompany/database/PersistenceManager.java
Skipped missing target: 'definitions/CustomerNotes.def'
U build.xml
  U .

I see there are a bunch of conflicts I don't want to deal with right
now, so I try to merge part of the changes. I want just the "test"

$ svn merge --dry-run -r 11251:HEAD svn://build/kmrepo/branches/
relaunch/db/test test
subversion/clients/cmdline/util.c:639: (apr_err=200005)
svn: Use --force to override this restriction
subversion/libsvn_client/diff.c:2567: (apr_err=200005)
svn: 'test' is not under version control

Okay, so I try the --force option:

$ svn merge --dry-run --force -r 11251:HEAD svn://build/kmrepo/
branches/relaunch/db/test test
subversion/clients/cmdline/util.c:639: (apr_err=200005)
svn: Use --force to override this restriction
subversion/libsvn_client/diff.c:2567: (apr_err=200005)
svn: 'test' is not under version control

So, I try to add test:

$ mkdir test
$ svn add test
A test
$ svn commit
Adding db/test

Committed revision 11598.
$ svn merge --dry-run --force -r 11251:HEAD svn://build/kmrepo/
branches/relaunch/db/test test
subversion/libsvn_client/ra.c:775: (apr_err=20014)
svn: Unable to find repository location for 'svn://build/kmrepo/
branches/relaunch/db/test' in revision 11251

Great. So Subversion chokes because "test" is something I added to
the relaunch branch since 11251. Shouldn't it pick up on this? So, I
try using the first revision that had test:

$ svn log svn://build/kmrepo/branches/relaunch/db/test
r11587 | rmann | 2005-08-04 18:06:44 -0700 (Thu, 04 Aug 2005) | 2 lines

A bit of trouble with svn.

r11586 | rmann | 2005-08-04 18:05:02 -0700 (Thu, 04 Aug 2005) | 2 lines

Added unit testing.


I see that test was added in r11586, so:

$ svn merge --dry-run --force -r 11586:HEAD svn://build/kmrepo/
branches/relaunch/db/test test
A test/config
A test/config/test-config.xml
A test/config/log4j.xml

But it only lists a few files. Where are all the other files in my
test dir? (There's a source tree):

relaunch/db rmann$ svn status -vu test
             11592 11587 rmann test/config
             11592 11587 rmann test/config/test-config.xml
             11592 11587 rmann test/config/log4j.xml
             11592 11586 rmann test/src
             11592 11586 rmann test/src/java
             11592 11586 rmann test/src/java/foocompany
             11592 11586 rmann test/src/java/foocompany/
             11592 11586 rmann test/src/java/foocompany/db
             11592 11586 rmann test/src/java/foocompany/db/
             11592 11587 rmann test
Status against revision: 11599

Subversion clearly knows about the other files. What's going on?

Thanks for any assistance.

A final note:

Now, I know the manual says most newcomers want to merge from one
branch to another, but that that's the wrong way to think about it. I
say: it is the RIGHT way to think about it. svn merge should be as
easy to use as:

$ cd Source
$ ls
relaunch/ trunk/
$ svn merge relaunch/db trunk/db

It should do all the stuff that one has to do manually (looking up
revisions, etc) and get the changes I put in relaunch since the
branch was created, 'till now, and apply them to my copy of trunk/db.
Perhaps Subversion requires the branching support it still lacks to
be able to do that.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Aug 5 04:31:27 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.