how can you tell you have merged?

Adrian Buehlmann adrian at cadifra.com
Thu Sep 11 08:15:22 UTC 2008


On 11.09.2008 08:15, Douglas Philips wrote:
> On or about 2008 Sep 11, at 2:13 AM, Patrick Waugh indited:
>> hg clone hello my-new-hello
>> cd my-new-hello
>> sed -i '/printf/i\\tprintf("once more, hello.\\n");' hello.c
>> hg commit -m 'A new hello for a new day.'
>> hg pull ../my-hello
>> hg merge
>>
>> Now, how can you tell that you have done a merge?
>>
>> So, since I'm still seeing two heads, how would I know (if I left,
>> came back and had forgot I had done a merge) that the merge was
>> complete but that I still needed a commit?
> 
> hg parents
> 

See also http://www.selenic.com/mercurial/wiki/index.cgi/TutorialMerge

'hg glog' [1] is also quite nice: it marks the two parents of the
working directory with '@' signs after a merge (before the commit):

$ hg glog
@  changeset:   3:86794f718fb1
|  tag:         tip
|  parent:      1:82e55d328c8c
|  user:        mpm at selenic.com
|  date:        Mon May 05 01:20:46 2008 +0200
|  summary:     Express great joy at existence of Mercurial
|
| @  changeset:   2:c3844fde99f0
|/   user:        mpm at selenic.com
|    date:        Tue May 06 20:10:35 2008 +0200
|    summary:     Add description of hello.c
|
o  changeset:   1:82e55d328c8c
|  user:        mpm at selenic.com
|  date:        Fri Aug 26 01:21:28 2005 -0700
|  summary:     Create a makefile
|
o  changeset:   0:0a04b987be5a
   user:        mpm at selenic.com
   date:        Fri Aug 26 01:20:50 2005 -0700
   summary:     Create a standard "hello, world" program


Another glog example using the -l option (of the Mercurial repo):

> hg glog -l9
@    7017[tip]:7015,7016   8362086a1227   2008-09-10 08:49 +0200   benoit
|\     merge backout
| |
| o  7016:7009   58dcf10eea2b   2008-09-10 08:48 +0200   benoit
| |    Backed out changeset 3d54cf97598d (see issue916 for details)
| |
o |  7015   6651de7176a0   2008-09-09 21:32 +0200   mg
| |    i18n, record: improve use of translated docstring in prompts
| |
o |  7014   46456a51e247   2008-09-09 21:32 +0200   mg
| |    i18n: use gettext instead of _
| |
o |  7013   f56e788fa292   2008-09-09 21:32 +0200   mg
| |    i18n: mark help strings for translation
| |
o |  7012   78341ea65d16   2008-09-09 21:32 +0200   mg
| |    restructure helptable
| |
o |  7011   7da76778dbd7   2008-09-09 14:43 +0200   benoit
| |    Do not try to load extensions twice (issue811)
| |
o |  7010   9141bebefe3e   2008-09-08 14:22 +0200   benoit
|/     enhance the error output in case of failure during http push
|
o  7009   3d54cf97598d   2008-09-08 14:04 +0200   benoit
|    tag: without a checkout, base the tag changeset on tip instead of nullid
|

This was done with

'''
[ui]
style = compact
'''

in hgrc ( http://www.selenic.com/mercurial/hgrc.5.html#ui )

[1] http://www.selenic.com/mercurial/wiki/index.cgi/GraphlogExtension




More information about the Mercurial mailing list