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

Adrian Buehlmann adrian at cadifra.com
Mon Aug 11 13:10:07 CDT 2008


Any objections against including patches 1 to 4?

These could be included independently of 5 and 6 (which do the repo layout
change).

Patches 1 to 4 improve verify such that it would uncover some repo
errors that currently are not detected by verify but later fail on a
streamclone attempt.

The patch series basically does a store walk like a server-side streamclone
would do, also making sure that the filenames in the store can be decoded.

patch 1: http://selenic.com/pipermail/mercurial-devel/2008-July/007335.html
patch 2: http://selenic.com/pipermail/mercurial-devel/2008-July/007334.html
patch 3: http://selenic.com/pipermail/mercurial-devel/2008-July/007336.html
patch 4: http://selenic.com/pipermail/mercurial-devel/2008-July/007337.html

I believe I have implemented everything as Matt said.

I think it would be worthwhile to save this work (independently of patch 5
and 6).

On 31.07.2008 11:47, Adrian Buehlmann wrote:
> # 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