Merge on push?

Roman Kennke roman.kennke at aicas.com
Mon Jun 9 03:22:16 CDT 2008


Hi Martin,

> > I think pushing to a central repository is a very important action,
> > and I also think that it is unnecessarily complicated in Mercurial.
> > The current situation is that when a developer tries to push, in
> > almost all cases it aborts and he needs to pull && merge && commit
> > and then push again (don't forget to update at some point too).
> 
> Is this not the same you have to do with something like Subversion? If
> you somehow know in advance that you need to merge in SVN, then you
> do:
> 
>   svn update; svn commit
> 
> With Mercurial this becomes
> 
>   hg fetch; hg push
> 
> On the other hand, if you know that no merging is necessary, then the
> commands are simply
> 
>   svn commit
> 
> or
> 
>   hg push

No, I disagree. In Mercurial you have to pull before pushing, even when
there is no merging necessary, at least not in the sense of like it is
in Subversion. In Mercurial, merging is necessary exactly when anybody
else pushed after you pulled last time. In Subversion (I think) merging
is necessary when somebody else changed a file that you also changed in
one of your changesets.

/Roman

-- 
Dipl.-Inform. (FH) Roman Kennke, Software Engineer, http://kennke.org
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-0
USt-Id: DE216375633, Handelsregister HRB 109481, AG Karlsruhe
Geschäftsführer: Dr. James J. Hunt




More information about the Mercurial mailing list