I discovered problems with plugin, when branch removed from CVS. For example we have file.c. Two branches created for that file 1.1.0.2 (branch number 2) and 1.1.0.4 (branch number 4). If I will remove branch 1.1.0.2 version tree will not work properly. The problem is that algorithm is wrong to find and create branches.
private void createBranches(ILogEntry logEntry) {
int branchNumber = 0;
CVSTag[] tags = logEntry.getTags();
for (int j = tags.length - 1; j >= 0; j--) {
if (tags[j].getType() == CVSTag.BRANCH) {
branchNumber += 2; <= if branch removed sequence is broken.
createBranch(logEntry.getRevision() + "." + branchNumber, branchNumber, tags[j].getName());
}
}
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After debugging of eclipse I found that correct way will be to use information from cvs plugin, but unfortunately cvs plugin remove branch number information. So I submitted bug.
I discovered problems with plugin, when branch removed from CVS. For example we have file.c. Two branches created for that file 1.1.0.2 (branch number 2) and 1.1.0.4 (branch number 4). If I will remove branch 1.1.0.2 version tree will not work properly. The problem is that algorithm is wrong to find and create branches.
private void createBranches(ILogEntry logEntry) {
int branchNumber = 0;
CVSTag[] tags = logEntry.getTags();
for (int j = tags.length - 1; j >= 0; j--) {
if (tags[j].getType() == CVSTag.BRANCH) {
branchNumber += 2; <= if branch removed sequence is broken.
createBranch(logEntry.getRevision() + "." + branchNumber, branchNumber, tags[j].getName());
}
}
}
After debugging of eclipse I found that correct way will be to use information from cvs plugin, but unfortunately cvs plugin remove branch number information. So I submitted bug.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=283262
My idea is simple. Just use cvs to get branchNumber.
private void createBranches(ILogEntry logEntry) {
CVSTag[] tags = logEntry.getTags();
for (int j = tags.length - 1; j >= 0; j--) {
if (tags[j].getType() == CVSTag.BRANCH) {
String branchNumber = tags[j].getBranchNumber();
createBranch(logEntry.getRevision() + "." + branchNumber, tags[j].getName());
}
}
}
I hope my patch will be applied to eclipse 3.6 Helios. Do you have any plans to continue support of VersionTree plugin.
Can I contribute?