Mercurial > hg-stable
changeset 13053:2649be11ab0b stable
util: do not recurse in makedirs if name is '' (issue2528)
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Tue, 30 Nov 2010 17:48:12 +0900 |
parents | 5fb924ee44d5 |
children | e2b8c7a6ff4d 4fdb4b18eb3d |
files | mercurial/util.py tests/test-bundle.t |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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