Subject: Re: gitweb wishlist

From: David Mansfield <[email-masked]>
Date: Tue, 24 May 2005 15:54:52 -0400

Linus Torvalds wrote:
> 
> On Tue, 24 May 2005, Linus Torvalds wrote:
> 
>>Fixing the branch handling shows that cvsps does some really strange
>>things with the newly added "Ancestor grpah". Here's one example:
> 
> 
> Ahh, looking at cvsps source, I think I see what's going on. 
> 
> It's deciding the "previous branch" by looking at what the previous branch 
> for the first individual file in the PatchSet was, which fails because in 
> this case, PatchSet 372 was changing "syslinux.doc", and Patchset 374 was 
> changing "syslinux.c", and thus the previous version of the individual 
> _files_ were both in the HEAD branch.
> 
> So it does look like I should just ignore the "Ancestor branch" 
> information if the new branch already existed.
> 

I now consider all files in a commit, and all commits in a branch to 
determine the ancestor, and only report it in the first commit on the 
branch.

Strangely, you have to look at (potentially) all commits on a branch to 
find the 'true' ancestor branch.

The problem is for branch-off-branch branches where the first commit on 
the new branch modifies only files never modified on the branch-off-HEAD 
branch.  This is because cvs only REALLY creates the branch when the 
first commit is made (for that file) on the branch.  Before that, it is 
just a 'potential' branch...

But I have code now which (seems to) works, but needs a bit more checking.

> Of course, some semantics will never be translatable when trying to treat 
> CVS as a sane system (ie treating CVS as if it was changeset-based is 
> always going to cause strange corner cases since it really is file-based), 
> but that should most likely give the best approximation of what a 
> conversion should do.
> 

Yes.

David