[issue1986] merge aborts when trying to merge a subrepo that shouldn't need merging

Steve Losh bugs at mercurial.selenic.com
Wed Jan 13 23:25:30 UTC 2010


New submission from Steve Losh <steve at stevelosh.com>:

I have a repository with a single subrepo.  Each currently has two named branches: default and ja.

I'm trying to merge default into ja in the main repo, and 'hg merge' fails with "abort: can't merge with ancestor" when 
trying to merge the subrepo.  The subrepo shouldn't need to be merged in this case.

Repositories are available for pulling at:

main - http://bitbucket.org/sjl/hgtip/
sub - http://bitbucket.org/sjl/hgtip-content/

I've attached a transcript of a shell session showing the problem, which is also available at 
http://paste.lisp.org/display/93357

----------
files: merge-problem.txt
messages: 11459
nosy: sjl
priority: bug
status: unread
title: merge aborts when trying to merge a subrepo that shouldn't need merging
topic: merge, subrepositories

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue1986>
____________________________________________________
-------------- next part --------------
sjl at ecgtheow in ~/src/hgtip on default at tip
☿ hg up ja                                                                               ▸▸▸▸▸▸▸▸▸▸
3 files updated, 0 files merged, 0 files removed, 0 files unresolved

sjl at ecgtheow in ~/src/hgtip on ja
☿ hg ,                                                                                   ▸▸▸▸▸▸▸▸▸▸
o  122 fabfile: declares with_statement for Python 2.5 series tip
|
| @  121 Update translations. ja
| |
o |  120 Update content.
| |
o |  119 Clean up the Advanced tips.
| |
| o  118 Update translations. ja
| |
| o  117 Update substate. ja
| |
o |  116 Update substate.
| |
| o  115 Merge the mint fix. ja
|/|
o |    114 Merge the mint fix.
|\ \
| o |  113 Switch mint back to a relative URL to avoid localhost hits.
| | |

sjl at ecgtheow in ~/src/hgtip on ja
☿ cat .hgsubstate                                                                        ▸▸▸▸▸▸▸▸▸▸
2a47b45142b8b55cad737600c87d4cb79733876d content/tips

sjl at ecgtheow in ~/src/hgtip on ja
☿ hg cat -r tip .hgsubstate                                                              ▸▸▸▸▸▸▸▸▸▸
618f21b55a909e45a5b4e52af8e2fe11729fa784 content/tips

sjl at ecgtheow in ~/src/hgtip on ja
☿ hg -R content/tips , -v                                                                ▸▸▸▸▸▸▸▸▸▸
@    58:2a47b45142b8 Merge the cleanup. ja tip
|\   (23 hours ago by Steve Losh)
| |
| o  57:618f21b55a90 Clean up the Beginner tips.
| |  (23 hours ago by Steve Losh)
| |
| o  56:089438b14ec8 Clean up the Advanced tips.
| |  (23 hours ago by Steve Losh)
| |
o |  55:7c9317450344 ja: translated beginner/2009-10-07-shortlog-for-fun-and-profit ja
| |  (31 hours ago by Yuya Nishihara)
| |
o |  54:115858e73f39 ja: actually fixed the meaning of negative revision number. ja
| |  (34 hours ago by Yuya Nishihara)
| |
o |  53:c09ab0e26039 Merge the shortlog fix. ja
|\|  (47 hours ago by Steve Losh)
| |
| o  52:5003ecea108a fixed the meaning of negative revision numbers according to hg help revisions
| |  (2 days ago by Yuya Nishihara)
| |
o |  51:60506cba67cb ja: translated beginner/2009-10-05-shortcuts-for-specifying-revisions.html ja
| |  (2 days ago by Yuya Nishihara)
| |
o |  50:0349a7eb7e38 ja: translated beginner/2009-10-03-stay-sane-with-graphlog ja
| |  (2 days ago by Yuya Nishihara)
| |
o |  49:6b26b384eac9 ja: translated beginner/2009-09-30-configuring-mercurial ja
| |  (3 days ago by Yuya Nishihara)
| |

sjl at ecgtheow in ~/src/hgtip on ja
☿ hg merge tip                                                                           ▸▸▸▸▸▸▸▸▸▸
abort: can't merge with ancestor

sjl at ecgtheow in ~/src/hgtip on ja
☿ hg merge tip -v --debug --trace                                                        ▸▸▸▸▸▸▸▸▸▸
  searching for copies back to rev 106
resolving manifests
 overwrite None partial False
 ancestor 3e3d337ddf6d local 720f85c5ea15+ remote 242f74972efe
 fabfile.py: remote is newer -> g
 content/about/index.html: remote is newer -> g
 .hgsubstate: versions differ -> m
subrepo merge 720f85c5ea15+ 242f74972efe 3e3d337ddf6d
  subrepo content/tips: both sides changed, merge with ../hgtip-content:618f21b55a909e45a5b4e52af8e2fe11729fa784
merging subrepo content/tips
Traceback (most recent call last):
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/dispatch.py", line 46, in _runcatch
    return _dispatch(ui, args)
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/dispatch.py", line 454, in _dispatch
    return runcommand(lui, repo, cmd, fullargs, ui, options, d)
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/dispatch.py", line 324, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/dispatch.py", line 505, in _runcommand
    return checkargs()
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/dispatch.py", line 459, in checkargs
    return cmdfunc()
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/dispatch.py", line 453, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/util.py", line 386, in check
    return func(*args, **kwargs)
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/commands.py", line 2177, in merge
    return hg.merge(repo, node, force=opts.get('force'))
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/hg.py", line 356, in merge
    stats = _merge.update(repo, node, True, force, False)
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/merge.py", line 501, in update
    stats = applyupdates(repo, action, wc, p2)
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/merge.py", line 296, in applyupdates
    subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx))
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/subrepo.py", line 90, in submerge
    wctx.sub(s).merge(r)
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/subrepo.py", line 217, in merge
    hg.merge(self._repo, state[1], remind=False)
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/hg.py", line 356, in merge
    stats = _merge.update(repo, node, True, force, False)
  File "/Users/sjl/src/gorilla/shelves/mercurial/mercurial/merge.py", line 463, in update
    raise util.Abort(_("can't merge with ancestor"))
Abort: can't merge with ancestor
abort: can't merge with ancestor

sjl at ecgtheow in ~/src/hgtip on ja
☿ hg verify                                                                              ▸▸▸▸▸▸▸▸▸▸
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
41 files, 123 changesets, 209 total revisions

sjl at ecgtheow in ~/src/hgtip on ja
☿ hg -R content/tips verify                                                              ▸▸▸▸▸▸▸▸▸▸
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
32 files, 59 changesets, 99 total revisions

sjl at ecgtheow in ~/src/hgtip on ja
☿ hg version                                                                             ▸▸▸▸▸▸▸▸▸▸
Mercurial Distributed SCM (version 1.4.2)

Copyright (C) 2005-2009 Matt Mackall <mpm at selenic.com> and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

sjl at ecgtheow in ~/src/hgtip on ja
☿  


More information about the Mercurial-devel mailing list