[prev in list] [next in list] [prev in thread] [next in thread]
List: mercurial-devel
Subject: Re: [PATCH] clone on Windows: abort on reserved filenames (1st update)
From: Jesse Glick <jesse.glick () sun ! com>
Date: 2008-06-27 0:25:25
Message-ID: g41c1m$vfm$1 () ger ! gmane ! org
[Download RAW message or body]
Adrian Buehlmann wrote:
> maybe we can add a config option which makes Mercurial yell if a user
> tries to push/commit a file with a horrid name like "aux" into a
> repo.
FWIW, for the NetBeans repositories we try to prevent the Windows
pathname limit from getting exceeded using a hook on the server:
def forbid_long_path(ui, repo, hooktype, node, **kwargs):
halt = False
for rev in xrange(repo.changelog.rev(bin(node)),
repo.changelog.count()):
c = repo.changectx(rev)
for f in c.files():
if f not in c:
continue
if len(c[f].path()) > 206 or
len(repo.encodefn(c[f].path()).join((".hg/store/data/",".i"))) > 206:
if not halt:
ui.warn(_('The path of the file is too long, longer
than 206 chars: %s\n') % c[f].path())
ui.warn(_('in %s: %s\n') % (short(c.node()), f))
halt = True
return halt
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@selenic.com
http://selenic.com/mailman/listinfo/mercurial-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic