hgext/mq.py
changeset 10873 bbf496db0766
parent 10826 717c35d55fb3
parent 10872 9606edb8777e
child 10881 a685011ed38e
equal deleted inserted replaced
10871:3f30190781a3 10873:bbf496db0766
  1168                 m, a, r, d = repo.status(qp, top)[:4]
  1168                 m, a, r, d = repo.status(qp, top)[:4]
  1169                 if d:
  1169                 if d:
  1170                     raise util.Abort(_("deletions found between repo revs"))
  1170                     raise util.Abort(_("deletions found between repo revs"))
  1171                 for f in a:
  1171                 for f in a:
  1172                     try:
  1172                     try:
  1173                         os.unlink(repo.wjoin(f))
  1173                         util.unlink(repo.wjoin(f))
  1174                     except OSError, e:
  1174                     except OSError, e:
  1175                         if e.errno != errno.ENOENT:
  1175                         if e.errno != errno.ENOENT:
  1176                             raise
  1176                             raise
  1177                     try: os.removedirs(os.path.dirname(repo.wjoin(f)))
       
  1178                     except: pass
       
  1179                     repo.dirstate.forget(f)
  1177                     repo.dirstate.forget(f)
  1180                 for f in m + r:
  1178                 for f in m + r:
  1181                     fctx = ctx[f]
  1179                     fctx = ctx[f]
  1182                     repo.wwrite(f, fctx.data(), fctx.flags())
  1180                     repo.wwrite(f, fctx.data(), fctx.flags())
  1183                     repo.dirstate.normal(f)
  1181                     repo.dirstate.normal(f)