Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/util.py @ 13235:6bf39d88c857
rename util.unlink to unlinkpath
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sun, 02 Jan 2011 19:34:41 +0100 |
parents | d18a748d9c33 |
children | eed22340b7aa |
comparison
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)) |