[issue1566] archive function - commands.py
plwrenn
mercurial-bugs at selenic.com
Fri Mar 20 15:40:13 CDT 2009
New submission from plwrenn <philwrenn at gmail.com>:
I am attempting to use the command.archive function to build a file archive of a
repository.
The archiver.archive function does not allow a prefix if the archive type is set
to file. That makes sense to me. Problem is that if prefix is not passed to the
command.archive function then the line:
prefix = opts.get('prefix')
ends up making the local variable prefix = None
If prefix is None then make_filename function throw an exception:
patlen = len(pat)
TypeError: object of type 'NoneType' has no len()
Would it introduce other problems if the following line was changed from:
prefix = opts.get('prefix')
to:
prefix = opts.get('prefix') or ''
I have attached a bundle including the proposed edit. Thanks for taking a look.
Philip
----------
files: bundle.hg
messages: 8867
nosy: plwrenn
priority: bug
status: unread
title: archive function - commands.py
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1566>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bundle.hg
Type: application/octet-stream
Size: 552 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090320/3e34d652/attachment.obj
More information about the Mercurial-devel
mailing list