[issue1578] CVS conversion: dropping synthetic revisions can break merge detection

Greg Ward mercurial-bugs at selenic.com
Sat Mar 28 15:19:08 UTC 2009


New submission from Greg Ward <greg-hg at gerg.ca>:

The feature I added in issue1558, which detects and drops CVS synthetic "file
... added on branch ..." revisions, breaks merge detection in certain obscure
circumstances.

In particular, if you have a CVS history with a bit of history like this:

  1) add file1 on branch B
  2) add file2 on trunk post-B
  3) merge file1 from B to trunk
  4) merge file2 from trunk to B

*and* you convert that repository with convert.cvsps.mergefrom set to a regex
that matches "MERGE from XXX" comments in steps 3 and 4, then Mercurial blows up
like this:

initializing destination proj.hg repository
using builtin cvsps
collecting CVS rlog
15 log entries
creating changesets
8 changeset entries
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 0c179cfcc4b6+20090327)
** Extensions loaded: convert, graphlog
Traceback (most recent call last):
  File "/home/gward/bin/hg", line 27, in ?
    mercurial.dispatch.run()
  File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 16,
in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 25,
in dispatch
    return _runcatch(u, args)
  File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 41,
in _runcatch
    return _dispatch(ui, args)
  File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 372,
in _dispatch
    return runcommand(lui, repo, cmd, fullargs, ui, options, d)
  File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 247,
in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 417,
in _runcommand
    return checkargs()
  File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 377,
in checkargs
    return cmdfunc()
  File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 371,
in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/home/scratch/src/hg-stable-issue1558/mercurial/util.py", line 718, in check
    return func(*args, **kwargs)
  File "hgext/convert/__init__.py", line 199, in convert
  File "hgext/convert/convcmd.py", line 322, in convert
  File "hgext/convert/convcmd.py", line 54, in convertsource
  File "/home/scratch/src/hg-stable-issue1558/hgext/convert/cvs.py", line 37, in
__init__
    self._parse(ui)
  File "/home/scratch/src/hg-stable-issue1558/hgext/convert/cvs.py", line 93, in
_parse
    parents=[str(p.id) for p in cs.parents],
AttributeError: 'changeset' object has no attribute 'id'

----------
assignedto: gward
messages: 8921
nosy: gward
priority: bug
status: unread
title: CVS conversion: dropping synthetic revisions can break merge detection
topic: convert, regression

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




More information about the Mercurial-devel mailing list