merge-recursive::removeFile: remove empty directories

When the last file in a directory is removed as the result of a
merge, try to rmdir the now-empty directory.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2005-11-19 19:50:44 -08:00
parent 397c76697f
commit 80e21a9ed8

View File

@ -293,6 +293,10 @@ def removeFile(clean, path):
except OSError, e:
if e.errno != errno.ENOENT and e.errno != errno.EISDIR:
raise
try:
os.removedirs(os.path.dirname(path))
except:
pass
def uniquePath(path, branch):
def fileExists(path):