hg archive fails on empty repo
Sanjoy Mahajan
sanjoy at mrao.cam.ac.uk
Sun Jul 8 00:22:44 CDT 2007
I forgot to commit the initial set of files to a repo before I did 'hg
archive' and discovered that 'hg archive' does not like an empty repo.
I'm using the latest revision (f48290). Simple example:
$ hg init
$ hg archive /tmp/2
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version f48290864625)
Traceback (most recent call last):
File "/usr/local/bin/hg", line 11, in <module>
mercurial.commands.run()
File "/usr/local/lib/python2.5/site-packages/mercurial/commands.py", line 3127, in run
sys.exit(dispatch(sys.argv[1:], argv0=sys.argv[0]))
File "/usr/local/lib/python2.5/site-packages/mercurial/commands.py", line 3124, in dispatch
return cmdutil.runcatch(u, args, argv0=argv0)
File "/usr/local/lib/python2.5/site-packages/mercurial/cmdutil.py", line 37, in runcatch
return dispatch(ui, args, argv0=argv0)
File "/usr/local/lib/python2.5/site-packages/mercurial/cmdutil.py", line 378, in dispatch
ret = runcommand(ui, options, cmd, d)
File "/usr/local/lib/python2.5/site-packages/mercurial/cmdutil.py", line 431, in runcommand
return checkargs()
File "/usr/local/lib/python2.5/site-packages/mercurial/cmdutil.py", line 387, in checkargs
return cmdfunc()
File "/usr/local/lib/python2.5/site-packages/mercurial/cmdutil.py", line 370, in <lambda>
d = lambda: func(ui, repo, *args, **cmdoptions)
File "/usr/local/lib/python2.5/site-packages/mercurial/commands.py", line 147, in archive
matchfn, prefix)
File "/usr/local/lib/python2.5/site-packages/mercurial/archival.py", line 206, in archive
'repo: %s\nnode: %s\n' % (hex(repo.changelog.node(0)), hex(node)))
File "/usr/local/lib/python2.5/site-packages/mercurial/revlog.py", line 475, in node
return rev == nullrev and nullid or self.index[rev][-1]
IndexError: list index out of range
More information about the Mercurial
mailing list