Re: [RFC PATCH] Record a single transaction for conflicting push operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/12/19 Karl Wiberg <kha@xxxxxxxxxxx>:
> On Fri, Dec 18, 2009 at 4:49 PM, Catalin Marinas
> <catalin.marinas@xxxxxxxxx> wrote:
>
>> @@ -371,12 +369,10 @@ class StackTransaction(object):
>>             # We've just caused conflicts, so we must allow them in
>>             # the final checkout.
>>             self.__allow_conflicts = lambda trans: True
>> -
>> -            # Save this update so that we can run it a little later.
>> -            self.__conflicting_push = update
>> +            self.__patches = _TransPatchMap(self.__stack)
>> +            update()
>>             self.__halt("%d merge conflict(s)" % len(self.__conflicts))
>>         else:
>> -            # Update immediately.
>>             update()
>>
>>     def push_tree(self, pn):
>
> 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.

Thanks,

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]