comparison mercurial/revset.py @ 16720:e825a89de5d7

context: add changectx.closesbranch() method This removes the duplicated code for inspecting the 'close' extra field in a changeset.
author Brodie Rao <brodie@sf.io>
date Sun, 13 May 2012 14:04:06 +0200
parents 525fdb738975
children 9acb5cd19162
comparison
equal deleted inserted replaced
16719:e7bf09acd410 16720:e825a89de5d7
393 """``closed()`` 393 """``closed()``
394 Changeset is closed. 394 Changeset is closed.
395 """ 395 """
396 # i18n: "closed" is a keyword 396 # i18n: "closed" is a keyword
397 getargs(x, 0, 0, _("closed takes no arguments")) 397 getargs(x, 0, 0, _("closed takes no arguments"))
398 return [r for r in subset if repo[r].extra().get('close')] 398 return [r for r in subset if repo[r].closesbranch()]
399 399
400 def contains(repo, subset, x): 400 def contains(repo, subset, x):
401 """``contains(pattern)`` 401 """``contains(pattern)``
402 Revision contains a file matching pattern. See :hg:`help patterns` 402 Revision contains a file matching pattern. See :hg:`help patterns`
403 for information about file patterns. 403 for information about file patterns.