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

Adrian Buehlmann adrian at cadifra.com
Sun Jul 27 13:08:01 CDT 2008


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