[PATCH 1 of 5] store.py: accept empty repos

Adrian Buehlmann adrian at cadifra.com
Wed Jul 30 13:48:13 CDT 2008


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1217441565 -7200
# Node ID 41f92cfe2f1e404a3083f38713198eb6463f0370
# 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