[issue1082] unknown exception during merge

Doug Dixon mercurial-bugs at selenic.com
Tue Apr 8 08:15:21 CDT 2008


New submission from Doug Dixon <doug at mydeco.com>:

If you add a new file "foo" and hg mv it to "bar"
AND pull a change which also adds a new file "foo"
you get an exception:


bonobo:hg ddixon$ hg init repo1
bonobo:hg ddixon$ cd repo1
bonobo:repo1 ddixon$ echo a > foo
bonobo:repo1 ddixon$ hg ci -Amfoo
adding foo
bonobo:repo1 ddixon$ cd ..
bonobo:hg ddixon$ hg clone repo1 repo2
updating working directory
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
bonobo:hg ddixon$ cd repo1
bonobo:repo1 ddixon$ echo b > bar
bonobo:repo1 ddixon$ hg ci -Ambar
adding bar
bonobo:repo1 ddixon$ cd ../repo2
bonobo:repo2 ddixon$ echo myb > bar
bonobo:repo2 ddixon$ hg ci -Ammybar
adding bar
bonobo:repo2 ddixon$ hg mv bar baz
bonobo:repo2 ddixon$ hg ci -mmovebar
bonobo:repo2 ddixon$ hg pull
pulling from /Users/ddixon/hg/repo1
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)
bonobo:repo2 ddixon$ hg merge
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 1.0)
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/Current/bin/hg", line 20,
in <module>
    mercurial.dispatch.run()
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/dispatch.py",
line 20, in run
    sys.exit(dispatch(sys.argv[1:]))
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/dispatch.py",
line 29, in dispatch
    return _runcatch(u, args)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/dispatch.py",
line 45, in _runcatch
    return _dispatch(ui, args)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/dispatch.py",
line 364, in _dispatch
    ret = _runcommand(ui, options, cmd, d)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/dispatch.py",
line 417, in _runcommand
    return checkargs()
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/dispatch.py",
line 373, in checkargs
    return cmdfunc()
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/dispatch.py",
line 356, in <lambda>
    d = lambda: func(ui, repo, *args, **cmdoptions)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/commands.py",
line 1888, in merge
    return hg.merge(repo, node, force=force)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/hg.py",
line 293, in merge
    stats = _merge.update(repo, node, True, force, False)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/merge.py",
line 392, in update
    action += manifestmerge(repo, wc, p2, pa, overwrite, partial)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/merge.py",
line 104, in manifestmerge
    copy, diverge = copies.copies(repo, p1, p2, pa)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/copies.py",
line 122, in copies
    checkcopies(f, m1, m2)
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mercurial-1.0-py2.5-macosx-10.3-fat.egg/mercurial/copies.py",
line 100, in checkcopies
    if ca and ca.path() == f or ca.path() == c2.path():
AttributeError: 'NoneType' object has no attribute 'path'

----------
messages: 5844
nosy: ddixon
priority: urgent
status: unread
title: unknown exception during merge

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1082>
____________________________________________________



More information about the Mercurial-devel mailing list