Bug 3354 - traceback on hg export -r with empty revset
Summary: traceback on hg export -r with empty revset
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Thomas Arendsen Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-04 04:00 UTC by Thomas Arendsen Hein
Modified: 2012-04-10 02:48 UTC (History)
3 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Arendsen Hein 2012-04-04 04:00 UTC
To reproduce:

  $ hg init repo
  $ hg export -R repo -r 'not all()'

** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) [GCC 4.4.5]
** Mercurial Distributed SCM (version 2.1.2+13-913be8c5139c)
** Extensions loaded: foo, mq, patchbomb, convert, transplant, fetch, churn,
keyword, nearest, inout, rebase, relink
Traceback (most recent call last):
  File "/home/thomas/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 27, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 64, in dispatch
    return _runcatch(req)
  File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 87, in _runcatch
    return _dispatch(req)
  File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 685, in _dispatch
    cmdpats, cmdoptions)
  File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 467, in
runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 739, in
_runcommand
    return checkargs()
  File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 693, in checkargs
    return cmdfunc()
  File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 682, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/home/thomas/hg/repos/tah/mercurial/util.py", line 456, in check
    return func(*args, **kwargs)
  File "/home/thomas/hg/repos/tah/mercurial/extensions.py", line 139, in wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/home/thomas/hg/repos/tah/mercurial/util.py", line 456, in check
    return func(*args, **kwargs)
  File "/home/thomas/hg/repos/tah/hgext/mq.py", line 3343, in mqcommand
    return orig(ui, repo, *args, **kwargs)
  File "/home/thomas/hg/repos/tah/mercurial/util.py", line 456, in check
    return func(*args, **kwargs)
  File "/home/thomas/hg/repos/tah/mercurial/commands.py", line 2425, in export
    opts=patch.diffopts(ui, opts))
  File "/home/thomas/hg/repos/tah/mercurial/cmdutil.py", line 533, in export
    revwidth = max([len(str(rev)) for rev in revs])
ValueError: max() arg is an empty sequence
Comment 1 Patrick Mézard 2012-04-05 01:24 UTC
Fix in crew: http://hg.intevation.org/mercurial/crew/rev/8ca7187d479f
Comment 2 HG Bot 2012-04-06 15:00 UTC
Fixed by http://selenic.com/repo/hg/rev/8ca7187d479f
Thomas Arendsen Hein <thomas@intevation.de>
export: catch exporting empty revsets (issue3353)

(please test the fix)
Comment 3 Thomas Arendsen Hein 2012-04-10 02:48 UTC
works in stable and default
Comment 4 Bugzilla 2012-05-12 09:29 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:29 EDT  ---

This bug was previously known as _bug_ 3353 at http://mercurial.selenic.com/bts/issue3353