From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 8 17:34:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 871D61065671 for ; Tue, 8 Apr 2008 17:34:49 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outA.internet-mail-service.net (outa.internet-mail-service.net [216.240.47.224]) by mx1.freebsd.org (Postfix) with ESMTP id 6E0308FC13 for ; Tue, 8 Apr 2008 17:34:49 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Tue, 08 Apr 2008 15:52:18 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 785322D8BF1; Tue, 8 Apr 2008 10:34:44 -0700 (PDT) Message-ID: <47FBACB8.4080304@elischer.org> Date: Tue, 08 Apr 2008 10:34:48 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: John Baldwin References: <20080405145038.GE5934@hoeg.nl> <20080407183159.GP5934@hoeg.nl> <200804081007.17874.jhb@freebsd.org> In-Reply-To: <200804081007.17874.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Ed Schouten Subject: Re: Perforce and `p4 diff2' against the origin X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2008 17:34:49 -0000 John Baldwin wrote: > On Monday 07 April 2008 02:31:59 pm Ed Schouten wrote: >> Thanks everyone for your replies. I think I should spend some time at >> the office trying the solutions to see what's the easiest way. >> >> I'm just a little bit disappointed by the fact that p4 doesn't have some >> kind of switch for diff2 to do this by default. It should already keep a >> list of such relations internally to make integrations and such work. >> >> Is there a way for us to submit feature requests at Perforce? > > Well, it's not quite that simple because p4 lets you do things like cherry > pick revisions (I want to merge revisions 1-4 and 7 into foo.c but not 5 and > 6 yet.. in that case, what should it diff against, #4? #7? #7 with #5 and > #6 backed out somehow (what if that has conflicts?)?) and merge from > different paths into the same file. So for example if I had this: > > //depot/foo.c > //depot/bar.c > //depot/baz.c > > and I merged foo.c#1-#2 into bar.c and foo.c#1 into baz.c. Then suppose I > merge bar.c into baz.c (thus carrying the changes in foo.c#2 into baz.c). If > I diff foo.c against baz.c should it diff against #1 or #2? > > The reason you have a good answer for what to merge in your case is because it > is a degenerate case and while that one may seem obvious a general purpose > solution is not as obvious. The other thing to recall is that if you were > just using p4 w/o HEAD in CVS you wouldn't generate patches in the first > place. Instead, you would use 'p4 integ -r' to merge changes from your > branches up into HEAD. I do this at work where all out stuff lives in p4 and > don't really use patches much anymore except to review before a submit (so I > would do 'p4 integ -r -b foo_feature; p4 resolve -a; p4 diff -du ... | less; > p4 submit'). Thus, we use p4 in a bit of an odd way since HEAD is in CVS and > if you use it as it is designed to be used patches aren't all that important, > hence they aren't going to focus as much effort on it. > the new p4 interchanges command may be relaqvent to this discussion... I haven't used it yet but it seems relevant.