mercurial/cmdutil.py
changeset 34893 068e0e531584
parent 34857 84c6b9384d6a
child 34900 3a3adbcbd3a0
equal deleted inserted replaced
34892:e1458bce84db 34893:068e0e531584
   524     """
   524     """
   525     # the order matters here as that is used to produce final list
   525     # the order matters here as that is used to produce final list
   526     allst = ('m', 'a', 'r', 'd', 'u', 'i', 'c')
   526     allst = ('m', 'a', 'r', 'd', 'u', 'i', 'c')
   527 
   527 
   528     # checking the argument validity
   528     # checking the argument validity
   529     for s in terseargs:
   529     for s in pycompat.bytestr(terseargs):
   530         if s not in allst:
   530         if s not in allst:
   531             raise error.Abort(_("'%s' not recognized") % s)
   531             raise error.Abort(_("'%s' not recognized") % s)
   532 
   532 
   533     # creating a dirnode object for the root of the repo
   533     # creating a dirnode object for the root of the repo
   534     rootobj = dirnode('')
   534     rootobj = dirnode('')
   535     pstatus = ('modified', 'added', 'deleted', 'clean', 'unknown',
   535     pstatus = ('modified', 'added', 'deleted', 'clean', 'unknown',
   536                'ignored', 'removed')
   536                'ignored', 'removed')
   537 
   537 
   538     tersedict = {}
   538     tersedict = {}
   539     for attrname in pstatus:
   539     for attrname in pstatus:
       
   540         statuschar = attrname[0:1]
   540         for f in getattr(statuslist, attrname):
   541         for f in getattr(statuslist, attrname):
   541             rootobj.addfile(f, attrname[0])
   542             rootobj.addfile(f, statuschar)
   542         tersedict[attrname[0]] = []
   543         tersedict[statuschar] = []
   543 
   544 
   544     # we won't be tersing the root dir, so add files in it
   545     # we won't be tersing the root dir, so add files in it
   545     for st, fpath in rootobj.iterfilepaths():
   546     for st, fpath in rootobj.iterfilepaths():
   546         tersedict[st].append(fpath)
   547         tersedict[st].append(fpath)
   547 
   548