archive: change the default prefix to '' from None
All current callers supply some sort of prefix, so the issue was hidden. But if
no parameter was specified, a crash occurred in the write() closure when
concatenating 'prefix' and 'name'.
--- a/hgext/largefiles/overrides.py Wed Feb 25 11:39:14 2015 -0800
+++ b/hgext/largefiles/overrides.py Sun Feb 15 17:21:48 2015 -0500
@@ -861,7 +861,7 @@
repo._lfcommithooks.pop()
def overridearchive(orig, repo, dest, node, kind, decode=True, matchfn=None,
- prefix=None, mtime=None, subrepos=None):
+ prefix='', mtime=None, subrepos=None):
# No need to lock because we are only reading history and
# largefile caches, neither of which are modified.
lfcommands.cachelfiles(repo.ui, repo, node)
--- a/mercurial/archival.py Wed Feb 25 11:39:14 2015 -0800
+++ b/mercurial/archival.py Sun Feb 15 17:21:48 2015 -0500
@@ -230,7 +230,7 @@
}
def archive(repo, dest, node, kind, decode=True, matchfn=None,
- prefix=None, mtime=None, subrepos=False):
+ prefix='', mtime=None, subrepos=False):
'''create archive of repo as it was at node.
dest can be name of directory, name of archive file, or file