From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Mansfield Subject: Re: gitweb wishlist Date: Tue, 24 May 2005 16:03:31 -0400 Message-ID: <42938893.9010608@cobite.com> References: <20050511012626.GL26384@pasky.ji.cz> <1116384951.5094.83.camel@dhcp-188.off.vrfy.org> <1116611932.12975.22.camel@dhcp-188> <1116615600.12975.33.camel@dhcp-188> <428E49DD.406@zytor.com> <428E4D8C.3020606@zytor.com> <1116626652.12975.118.camel@dhcp-188> <428E745C.30304@zytor.com> <4292A08A.5050108@cobite.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090407020306000900030906" Cc: "H. Peter Anvin" , Kay Sievers , Petr Baudis , Thomas Glanzmann , Git Mailing List X-From: git-owner@vger.kernel.org Tue May 24 22:03:59 2005 Return-path: Received: from vger.kernel.org ([12.107.209.244]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DafbZ-00064g-GQ for gcvg-git@gmane.org; Tue, 24 May 2005 22:02:22 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261993AbVEXUD5 (ORCPT ); Tue, 24 May 2005 16:03:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261995AbVEXUD5 (ORCPT ); Tue, 24 May 2005 16:03:57 -0400 Received: from iris.cobite.com ([208.222.83.2]:49282 "EHLO email-pri.cobite.com") by vger.kernel.org with ESMTP id S261993AbVEXUDc (ORCPT ); Tue, 24 May 2005 16:03:32 -0400 Received: from localhost (iris.cobite.com [127.0.0.1]) by email-pri.cobite.com (Postfix) with ESMTP id 52CDD984E1; Tue, 24 May 2005 16:03:25 -0400 (EDT) Received: from email-pri.cobite.com ([127.0.0.1]) by localhost (iris.cobite.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11210-10; Tue, 24 May 2005 16:03:25 -0400 (EDT) Received: by email-pri.cobite.com (Postfix, from userid 45000) id 129B39888E; Tue, 24 May 2005 16:03:25 -0400 (EDT) Received: from [208.222.80.105] (gandalf.cobite.com [208.222.80.105]) by email-pri.cobite.com (Postfix) with ESMTP id BB0B1984E1; Tue, 24 May 2005 16:03:24 -0400 (EDT) User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en To: Linus Torvalds In-Reply-To: X-Virus-Scanned: by amavisd-new at cobite.com Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org This is a multi-part message in MIME format. --------------090407020306000900030906 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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've attached what I just committed. The previous 'show ancestor' patch needs to be reversed and this applied. It works for me on a half-dozen repos including syslinux. You no longer should need to work around multiple reporting of the ancestor for a given branch, though it couldn't hurt. I'm going to finish getting some of Thomas's patches in and make an actual release so people won't have to scour the lists. David --------------090407020306000900030906 Content-Type: text/x-patch; name="show-branch-ancestry-2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="show-branch-ancestry-2.patch" --------------------- PatchSet 176 Date: 2005/05/24 19:57:37 Author: david Branch: HEAD Tag: (none) Log: show branch ancestry Members: cvsps.c:4.99->4.100 cvsps_types.h:4.9->4.10 Index: cvsps/cvsps.c diff -u cvsps/cvsps.c:4.99 cvsps/cvsps.c:4.100 --- cvsps/cvsps.c:4.99 Wed Jan 26 14:46:41 2005 +++ cvsps/cvsps.c Tue May 24 15:57:37 2005 @@ -26,7 +26,7 @@ #include "cap.h" #include "cvs_direct.h" -RCSID("$Id: cvsps.c,v 4.99 2005/01/26 19:46:41 david Exp $"); +RCSID("$Id: cvsps.c,v 4.100 2005/05/24 19:57:37 david Exp $"); #define CVS_LOG_BOUNDARY "----------------------------\n" #define CVS_FILE_BOUNDARY "=============================================================================\n" @@ -75,6 +75,7 @@ static int do_write_cache; static int statistics; static const char * test_log_file; +static struct hash_table * branch_heads; /* settable via options */ static int timestamp_fuzz_factor = 300; @@ -101,6 +102,7 @@ static int cvs_direct; static int compress; static char compress_arg[8]; +static int track_branch_ancestry; static void check_norc(int, char *[]); static int parse_args(int, char *[]); @@ -112,7 +114,7 @@ static void assign_pre_revision(PatchSetMember *, CvsFileRevision * rev); static void check_print_patch_set(PatchSet *); static void print_patch_set(PatchSet *); -static void set_ps_id(const void *, const VISIT, const int); +static void walk_all_ps(const void *, const VISIT, const int); static void show_ps_tree_node(const void *, const VISIT, const int); static int compare_patch_sets_bk(const void *, const void *); static int compare_patch_sets(const void *, const void *); @@ -131,6 +133,7 @@ static int check_rev_funk(PatchSet *, CvsFileRevision *); static CvsFileRevision * rev_follow_branch(CvsFileRevision *, const char *); static int before_tag(CvsFileRevision * rev, const char * tag); +static void determine_branch_ancestor(PatchSet * ps, PatchSet * head_ps); int main(int argc, char *argv[]) { @@ -164,6 +167,7 @@ file_hash = create_hash_table(1023); global_symbols = create_hash_table(111); + branch_heads = create_hash_table(1023); /* this parses some of the CVS/ files, and initializes * the repository_path and other variables @@ -197,7 +201,7 @@ } ps_counter = 0; - twalk(ps_tree_bytime, set_ps_id); + twalk(ps_tree_bytime, walk_all_ps); resolve_global_symbols(); @@ -536,7 +540,7 @@ debug(DEBUG_APPERROR, " [--test-log ] [--bkcvs]"); debug(DEBUG_APPERROR, " [--no-rlog] [--diff-opts