[Kde-scm-interest] atomicity, again

Thiago Macieira thiago at kde.org
Tue Jun 16 01:27:40 CEST 2009


Boyd Stephen Smith Jr. wrote:
>In <200906151757.53601.thiago at kde.org>, Thiago Macieira wrote:
>>Jeff Mitchell wrote:
>>>Thomas Capricelli wrote:
>>>> http://www.selenic.com/blog/mercurial/sharedandsubrepos.html
>>>
>>>Git has a similar feature (submodules) although I believe there are
>>> some drawbacks with it; Thiago probably knows more.
>>
>>Git submodules work fine for what they're meant to be: tracking the
>> state of a sub-module for a given state of its parent module. However,
>> it's not meant to serve as an atomic commit.
>>
>>Reading the link above, it seems that Mercurial's solution is exactly
>> like Git's. It does not solve the problem of atomic commits across
>> multiple repositories.
>
>Odd, I read the link, and it seemed as though commit command(s) in
> Mercurial would recur into subrepositories and perform a commit there
> and then use that new commit id for updating the "parent" repository.
>
>At a structural level, there's little to no difference using this
> wouldn't make any atomicity guarantees[1] that git doesn't.
>
>It does seem to make it harder to forget to make your commit atomic, but
>it's been little while since I looked into git's submodule handling as I
>don't use it myself and couldn't continue to follow the git mailing
> list.

That's not the problem.

The problem happens when you try to push your nested sub-repositories to 
upstream servers. If one of them fails to push, you have to rebase or 
merge, which means the SHA-1 of the commit changes. And then you have to 
update the link in the parent repository.

When you push the parent, then maybe that one fails as well to push. You 
have to merge and that may cause conflicts (maybe someone pushed an update 
to the repository you've just pushed and got to the parent before you 
did). You have to fix that manually as well.
-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-scm-interest/attachments/20090615/09fb2d08/attachment.sig 


More information about the Kde-scm-interest mailing list