Merge on push?
Martin Geisler
mg at daimi.au.dk
Mon Jun 9 08:28:03 CDT 2008
Roman Kennke <roman.kennke at aicas.com> writes:
Hi Roman
>> 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.
Yes, this is exactly the same with Subversion -- you cannot do a
commit unless you have an up-to-date SVN checkout. With SVN you must
do a 'svn update' to bring your checkout up-to-date, and this actually
does a merge for you.
> In Subversion (I think) merging is necessary when somebody else
> changed a file that you also changed in one of your changesets.
Not always -- and you can only have one outstanding un-committed
changeset in Subversion, namely the one in your working copy.
Subversion does a merge for you everytime you do 'svn update', just
like Mercurial will do with 'hg fetch'. If there is a conflict with
Subversion you will have to resolve it ('svn resolved'), and in
Mercurial you do the same with the 'hg merge' command. I believe the
'hg fetch' step will trigger this merging automatically.
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.
More information about the Mercurial
mailing list