Re: Can't identify parent of branch
Michael Haggerty <[email protected]>
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.user |
|---|---|
| Message-ID | <[email protected]> |
On 11/09/2010 03:51 PM, John McNamee wrote: > I'm certainly willing to try hacking it. I'd appreciate any pointers you > could provide to set me in the right direction. > > P.S. I still do wonder why cvs2svn doesn't consistently identify, or not > identify, the trunk as the parent when files are initially added on a > branch. Remember that the CVS history is file by file. For a file that was added on a branch, cvs2svn should consistently *refuse* to consider trunk as a possible parent for the branch in that file. For files that were already on trunk when the branch was created, cvs2svn should consistently consider *only* trunk as a possible parent for the branch in that file. To create a tidy Subversion repository, cvs2svn picks a preferred parent for the entire branch. It usually does this by picking the "possible parent" that occurs most frequently across all files. Then, for files in which the preferred parent is a possible parent, the file is copied from the preferred parent to the branch. For files in which the preferred parent is not a possible parent, the file is copied from the file's "natural parent", that is, the line of development that the branch seems numerically to sprout from (e.g., branch 1.2.2's natural parent is branch 1 AKA trunk). So it is not terrible if the preferred parent cannot be used across all files. For your partial conversions, cvs2svn's decision about which "possible parent" occurs most frequently across the files depends on the subset of files that is being converted. You simply have the bad luck that in some subsets of files the "preferred parent" is not a possible parent in *any* of the files in the subset, and cvs2svn helpfully (?) refuses to let you make such a silly mistake. The place to hack is symbol_strategy.py. The class SymbolHintsFileRule creates one ManualSymbolRule for each rule in the symbol hints file. The latter should probably have a non-strict mode in which it emits a warning instead of an exception when a preferred parent is not a possible parent. Michael -- Michael Haggerty [email protected] http://softwareswirl.blogspot.com/ ------------------------------------------------------ http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1670&dsMessageId=2680478 To unsubscribe from this discussion, e-mail: [[email protected]].