Bug 28330 - [resources] Visitor for history store is wrong
Summary: [resources] Visitor for history store is wrong
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 28238
  Show dependency tree
 
Reported: 2002-12-14 16:59 EST by DJ Houghton CLA
Modified: 2002-12-17 16:09 EST (History)
1 user (show)

See Also:


Attachments
patch for org.eclipse.core.resources (3.89 KB, patch)
2002-12-16 15:33 EST, DJ Houghton CLA
no flags Details | Diff
patch for org.eclipse.core.tests.resources (4.48 KB, patch)
2002-12-16 15:34 EST, DJ Houghton CLA
no flags Details | Diff
patch (2.67 KB, patch)
2002-12-16 16:18 EST, Debbie Wilson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2002-12-14 16:59:30 EST
The visitor mechanism for the history store is wrong.

In the part where it does partial matching on the key bytes, we have no way to 
determine if we have a match on a full segment or not. For instance, a key 
of /a/b will match true for both /a/b/c and /a/b1.

We need to determine:
1). what methods this effects (see bug 28238 for effects to #copyHistory)
2). what we can do to fix this (may require key format change
3). what our compatibility story is for local history (see #2)
Comment 1 DJ Houghton CLA 2002-12-14 17:01:48 EST
Investigate for M4.
May require too much work to fix until M5.
Comment 2 DJ Houghton CLA 2002-12-15 22:40:44 EST
Tried fixing at the IndexedCursor level but there are too many side-effects and 
other users of that code.

Best place would be investigation into modification of HistoryStore.accept
Comment 3 DJ Houghton CLA 2002-12-16 15:33:09 EST
Created attachment 2810 [details]
patch for org.eclipse.core.resources

This is a patch for the org.eclipse.core.resources plug-in.
Ignore the difference in the .project and do not accept them as changes when
merging.

The patch changes the HistoryStore.accept method to only do partial matches on
a path segment basis rather than on the byte-wise level.

Note that now there are some test failures in the HistoryStore. See next
comment for more info...
Comment 4 DJ Houghton CLA 2002-12-16 15:34:27 EST
Created attachment 2811 [details]
patch for org.eclipse.core.tests.resources

This is a patch for the test suites.
The "fix" above causes some tests to fail. We need to determine whether this is
a real problem or whether the tests are relying on the old (incorrect)
behaviour.
Comment 5 Debbie Wilson CLA 2002-12-16 16:18:24 EST
Created attachment 2812 [details]
patch

Potential code change for this bug.
Comment 6 DJ Houghton CLA 2002-12-16 17:01:38 EST
New patch allows for the case where the path has a trailing slash. (e.g. 
Path.ROOT)

Released code into HEAD.

Closing