hgext/inhibit.py
changeset 1321 8fa74845eb1f
parent 1303 508f9911b042
child 1332 1ed337c7f061
equal deleted inserted replaced
1320:b5cd96395867 1321:8fa74845eb1f
   182     """ Wrap localrepo.transaction to inhibit new obsolete changes """
   182     """ Wrap localrepo.transaction to inhibit new obsolete changes """
   183     def inhibitposttransaction(transaction):
   183     def inhibitposttransaction(transaction):
   184         # At the end of the transaction we catch all the new visible and
   184         # At the end of the transaction we catch all the new visible and
   185         # obsolete commit to inhibit them
   185         # obsolete commit to inhibit them
   186         visibleobsolete = repo.revs('(not hidden()) and obsolete()')
   186         visibleobsolete = repo.revs('(not hidden()) and obsolete()')
       
   187         ignoreset = set(getattr(repo, '_rebaseset', []))
       
   188         visibleobsolete = list(r for r in visibleobsolete if r not in ignoreset)
   187         if visibleobsolete:
   189         if visibleobsolete:
   188             _inhibitmarkers(repo, [repo[r].node() for r in visibleobsolete])
   190             _inhibitmarkers(repo, [repo[r].node() for r in visibleobsolete])
   189     transaction = orig(repo, *args, **kwargs)
   191     transaction = orig(repo, *args, **kwargs)
   190     transaction.addpostclose('inhibitposttransaction', inhibitposttransaction)
   192     transaction.addpostclose('inhibitposttransaction', inhibitposttransaction)
   191     return transaction
   193     return transaction