From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Wiberg Subject: Re: [RFC PATCH] Record a single transaction for conflicting push operations Date: Mon, 21 Dec 2009 08:08:46 +0100 Message-ID: References: <20091217232212.4869.43002.stgit@toshiba-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: git@vger.kernel.org, =?UTF-8?Q?Gustav_H=C3=A5llberg?= To: Catalin Marinas X-From: git-owner@vger.kernel.org Mon Dec 21 08:08:56 2009 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.50) id 1NMcO0-0000Dm-35 for gcvg-git-2@lo.gmane.org; Mon, 21 Dec 2009 08:08:56 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751219AbZLUHIv (ORCPT ); Mon, 21 Dec 2009 02:08:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751131AbZLUHIu (ORCPT ); Mon, 21 Dec 2009 02:08:50 -0500 Received: from mail1.space2u.com ([62.20.1.135]:59980 "EHLO mail1.space2u.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751123AbZLUHIu (ORCPT ); Mon, 21 Dec 2009 02:08:50 -0500 Received: from mail-fx0-f215.google.com (mail-fx0-f215.google.com [209.85.220.215]) (authenticated bits=0) by mail1.space2u.com (8.14.3/8.14.3) with ESMTP id nBL78edU030728 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT) for ; Mon, 21 Dec 2009 08:08:41 +0100 Received: by fxm7 with SMTP id 7so4543998fxm.29 for ; Sun, 20 Dec 2009 23:08:46 -0800 (PST) Received: by 10.103.84.13 with SMTP id m13mr3216190mul.10.1261379326648; Sun, 20 Dec 2009 23:08:46 -0800 (PST) In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Mon, Dec 21, 2009 at 12:21 AM, Catalin Marinas wrote: > 2009/12/19 Karl Wiberg : > >> Better. But couldn't you remove the update function completely and >> just inline the code in it, since it's called immediately? > > Of course, I tried, but couldn't get it to work. I get HEAD and top > not equal unless I call update() between _TransPatchMap and > self.__halt(). For the non-conflicting case we need to call update > before or after this "if merge_conflict". > > One solution is to split the "if merge_conflict" in two but maybe > you have a better idea. Yes, duplicating the conditional was what I had in mind. But if you don't find it to improve the readability of the code (as compared to having a function), I certainly won't insist. Thanks for working on this. By the way, you do realize there's another command that requires two steps to undo completely: refresh? And that one is harder to get out of---undoing it all in one step would mean throwing away the updates to the patch. -- Karl Wiberg, kha@treskal.com subrabbit.wordpress.com www.treskal.com/kalle