contrib/synthrepo.py
branchstable
changeset 33572 857876ebaed4
parent 32337 46ba2cdda476
child 34023 ba479850c9c7
equal deleted inserted replaced
33202:c1994c986d77 33572:857876ebaed4
    51     nullid,
    51     nullid,
    52     nullrev,
    52     nullrev,
    53     short,
    53     short,
    54 )
    54 )
    55 from mercurial import (
    55 from mercurial import (
    56     cmdutil,
       
    57     context,
    56     context,
    58     error,
    57     error,
    59     hg,
    58     hg,
    60     patch,
    59     patch,
       
    60     registrar,
    61     scmutil,
    61     scmutil,
    62     util,
    62     util,
    63 )
    63 )
    64 
    64 
    65 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
    65 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
    67 # be specifying the version(s) of Mercurial they are tested with, or
    67 # be specifying the version(s) of Mercurial they are tested with, or
    68 # leave the attribute unspecified.
    68 # leave the attribute unspecified.
    69 testedwith = 'ships-with-hg-core'
    69 testedwith = 'ships-with-hg-core'
    70 
    70 
    71 cmdtable = {}
    71 cmdtable = {}
    72 command = cmdutil.command(cmdtable)
    72 command = registrar.command(cmdtable)
    73 
    73 
    74 newfile = set(('new fi', 'rename', 'copy f', 'copy t'))
    74 newfile = {'new fi', 'rename', 'copy f', 'copy t'}
    75 
    75 
    76 def zerodict():
    76 def zerodict():
    77     return collections.defaultdict(lambda: 0)
    77     return collections.defaultdict(lambda: 0)
    78 
    78 
    79 def roundto(x, k):
    79 def roundto(x, k):
   334         return ' '.join(l)
   334         return ' '.join(l)
   335 
   335 
   336     wlock = repo.wlock()
   336     wlock = repo.wlock()
   337     lock = repo.lock()
   337     lock = repo.lock()
   338 
   338 
   339     nevertouch = set(('.hgsub', '.hgignore', '.hgtags'))
   339     nevertouch = {'.hgsub', '.hgignore', '.hgtags'}
   340 
   340 
   341     progress = ui.progress
   341     progress = ui.progress
   342     _synthesizing = _('synthesizing')
   342     _synthesizing = _('synthesizing')
   343     _files = _('initial files')
   343     _files = _('initial files')
   344     _changesets = _('changesets')
   344     _changesets = _('changesets')