comparison mercurial/context.py @ 12360:4ae3e5dffa60 stable

context: fix filectx.undelete() (issue2388)
author Patrick Mezard <pmezard@gmail.com>
date Tue, 21 Sep 2010 23:14:58 +0200
parents b6173aee4a47
children 2754c8273132
comparison
equal deleted inserted replaced
12359:55dc918c21d5 12360:4ae3e5dffa60
841 try: 841 try:
842 for f in list: 842 for f in list:
843 if self._repo.dirstate[f] != 'r': 843 if self._repo.dirstate[f] != 'r':
844 self._repo.ui.warn(_("%s not removed!\n") % f) 844 self._repo.ui.warn(_("%s not removed!\n") % f)
845 else: 845 else:
846 fctx = f in pctxs[0] and pctxs[0] or pctxs[1] 846 fctx = f in pctxs[0] and pctxs[0][f] or pctxs[1][f]
847 t = fctx.data() 847 t = fctx.data()
848 self._repo.wwrite(f, t, fctx.flags()) 848 self._repo.wwrite(f, t, fctx.flags())
849 self._repo.dirstate.normal(f) 849 self._repo.dirstate.normal(f)
850 finally: 850 finally:
851 wlock.release() 851 wlock.release()