Created
January 30, 2011 19:19
-
-
Save palfrey/803140 to your computer and use it in GitHub Desktop.
Revset boilerplate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try: | |
| from mercurial import ui, hg, revset | |
| except ImportError: | |
| raise Exception, "Need mercurial >=1.6 for revset!" | |
| def revs(repo, spec, items = None): | |
| ret = [] | |
| if items == None: | |
| items = range(len(repo)) | |
| m = revset.match(spec) | |
| for r in m(repo, items): | |
| ret += [r] | |
| return ret | |
| repo = hg.repository(ui.ui(), '.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment