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

Re: Rejected patch hunk resolving

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Tue, 25 Oct 2011 20:23:50 +0200

On 24.10.2011 11:41, Hans-Emil Skogh wrote:
> Hi!
>
> This is sort of a long shot, but I thought I'd drop a post on the
> list anyway.
>
> I have been doing some patch applying as of late, and some of them on
> modified working copies. This invariably leads to that some patches
> generates rejected patch hunks. This is expected since some of the
> modifications in the working copy conflicts with the data provided in
> the patchfile.
>
> The question is: Would it make sense to let TortoiseMerge give a
> little bit more help when it comes to resolving conflicts in
> patchfiles? Right now the rejected hunks are shown in a new window.
> Would it be possible to use the three way "conflict" view instead?
> That is; showing the rejected hunks inline with the rest of the
> source as conflicted rows and letting the user select what lines that
> should end up in the "patched" file.
>
> The three files would then be: - Original The file before patching -
> Patched The file after svn patch - Conflicts The "Patched" file, but
> with the rejected hunks forcefully* applied
>
> The lines that differ between "Patched" and "Conflicts" would then be
> used to denote which lines that are conflicted.
>
> *Forcefully here means doing a best guess of where the hunk should be
> applied. If no part of the hunk matches, I guess that line numbers
> would be a best guess of where to put it.
>
> I'm not sure if this would be feasible to do in TortoiseMerge today,
> but it sure would come in handy when applying large patch files on
> "dirty" working copies.

The problem is that the rejected hunks could not be applied, and for a
reason: the patch algorithm couldn't find a place where they could be
put. TMerge can't apply them and show a conflict, because they can't be
applied at all.
Since we don't have the original file we also can't just apply them at
their original position the patchfile indicates, so that's not possible
either.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2863543
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-10-25 20:24:03 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

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