util: do not recurse in makedirs if name is '' (
issue2528)
--- a/mercurial/util.py Mon Nov 29 20:13:11 2010 +0100
+++ b/mercurial/util.py Tue Nov 30 17:48:12 2010 +0900
@@ -841,7 +841,7 @@
except OSError, err:
if err.errno == errno.EEXIST:
return
- if err.errno != errno.ENOENT:
+ if not name or err.errno != errno.ENOENT:
raise
parent = os.path.abspath(os.path.dirname(name))
makedirs(parent, mode)
--- a/tests/test-bundle.t Mon Nov 29 20:13:11 2010 +0100
+++ b/tests/test-bundle.t Tue Nov 30 17:48:12 2010 +0900
@@ -399,6 +399,13 @@
$ rm -r full-clone
+When cloning from a non-copiable repository into '', do not
+recurse infinitely (issue 2528)
+
+ $ hg clone full.hg ''
+ abort: No such file or directory
+ [255]
+
test for http://mercurial.selenic.com/bts/issue216
Unbundle incremental bundles into fresh empty in one go