changeset 24172:e0f06228bb66

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'.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 15 Feb 2015 17:21:48 -0500
parents 9cb1f82a2571
children 2cc8ee4c4e1c
files hgext/largefiles/overrides.py mercurial/archival.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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