commands.archive function
Philip Wrenn
philwrenn at gmail.com
Fri Mar 20 11:31:27 CDT 2009
I am trying to write a simple python script that uses that archive
command to create a file type archive.
Since the archival.archive command will fail if archive type is set to
file and a prefix exists I am not setting the prefix. The problem is
without a prefix the call to make_filename on line 170 of commands.py
fails.
patlen = len(pat)
TypeError: object of type 'NoneType' has no len()
My example:
u = ui.ui()
repo = hg.repository(u, "/path/to/repo")
tiprev = len(repo) - 1
commands.archive(u,repo,"/path/to/archive/dest", rev=tiprev)
Everything works fine if test prefix before calling make_filename. My
concern is that I may be introducing other problems. If anyone has an
opinion on this I would appreciate hearing it.
- prefix = cmdutil.make_filename(repo, prefix, node)
+ if prefix:
+ prefix = cmdutil.make_filename(repo, prefix, node)
Thanks,
Philip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20090320/97482815/attachment.htm
More information about the Mercurial
mailing list