hgext/mq.py
changeset 11644 c4f6f0a1bd5a
parent 11575 a5903e612f07
parent 11637 64f284da1278
child 11699 da0b9109186d
equal deleted inserted replaced
11635:4da35e02b67c 11644:c4f6f0a1bd5a
  2415         update = False
  2415         update = False
  2416     elif p[1] == nullid and rev != cl.ancestor(p[0], rev):
  2416     elif p[1] == nullid and rev != cl.ancestor(p[0], rev):
  2417         update = False
  2417         update = False
  2418     elif rev not in (cl.ancestor(p[0], rev), cl.ancestor(p[1], rev)):
  2418     elif rev not in (cl.ancestor(p[0], rev), cl.ancestor(p[1], rev)):
  2419         update = False
  2419         update = False
       
  2420 
       
  2421     q = repo.mq
       
  2422     if q.applied:
       
  2423         if rev == cl.ancestor(repo.lookup('qtip'), rev):
       
  2424             q.applied_dirty = True
       
  2425             start = 0
       
  2426             end = len(q.applied)
       
  2427             applied_list = [i.node for i in q.applied]
       
  2428             if rev in applied_list:
       
  2429                 start = applied_list.index(rev)
       
  2430             del q.applied[start:end]
       
  2431             q.save_dirty()
  2420 
  2432 
  2421     repo.mq.strip(repo, rev, backup=backup, update=update, force=opts['force'])
  2433     repo.mq.strip(repo, rev, backup=backup, update=update, force=opts['force'])
  2422     return 0
  2434     return 0
  2423 
  2435 
  2424 def select(ui, repo, *args, **opts):
  2436 def select(ui, repo, *args, **opts):