comparison hgext/largefiles/lfcommands.py @ 15900:29defa7d20f6 stable

largefiles: remove empty directories upon update (issue3202)
author Patrick Mezard <pmezard@gmail.com>
date Tue, 17 Jan 2012 11:29:32 +0100
parents 9036c7d106bf
children 8435fa20dff9
comparison
equal deleted inserted replaced
15872:a3e2b9a1f063 15900:29defa7d20f6
449 # Remove lfiles for which the standin is deleted, unless the 449 # Remove lfiles for which the standin is deleted, unless the
450 # lfile is added to the repository again. This happens when a 450 # lfile is added to the repository again. This happens when a
451 # largefile is converted back to a normal file: the standin 451 # largefile is converted back to a normal file: the standin
452 # disappears, but a new (normal) file appears as the lfile. 452 # disappears, but a new (normal) file appears as the lfile.
453 if os.path.exists(abslfile) and lfile not in repo[None]: 453 if os.path.exists(abslfile) and lfile not in repo[None]:
454 os.unlink(abslfile) 454 util.unlinkpath(abslfile)
455 ret = -1 455 ret = -1
456 state = repo.dirstate[lfutil.standin(lfile)] 456 state = repo.dirstate[lfutil.standin(lfile)]
457 if state == 'n': 457 if state == 'n':
458 lfdirstate.normal(lfile) 458 lfdirstate.normal(lfile)
459 elif state == 'r': 459 elif state == 'r':