hgkw/keyword.py
changeset 381 17e94f77de6a
parent 378 0683aaf458d8
child 382 e8d4a289f8e4
equal deleted inserted replaced
378:0683aaf458d8 381:17e94f77de6a
    88 
    88 
    89 commands.optionalrepo += ' kwdemo'
    89 commands.optionalrepo += ' kwdemo'
    90 
    90 
    91 # hg commands that do not act on keywords
    91 # hg commands that do not act on keywords
    92 nokwcommands = ('add addremove bundle copy export grep identify incoming init'
    92 nokwcommands = ('add addremove bundle copy export grep identify incoming init'
    93                 ' log outgoing push remove rename rollback tip convert')
    93                 ' log outgoing push remove rename rollback tip convert email')
    94 
    94 
    95 # hg commands that trigger expansion only when writing to working dir,
    95 # hg commands that trigger expansion only when writing to working dir,
    96 # not when reading filelog, and unexpand when reading from working dir
    96 # not when reading filelog, and unexpand when reading from working dir
    97 restricted = 'diff1 record qfold qimport qnew qpush qrefresh qrecord'
    97 restricted = 'diff1 record qfold qimport qnew qpush qrefresh qrecord'
    98 
    98 
   410     Wraps commit to overwrite configured files with updated
   410     Wraps commit to overwrite configured files with updated
   411     keyword substitutions.
   411     keyword substitutions.
   412     This is done for local repos only, and only if there are
   412     This is done for local repos only, and only if there are
   413     files configured at all for keyword substitution.'''
   413     files configured at all for keyword substitution.'''
   414 
   414 
   415     if not repo.local():
   415     if not repo.local() or repo.root.endswith('/.hg/patches'):
   416         return
   416         return
   417 
   417 
   418     hgcmd, func, args, opts, cmdopts = dispatch._parse(ui, sys.argv[1:])
   418     hgcmd, func, args, opts, cmdopts = dispatch._parse(ui, sys.argv[1:])
   419     if hgcmd in nokwcommands.split():
   419     if hgcmd in nokwcommands.split():
   420         return
   420         return