[PATCH 1 of 6] store.py: accept empty repos
Adrian Buehlmann
adrian at cadifra.com
Thu Jul 31 04:47:02 CDT 2008
# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1217491743 -7200
# Node ID d0580959fd05adf37fb9b720da84db2cc5ce341c
# Parent 1a9577da9d02a386526c6a6791d6d57f56b28126
store.py: accept empty repos
Fixes a traceback on the server side when trying to streamclone
an empty repo (this was *not* introduced by 80e51429cb9a).
diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -69,6 +69,8 @@
path = os.path.join(self.path, relpath)
else:
path = self.path
+ if not os.path.isdir(path):
+ return
striplen = len(self.path) + len(os.sep)
filetypes = ('.d', '.i')
for f, size in _dirwalk(path, recurse):
More information about the Mercurial-devel
mailing list