[PATCH] clone on Windows: abort on reserved filenames
Adrian Buehlmann
adrian at cadifra.com
Wed Jun 11 07:11:30 UTC 2008
On 10.06.2008 17:49, Adrian Buehlmann wrote:
> diff -r a51093361e1c -r a10c7fb7b2ac mercurial/localrepo.py
> --- a/mercurial/localrepo.py Sat Jun 07 17:52:00 2008 +0200
> +++ b/mercurial/localrepo.py Tue Jun 10 16:21:39 2008 +0200
> @@ -2003,6 +2003,8 @@
> self.ui.status(_("adding file changes\n"))
> while 1:
> f = changegroup.getchunk(source)
> + if not util.validpathname(f):
> + raise util.Abort(_("filename %s is not supported") % f)
> if not f:
> break
Doing the "if not f: break" *before* calling util.validpathname would be better.
I will resend the patch.
More information about the Mercurial-devel
mailing list