mercurial/manifest.py
changeset 7633 08cabecfa8a8
parent 7405 f1944e74e83c
child 7634 14a4337a9b9b
equal deleted inserted replaced
7632:9626819b2e3d 7633:08cabecfa8a8
     4 #
     4 #
     5 # This software may be used and distributed according to the terms
     5 # This software may be used and distributed according to the terms
     6 # of the GNU General Public License, incorporated herein by reference.
     6 # of the GNU General Public License, incorporated herein by reference.
     7 
     7 
     8 from node import bin, hex, nullid
     8 from node import bin, hex, nullid
     9 from revlog import revlog, RevlogError
     9 from revlog import revlog
    10 from i18n import _
    10 from i18n import _
    11 import array, struct, mdiff, parsers, util
    11 import array, struct, mdiff, parsers, util, error
    12 
    12 
    13 class manifestdict(dict):
    13 class manifestdict(dict):
    14     def __init__(self, mapping=None, flags=None):
    14     def __init__(self, mapping=None, flags=None):
    15         if mapping is None: mapping = {}
    15         if mapping is None: mapping = {}
    16         if flags is None: flags = {}
    16         if flags is None: flags = {}
   123                             for d in x ])
   123                             for d in x ])
   124 
   124 
   125         def checkforbidden(l):
   125         def checkforbidden(l):
   126             for f in l:
   126             for f in l:
   127                 if '\n' in f or '\r' in f:
   127                 if '\n' in f or '\r' in f:
   128                     raise RevlogError(_("'\\n' and '\\r' disallowed in filenames"))
   128                     raise error.RevlogError(
       
   129                         _("'\\n' and '\\r' disallowed in filenames"))
   129 
   130 
   130         # if we're using the listcache, make sure it is valid and
   131         # if we're using the listcache, make sure it is valid and
   131         # parented by the same node we're diffing against
   132         # parented by the same node we're diffing against
   132         if not (changed and self.listcache and p1 and self.mapcache[0] == p1):
   133         if not (changed and self.listcache and p1 and self.mapcache[0] == p1):
   133             files = util.sort(map)
   134             files = util.sort(map)