hgkw/keyword.py
changeset 382 e8d4a289f8e4
parent 381 17e94f77de6a
child 383 af4c062c4b41
equal deleted inserted replaced
381:17e94f77de6a 382:e8d4a289f8e4
   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() or repo.root.endswith('/.hg/patches'):
   415     if not repo.local() or '.hg' in repo.root.split('/'):
   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
   426             return
   426             return
   427         # shrink if rev is not current node
   427         # shrink if rev is not current node
   428         if node1 is not None and node1 != repo.changectx().node():
   428         if node1 is not None and node1 != repo.changectx().node():
   429             hgcmd = 'diff1'
   429             hgcmd = 'diff1'
   430 
   430 
   431     inc, exc = [], ['.hgtags']
   431     inc, exc = [], ['.hgtags', '.hg_archival.txt']
   432     for pat, opt in ui.configitems('keyword'):
   432     for pat, opt in ui.configitems('keyword'):
   433         if opt != 'ignore':
   433         if opt != 'ignore':
   434             inc.append(pat)
   434             inc.append(pat)
   435         else:
   435         else:
   436             exc.append(pat)
   436             exc.append(pat)