mercurial/util.py
changeset 13235 6bf39d88c857
parent 13228 d18a748d9c33
child 13279 eed22340b7aa
equal deleted inserted replaced
13234:0935ff767285 13235:6bf39d88c857
   429                 raise error.SignatureError
   429                 raise error.SignatureError
   430             raise
   430             raise
   431 
   431 
   432     return check
   432     return check
   433 
   433 
   434 def unlink(f):
   434 def unlinkpath(f):
   435     """unlink and remove the directory if it is empty"""
   435     """unlink and remove the directory if it is empty"""
   436     os.unlink(f)
   436     os.unlink(f)
   437     # try removing directories that might now be empty
   437     # try removing directories that might now be empty
   438     try:
   438     try:
   439         os.removedirs(os.path.dirname(f))
   439         os.removedirs(os.path.dirname(f))