Bug 267003

Summary: [Patch] Wrong paths when local diff is used to create patches
Product: [Eclipse Project] Platform Reporter: Szymon Brandys <Szymon.Brandys>
Component: CompareAssignee: Platform-Compare-Inbox <platform-compare-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: intuicje, kacper.zdanowicz, mariusz.tanski, tomasz.zarna
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 71374    
Attachments:
Description Flags
Patch v1
none
Patch_v2 none

Description Szymon Brandys CLA 2009-03-04 07:11:56 EST
Reproducible using org.eclipse.compare from branch_20090126_LocalDiff branch

Steps:

1) compare local file (e.g. a.txt) with its revision
2) Use "Create Patch..." from the compare editor context menu
3) In the "Create Patch" dialog, there is Left: Local: a.txt and Right: Local history: a.txt....
4) Choose Right, then choose Clipboard and proceed

See that the value in "Use only file path" is wrong, it is "Local history: a.txt...", but should be "Local: a.txt" to which we are contributing

5) Now you have to change "Use only file path" to any path of existing resource (Tomasz will raise a bug for it), in my case it is "/javaProject/src/b/a.txt"
6) Check the patch, in my case I get

Index: Local history: a.txt 2009-03-04 11:28:45
===================================================================
--- Local history: a.txt 2009-03-04 11:28:45	2009-03-04 13:03:21 -0000
+++ /javaProject/src/b/a.txt	2009-03-04 13:03:21 -0000
@@ -1,1 +1,2 @@
+aaaa
 aaaa

Index should be "/javaProject/src/b/a.txt", but is "Local history: a.txt...".
Comment 1 Krzysztof Pog這dzi雟ki CLA 2009-03-12 10:39:39 EDT
Created attachment 128566 [details]
Patch v1

Patch resolving this issue.
Comment 2 Kacper Zdanowicz CLA 2009-03-13 14:28:37 EDT
Created attachment 128762 [details]
Patch_v2

This is the second version of the patch for this issue, the first one didn't cover the issue completly.

Use only second version.
Comment 3 Szymon Brandys CLA 2009-03-18 08:21:33 EDT
Looks good.
Comment 4 Szymon Brandys CLA 2009-03-18 08:23:59 EDT
Patch_v02 released to branch_20090126_LocalDiff.