mercurial/hook.py
branchstable
changeset 49366 288de6f5d724
parent 48913 f254fc73d956
child 50356 2761ce777fc4
equal deleted inserted replaced
49364:e8ea403b1c46 49366:288de6f5d724
     3 # Copyright 2007 Olivia Mackall <olivia@selenic.com>
     3 # Copyright 2007 Olivia Mackall <olivia@selenic.com>
     4 #
     4 #
     5 # This software may be used and distributed according to the terms of the
     5 # This software may be used and distributed according to the terms of the
     6 # GNU General Public License version 2 or any later version.
     6 # GNU General Public License version 2 or any later version.
     7 
     7 
     8 from __future__ import absolute_import
       
     9 
     8 
    10 import contextlib
     9 import contextlib
    11 import errno
    10 import errno
    12 import os
    11 import os
    13 import sys
    12 import sys
   165     if plain:
   164     if plain:
   166         env[b'HGPLAIN'] = b'1'
   165         env[b'HGPLAIN'] = b'1'
   167     else:
   166     else:
   168         env[b'HGPLAIN'] = b''
   167         env[b'HGPLAIN'] = b''
   169 
   168 
   170     for k, v in pycompat.iteritems(args):
   169     for k, v in args.items():
   171         # transaction changes can accumulate MBs of data, so skip it
   170         # transaction changes can accumulate MBs of data, so skip it
   172         # for external hooks
   171         # for external hooks
   173         if k == b'changes':
   172         if k == b'changes':
   174             continue
   173             continue
   175         if callable(v):
   174         if callable(v):