hgext/inhibit.py
changeset 1534 9a78ed4b9765
parent 1533 74cf5a69f201
child 1535 f6d10432499d
equal deleted inserted replaced
1533:74cf5a69f201 1534:9a78ed4b9765
   127     obsolete revision only are created.
   127     obsolete revision only are created.
   128     """
   128     """
   129     if not _inhibitenabled(repo):
   129     if not _inhibitenabled(repo):
   130         return
   130         return
   131 
   131 
   132     newinhibit = list(repo.set('::%ln and obsolete()', nodes))
   132     newinhibit = repo.revs('::%ln and obsolete()', nodes)
   133     if newinhibit:
   133     if newinhibit:
       
   134         node = repo.changelog.node
   134         lock = tr = None
   135         lock = tr = None
   135         try:
   136         try:
   136             lock = repo.lock()
   137             lock = repo.lock()
   137             tr = repo.transaction('obsinhibit')
   138             tr = repo.transaction('obsinhibit')
   138             repo._obsinhibit.update(c.node() for c in newinhibit)
   139             repo._obsinhibit.update(node(r) for r in newinhibit)
   139             _schedulewrite(tr, _filterpublic(repo, repo._obsinhibit))
   140             _schedulewrite(tr, _filterpublic(repo, repo._obsinhibit))
   140             repo.invalidatevolatilesets()
   141             repo.invalidatevolatilesets()
   141             tr.close()
   142             tr.close()
   142         finally:
   143         finally:
   143             lockmod.release(tr, lock)
   144             lockmod.release(tr, lock)