Mercurial > hg
comparison hgext/largefiles/lfutil.py @ 15392:d7bfbc92a1c0 stable
util: add a doctest for empty sha() calls
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 31 Oct 2011 15:41:39 -0500 |
parents | a5a6a9b7f3b9 |
children | db8b0ee74025 |
comparison
equal
deleted
inserted
replaced
15391:a5a6a9b7f3b9 | 15392:d7bfbc92a1c0 |
---|---|
441 | 441 |
442 def mkstemp(repo, prefix): | 442 def mkstemp(repo, prefix): |
443 '''Returns a file descriptor and a filename corresponding to a temporary | 443 '''Returns a file descriptor and a filename corresponding to a temporary |
444 file in the repo's largefiles store.''' | 444 file in the repo's largefiles store.''' |
445 path = repo.join(longname) | 445 path = repo.join(longname) |
446 util.makedirs(repo.join(path)) | 446 util.makedirs(path) |
447 return tempfile.mkstemp(prefix=prefix, dir=path) | 447 return tempfile.mkstemp(prefix=prefix, dir=path) |
448 | 448 |
449 class storeprotonotcapable(Exception): | 449 class storeprotonotcapable(Exception): |
450 def __init__(self, storetypes): | 450 def __init__(self, storetypes): |
451 self.storetypes = storetypes | 451 self.storetypes = storetypes |