Re: cvs2git: One possible bug, and two other issues
Greg Ward <[email protected]> Sat, 22 Jan 2011 09:45:17 -0500
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jan 21, 2011 at 7:24 AM, Anders Pilegaard <[email protected]> wrote: > On Tue, Jan 11, 2011 at 5:04 PM, Greg Ward <[email protected]> wrote: >> Note that I addressed this in cvs2hg with the notion of "sloppy" and >> "optional" fixup commits. See >> http://hg.gerg.ca/cvs2svn/raw-file/tip/README.cvs2hg under "Avoiding >> fixup commits". > > Thanks for the pointer! > > I can see from your README that the code also allows "sloppy" fixup > for branches. As I wrote in another mail I'm not sure they are very > useful. For tags it makes some sense if you want to be able to fetch > the repository at a given state. The tagged files will have exactly > the expected revision, and other files will have something not too far > away. Even so you won't preserve the diff between two tags, as > Michael noted. > > But for branches I can't so far see how to handle this without > suddenly getting changes in other files recorded as part of the branch > history? For a branch it makes more sense with an initial fixup > removing all the non-branch files - because then the later commits on > the branch in a natural way only cover the branch files. I'm 95% sure that is not a problem with sloppy branch fixups. Imagine a dead simple CVS repo: proj1/file1,v proj2/file2,v Let's say you branched like this: cvs tag -b REL_1_0 proj1 then file1 will have the tag, but not file2. When you "cvs update -r REL_1_0", file2 will disappear. So you cannot modify or commit file2 on that branch. The branch will not exist in file2,v, so there cannot be any revisions on that branch. If you then convert the repo with cvs2hg using sloppy branch fixups, then file2 will magically appear on your hg branch REL_1_0. Yes, this violates the prime directive of VC conversion, but it makes a more sensible hg repo. (And you can read "git" for "hg" here: all the concepts apply equally. But the implementation is so far only in the hg backend.) But because file2 did not have any revs on the CVS branch REL_1_0, it won't have any on the hg branch either. It will be frozen at its state as of the branch start. In other words: it's all fine. It'll work. Trust me. ;-) Greg ------------------------------------------------------ http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2699813 To unsubscribe from this discussion, e-mail: [[email protected]].