Merge on push?
Tom Widmer
tom.widmer at googlemail.com
Tue Jun 10 04:05:14 CDT 2008
Martin Geisler wrote:
> 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.
You only need to update in Subversion if one of the specific files that
you are committing is not up to date. See e.g.
http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.tour.cycle.commit
Subversion has the interesting feature of allowing individual files and
directories to be from different revisions, and only requires you to
have the latest version of something if you want to commit changes to it.
http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.basic.in-action.mixedrevs.normal
Tom
More information about the Mercurial
mailing list