Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 372862 - CVS cache does not contain precise information about tags.
Summary: CVS cache does not contain precise information about tags.
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.8 M7   Edit
Assignee: Malgorzata Janczarska CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 374516 374532
Blocks:
  Show dependency tree
 
Reported: 2012-02-29 10:28 EST by Malgorzata Janczarska CLA
Modified: 2012-05-01 06:42 EDT (History)
3 users (show)

See Also:
daniel_megert: review+


Attachments
Hierarchical cache (48.09 KB, patch)
2012-02-29 10:31 EST, Malgorzata Janczarska CLA
no flags Details | Diff
Fix for returning dates (2.29 KB, patch)
2012-04-27 06:50 EDT, Malgorzata Janczarska CLA
daniel_megert: review+
Details | Diff
Fix for returning dates v2 (2.33 KB, patch)
2012-04-27 09:44 EDT, Malgorzata Janczarska CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Malgorzata Janczarska CLA 2012-02-29 10:28:20 EST
CVS cache does not contain precise information about tags when projects are placed in submodules in the repository.
1. Refreshing tags for module stores all tags found in this module under this module path, even if the tags are really found in submodules
2. Even if we have a list of tags refreshed for submodule it gives us no information about tags in parent module. To get the list of tags for its parent we have to do separate a refresh for the parent.
3. Autorefresh files, like ".project" defined for submodule are not used when we are doing a refresh for parent module.
4. In consequence of 3. refreshing tags for a module in repository that contains projects as submodules results in doing a heavy CVS command of recurse log even if doing only few logs for .project files would be sufficient. This command is often so heavy that is killed by the CVS server.
5. Even if only one submodule has given branch, after refreshing tags for the parent module repository view suggests that all submodules have this branch. Only way to see which submodules really have this branch is to open every submodule and see which of them contain files.
Comment 1 Malgorzata Janczarska CLA 2012-02-29 10:31:29 EST
Created attachment 211810 [details]
Hierarchical cache

This is patch moved from Bug 366016.
Its review has been started on Gerrit:
https://git.eclipse.org/r/#/c/5175/
Comment 2 Tomasz Zarna CLA 2012-02-29 11:18:13 EST
(In reply to comment #1)
> Its review has been started on Gerrit:
> https://git.eclipse.org/r/#/c/5175/

That review no longer iterates over the fix for this bug. If you want to have it reviewed in Gerrit, please push it as a separate change.
Comment 3 Malgorzata Janczarska CLA 2012-02-29 12:23:53 EST
(In reply to comment #2)
> That review no longer iterates over the fix for this bug. If you want to have it
> reviewed in Gerrit, please push it as a separate change.
This is the new review:
https://git.eclipse.org/r/#/c/5190/
Comment 4 Malgorzata Janczarska CLA 2012-03-13 10:25:40 EDT
Fixed with 78b06e932f107395de4ac4bad9a6113a78639766.
Comment 5 Dani Megert CLA 2012-04-26 12:12:43 EDT
Not good: this patch destroys the feature to compare against (and replace from) dates (Replace/Compare With > Another Branch or Version..., then try to add a date).
Comment 6 Malgorzata Janczarska CLA 2012-04-27 06:50:56 EDT
Created attachment 214684 [details]
Fix for returning dates

The previous fix caused a regression. The problem was that repositoryRoot.getAllKnownTags(..) function before the fix returned also Dates and it was the base for building the tags tree. After the fix Dates where added and stored correctly, but they where not returned, thus they where not rendered on the tree.
The fix is trivial, it just adds Dates to the list of returned tags. I also created a test for adding dates.
Comment 7 Dani Megert CLA 2012-04-27 07:58:56 EDT
Comment on attachment 214684 [details]
Fix for returning dates

The fix is good and works well. Previously added dates show up again and new ones can be added.

Regarding the code: Please replace

	Set tags = new HashSet();
	tags.addAll(dateTags);

with:

	Set tags = new HashSet(dateTags);

This sets a higher initial capacity if needed, and the change is smaller.
Comment 8 Malgorzata Janczarska CLA 2012-04-27 09:44:07 EDT
Created attachment 214699 [details]
Fix for returning dates v2
Comment 9 Malgorzata Janczarska CLA 2012-04-27 09:45:37 EDT
(In reply to comment #7)
> Set tags = new HashSet();
> tags.addAll(dateTags);
> 
> with:
> 
> Set tags = new HashSet(dateTags);

done in attachment 214699 [details].
Comment 10 Tomasz Zarna CLA 2012-04-27 14:06:22 EDT
(In reply to comment #8)
> Created attachment 214699 [details]
> Fix for returning dates v2

Pushed as 9a44f1060a78d560859b9e7774a25703b8b6c3d2. Thx Dani for finding it and Gosia for providing the fix.
Comment 11 Tomasz Zarna CLA 2012-04-30 10:04:00 EDT
Verified in I20120429-2000 that the feature from comment 5 has been restored.
Comment 12 Malgorzata Janczarska CLA 2012-05-01 06:42:41 EDT
Bug 361928 and Bug 361926 contain backports of this fix. They also need to be committed.