[Bug 4014] New: hg import --exact crashes

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Fri Aug 9 12:28:20 CDT 2013


http://bz.selenic.com/show_bug.cgi?id=4014

          Priority: normal
            Bug ID: 4014
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: hg import --exact crashes
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: jordigh at octave.org
          Hardware: PC
            Status: UNCONFIRMED
           Version: 2.7
         Component: Mercurial
           Product: Mercurial

Created attachment 1738
  --> http://bz.selenic.com/attachment.cgi?id=1738&action=edit
Patch that makes hg import --exact crash

Consider the following repo:

    hg clone http://hg.code.sf.net/p/octave/image

When trying to apply the attached cset:

    $ mercurial import --exact wtf.diff
    applying /home/jordi/wtf.diff
    ** unknown exception encountered, please report by visiting
    ** http://mercurial.selenic.com/wiki/BugTracker
    ** Python 2.7.3 (default, Jan  2 2013, 13:56:14) [GCC 4.7.2]
    ** Mercurial Distributed SCM (version 2.7)
    ** Extensions loaded: 
    Traceback (most recent call last):
      File "/home/jordi/.local/bin/mercurial", line 38, in <module>
        mercurial.dispatch.run()
      File "/home/jordi/coding/vcs/mercurial-source/mercurial/dispatch.py",
line 28, in run
        sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
      File "/home/jordi/coding/vcs/mercurial-source/mercurial/dispatch.py",
line 69, in dispatch
        ret = _runcatch(req)
      File "/home/jordi/coding/vcs/mercurial-source/mercurial/dispatch.py",
line 97, in _runcatch
        return _dispatch(req)
      File "/home/jordi/coding/vcs/mercurial-source/mercurial/dispatch.py",
line 778, in _dispatch
        cmdpats, cmdoptions)
      File "/home/jordi/coding/vcs/mercurial-source/mercurial/dispatch.py",
line 549, in runcommand
        ret = _runcommand(ui, options, cmd, d)
      File "/home/jordi/coding/vcs/mercurial-source/mercurial/dispatch.py",
line 869, in _runcommand
        return checkargs()
      File "/home/jordi/coding/vcs/mercurial-source/mercurial/dispatch.py",
line 840, in checkargs
        return cmdfunc()
      File "/home/jordi/coding/vcs/mercurial-source/mercurial/dispatch.py",
line 775, in <lambda>
        d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
      File "/home/jordi/coding/vcs/mercurial-source/mercurial/util.py", line
506, in check
        return func(*args, **kwargs)
      File "/home/jordi/coding/vcs/mercurial-source/mercurial/commands.py",
line 3793, in import_
        (msg, node) = tryone(ui, hunk, parents)
      File "/home/jordi/coding/vcs/mercurial-source/mercurial/commands.py",
line 3765, in tryone
        if opts.get('exact') and hex(n) != nodeid:
    TypeError: must be string or buffer, not None

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list