hgext/narrow/narrowbundle2.py
changeset 37084 f0b6fbea00cf
parent 36967 f62873dba3fd
child 37613 96d735601ca1
equal deleted inserted replaced
37083:f99d64e8a4e4 37084:f0b6fbea00cf
    26     extensions,
    26     extensions,
    27     narrowspec,
    27     narrowspec,
    28     repair,
    28     repair,
    29     util,
    29     util,
    30     wireproto,
    30     wireproto,
       
    31 )
       
    32 from mercurial.utils import (
       
    33     stringutil,
    31 )
    34 )
    32 
    35 
    33 NARROWCAP = 'narrow'
    36 NARROWCAP = 'narrow'
    34 _NARROWACL_SECTION = 'narrowhgacl'
    37 _NARROWACL_SECTION = 'narrowhgacl'
    35 _CHANGESPECPART = NARROWCAP + ':changespec'
    38 _CHANGESPECPART = NARROWCAP + ':changespec'
   447         try:
   450         try:
   448             undovfs.unlink(undofile)
   451             undovfs.unlink(undofile)
   449         except OSError as e:
   452         except OSError as e:
   450             if e.errno != errno.ENOENT:
   453             if e.errno != errno.ENOENT:
   451                 ui.warn(_('error removing %s: %s\n') %
   454                 ui.warn(_('error removing %s: %s\n') %
   452                         (undovfs.join(undofile), util.forcebytestr(e)))
   455                         (undovfs.join(undofile), stringutil.forcebytestr(e)))
   453 
   456 
   454     # Remove partial backup only if there were no exceptions
   457     # Remove partial backup only if there were no exceptions
   455     vfs.unlink(chgrpfile)
   458     vfs.unlink(chgrpfile)
   456 
   459 
   457 def setup():
   460 def setup():