diff mercurial/hg.py @ 578:e33c85d2812a

Remove empty directories on update -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Remove empty directories on update manifest hash: 113969ec14c75eb9e1013b23cf096f722932b84d -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCxyVoywK+sNU5EO8RAklKAKCzSUhuFClkHN85qlnDp5iVscZbtgCeJVwx dqaqG20GjPMWBg0d1ggI/ro= =o2Uv -----END PGP SIGNATURE-----
author mpm@selenic.com
date Sat, 02 Jul 2005 15:38:16 -0800
parents da11baf5de7b
children ffeb2c3a1966
line wrap: on
line diff
--- a/mercurial/hg.py	Sat Jul 02 15:34:23 2005 -0800
+++ b/mercurial/hg.py	Sat Jul 02 15:38:16 2005 -0800
@@ -1255,6 +1255,9 @@
         for f in remove:
             self.ui.note("removing %s\n" % f)
             os.unlink(f)
+            # try removing directories that might now be empty
+            try: os.removedirs(os.path.dirname(f))
+            except: pass
         if mode == 'n':
             self.dirstate.forget(remove)
         else: