Bug 267003 - [Patch] Wrong paths when local diff is used to create patches
Summary: [Patch] Wrong paths when local diff is used to create patches
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.5   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 71374
  Show dependency tree
 
Reported: 2009-03-04 07:11 EST by Szymon Brandys CLA
Modified: 2009-03-18 08:23 EDT (History)
4 users (show)

See Also:


Attachments
Patch v1 (1.67 KB, patch)
2009-03-12 10:39 EDT, Krzysztof Pog這dzi雟ki CLA
no flags Details | Diff
Patch_v2 (1.66 KB, patch)
2009-03-13 14:28 EDT, Kacper Zdanowicz CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.