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

Re: Hitting issue 2454 merging to branch, and need advice to workaround

From: Matt Doran <matt.doran_at_papercut.biz>
Date: 2006-01-29 00:37:59 CET

Hi again,

I managed to get the merge completed by breaking it into 2 parts. I
first merged up to the point that the problem file was deleted from
trunk, committed, and then merged the remainder (including where the
file was replaced). So instead of having the replacement occur in a
single commit, it ended up in 2 commits ... one delete, and one add. I
was lucky that the replacement didn't happen in a single commit on
trunk, otherwise I would have been stuck.

I tried to create a repro recipe based on the one in Issue 2454, but
didn't have much luck. My scenario was slightly different, in that the
replacement happened on trunk and I tried to merge it to a branch. In
that issue, the repro does the replacement on the branch and tries to
merge back to trunk. It seems there's something more subtle going on
here .... because I couldn't repro with a simple recipe, but could every
time with my repository.

I hope the wc-replacements fixes pending in 1.4 would avoid this problem
in the future.

Cheers,
Matt

Matt Doran wrote:
> Hi all,
>
> I've been using SVN now for 18 months and love it. But I have
> encountered a few issues when working on branches that make SVN less
> friendly to work with. I raised an issue with "switch" about 6 weeks
> ago (Issue 2466).
>
> However today I encountered an issue that has got be a bit stumped,
> and need your expert advice on how to move forward. I'm using SVN
> 1.3.0 (and TSVN 1.3.0).
>
> I've been working on a feature branch, and today merged the recent
> changed from trunk to the branch. When I went to commit I received
> the following error:
>
> ....
> Replacing path/to/file/MySourceFile.java
> svn: Commit failed (details follow):
> svn: Item '/trunk/path/to/file/MySourceFile.java' is out of date
>
> However that file is not out-of-date, because I just did an update and
> no-one has done any commits. If I do an update just to be sure I
> get the following:
>
> svn: REPORT request failed on '/repos/!svn/vcc/default'
> svn: Working copy path 'path/to/file/MySourceFile.java' does not exist in repository
>
> So basically at this point my working copy is broken.
>
> I found this exact issue in the issue tracker, but it has not been
> resolved and there is no advice for working around the problem:
> http://subversion.tigris.org/issues/show_bug.cgi?id=2454
>
> It turns out that there was some refactoring on the trunk which
> resulted in a file being "replaced". So if I run "svn st" I get the
> following output for the file:
>
> R + path/to/file/MySourceFile.java
>
> ... indicating a "replacement with history".
>
>
> So this is where I need some advice!! How can I complete this commit
> and not get myself into a mess?? As I see it I have a couple of
> options, but neither is very attractive...
>
> 1. Revert the change to this file, and not commit this change to
> the branch. But I can't really do this because the branch will
> be broken without it.
> 2. Revert the change, and then just manually make the changes to
> this file so that it is the same as the file in trunk. This
> seems like the better option, but I'm a little concerned that I
> might be opening a can of worms that makes merging future
> changes even more difficult. And when this branch is complete,
> it might make merging the changes into trunk difficult.
>
>
> Anybody have any advice? If I get an answer to this issue I'll post
> a comment in the issue so that future users can benefit from it.
>
> Thanks,
> Matt
>
>
Received on Sun Jan 29 00:39:04 2006

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.