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

AW: Applying a patch multiple times

From: Yannick Berker <bers_at_gmx.net>
Date: Thu, 2 Apr 2009 21:02:26 +0200

Von: Stefan Küng [mailto:tortoisesvn_at_gmail.com]
> It comes because the patch file only contains one line of
> context to check the patch against. The second time the patch
> still can be applied cleanly.
> That's just how it is: a patch file doesn't contain the whole
> file but only the diff part with *some* context. That reduced
> information of a patch file can lead to such situations.

Hello Stefan,

Thank you for your answer. I can follow the second part of your answer, but not the first one. I have to add that I also encountered this problem with a patch file containing 3 lines of context before and after the line to add, so it's not the fact that my simple example has a reduced context size that causes this behavior. Please let me know if you need an example and I will create one for you.
Though, staying with a slight changed version of my example: I now apply my patch to the file 1-5-3-4 - in a clear conflict with the 1-2-3-4 I want to obtain by patching. What I would now expect is the following: The context says to search for 1-3-4 and add 2 after 1. 1-3-4 is not in the file, so TortoiseSVN gets revision 1 which in every case contains the correct sequence and applies the patch to it (1-2-3-4) and tries to merge it with the WC. Obviously, there is a collision which is what I would expect to happen. Instead, it applies the patch directly to the WC (1-2-5-3-4). This cannot be intended - am I the only one thinking this way?
I my opinion, TortoiseSVN should always load revision 1 from the repository because this is the file version the patch file was created with. This leaves the intelligent part of the patching process to the merge instead of the patch and would avoid the above error.



To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-04-02 21:08:57 CEST

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