RFC: allow "hg merge" to take a URL argument, add autocommit option

vadim at mbdsys.com vadim at mbdsys.com
Tue Jun 20 19:25:21 CDT 2006



Mark White wrote:

>Vadim Lebedev writes:
>  
>
>>Bryan O'Sullivan wrote:
>>    
>>
>>>I've been noticing that new users seem to have a hard time with
>>>Mercurial's model for merging changes, probably because there are too
>>>many steps involved.
>>>      
>>>
>
>Automatic-ish merging would be useful.  Perhaps particularly
>for some single-developer workflows, such as synchronizing
>offline commits between laptops.
>
>  
>
>>>I propose that the behaviour of the merge command be enhanced as
>>>follows.
>>>
>>>If given no arguments, or given a revision ID (or tag, or what have
>>>you), it behaves exactly as it does now.
>>>
>>>If given a URL as an argument, it pulls changes from that URL, and
>>>either updates the working dir if there have been no heads added, does a
>>>merge if there is one added head, and does no merge or update (but
>>>prints a message saying why) if there are more than one added heads.
>>>
>>>If given a "-c" option, it commits the result of a successful merge
>>>immediately, with an autogenerated commit message.
>>>
>>>      
>>>
>>I'd suggest that hg pull -m  will do the stuff you describe
>>    
>>
>
>This feels a bit like two separate jobs.  Auto-commit with
>"hg merge -c" sounds like a useful extension by itself.  The
>pull-merge-commit operation might fit into "hg pull" best
>(as Vadim suggests), similar to "hg pull -u".  That solves
>URL typing and commit message problem by using pull's
>existing default.  Then perhaps "hg pull -m" can do
>pull-merge, and "hg pull -mc" can do pull-merge-commit...?
>
>If the merge fails, the commit is presumably called off:
>hgmerge can decide what constitutes an automatable commit
>(with maybe a separately specified hgmerge for automerging).
>I guess outstanding changes would abort the commit, too?
>
>Mark <><
>
>
>
>  
>
Maybe we can add a pull flags to the sources specifications int hgrc?

This way the default behaviour wild be specified for each possible 
source.....
Usually we will want auto merge + commit from master upstream repos....


Vadim


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.selenic.com/pipermail/mercurial/attachments/20060621/15dac082/attachment-0001.html


More information about the Mercurial mailing list