diff -r ba5e71770db2 -r 341868ef0cf6 mercurial/scmutil.py --- a/mercurial/scmutil.py Wed Oct 24 23:09:31 2012 +0200 +++ b/mercurial/scmutil.py Tue Feb 05 16:22:53 2013 -0800 @@ -34,6 +34,11 @@ for c in (':', '\0', '\n', '\r'): if c in lbl: raise util.Abort(_("%r cannot be used in a name") % c) + try: + int(lbl) + raise util.Abort(_("a %s cannot have an integer as its name") % kind) + except ValueError: + pass def checkfilename(f): '''Check that the filename f is an acceptable filename for a tracked file'''