comparison 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
comparison
equal deleted inserted replaced
577:5291a16324c0 578:e33c85d2812a
1253 self.dirstate.update([f], 'm') 1253 self.dirstate.update([f], 'm')
1254 1254
1255 for f in remove: 1255 for f in remove:
1256 self.ui.note("removing %s\n" % f) 1256 self.ui.note("removing %s\n" % f)
1257 os.unlink(f) 1257 os.unlink(f)
1258 # try removing directories that might now be empty
1259 try: os.removedirs(os.path.dirname(f))
1260 except: pass
1258 if mode == 'n': 1261 if mode == 'n':
1259 self.dirstate.forget(remove) 1262 self.dirstate.forget(remove)
1260 else: 1263 else:
1261 self.dirstate.update(remove, 'r') 1264 self.dirstate.update(remove, 'r')
1262 1265