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>
except OSError, e:
if e.errno != errno.ENOENT and e.errno != errno.EISDIR:
raise
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):
def uniquePath(path, branch):
def fileExists(path):