comparison mercurial/windows.py @ 13235:6bf39d88c857

rename util.unlink to unlinkpath
author Adrian Buehlmann <adrian@cadifra.com>
date Sun, 02 Jan 2011 19:34:41 +0100
parents 650314ed845d
children e9a52ed28157
comparison
equal deleted inserted replaced
13234:0935ff767285 13235:6bf39d88c857
274 os.rmdir(head) 274 os.rmdir(head)
275 except: 275 except:
276 break 276 break
277 head, tail = os.path.split(head) 277 head, tail = os.path.split(head)
278 278
279 def unlink(f): 279 def unlinkpath(f):
280 """unlink and remove the directory if it is empty""" 280 """unlink and remove the directory if it is empty"""
281 os.unlink(f) 281 os.unlink(f)
282 # try removing directories that might now be empty 282 # try removing directories that might now be empty
283 try: 283 try:
284 _removedirs(os.path.dirname(f)) 284 _removedirs(os.path.dirname(f))