On Fri, 2008-07-25 at 08:25 -0400, Paul Burba wrote:
> On Fri, Jul 25, 2008 at 7:52 AM, Julian Foad <julianfoad_at_btopenworld.com> wrote:
> > On Thu, 2008-07-24 at 11:57 -0400, Paul Burba wrote:
> >> Now we try the reverse merge, and as in < 1.5 the files scheduled for
> >> addition are skipped:
> >>
> >> 1.5.1>svn.exe merge -r3:2 %URL%/branches/mybranch
> >> Skipped 'newfile1'
> >> Skipped 'newfile2'
> >> Skipped 'newfile3'
> >
> > A good enhancement will be to compare the locally-added file with the
> > one that the incoming change thinks it's deleting (i.e. the merge-left
> > source), and only skip if they're different. That check is something
> > we're doing for tree conflict detection anyway, but can be done
> > independently.
> >
> > I'll have a go at a patch to make this happen. (It so happens that this
> > is what I am about to work on for tree conflicts anyway.) I haven't
> > missed any reason why we'd not want to change this, have I?
>
> Hi Julian,
>
> This seems like a safe idea. Out of curiosity, is there a common use
> case you see where this is helpful (other than the reverse merge an
> uncommitted merge one we are talking about here)?
I can't think of a common case where it's a schedule-add file that we're
about to delete. More common would be to find a file on a branch, which
may or may not have been modified during the branch's lifetime, and then
we merge the latest changes from trunk and this deletes the file. Here,
we should check whether the file we're about to delete is the same as
the one we want to delete. If it is, fine. If not, ideally raise a tree
conflict, but pre-tree-conflicts we could issue a warning. (We wouldn't
want to skip it because that would just trade one potentially unsafe
behaviour for another.)
> >> To sum up:
> >>
> >> Q: Want to reverse merge a uncommitted merge which added subtrees?
> >> A: Just use svn merge --force or svn revert
> >
> > While true, this advice may not be very helpful in non-trivial cases
> > unless you remember in advance that you need this flag. When you have
> > tried a reverse-merge which results in this "skipped" situation for
> > certain files, it is then too late to try a reverse-merge with "force"
> > because it will have made all sorts of other changes to your other files
> > and directories which it will then try to repeat.
>
> Yes, quite true. But even if you reverse merge an uncommitted merge
> and forget to use --force, then you can still just revert yes?
Yes, if you were in a "safe" state (no local mods) before you started
merging.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-25 14:49:56 CEST