Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/fileset.py @ 37259:f290f130d7fc
fileset: use context-returning revpair()
Differential Revision: https://phab.mercurial-scm.org/D3011
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 31 Mar 2018 23:26:07 -0700 |
parents | 7c0f40f4f7bf |
children | 5f2dc1b71cf1 |
comparison
equal
deleted
inserted
replaced
37258:3c7c13e75663 | 37259:f290f130d7fc |
---|---|
511 raise error.ParseError(baseerr) | 511 raise error.ParseError(baseerr) |
512 reverr = _("second argument to status must be a revision") | 512 reverr = _("second argument to status must be a revision") |
513 revspec = getstring(r, reverr) | 513 revspec = getstring(r, reverr) |
514 if not revspec: | 514 if not revspec: |
515 raise error.ParseError(reverr) | 515 raise error.ParseError(reverr) |
516 basenode, node = scmutil.revpairnodes(repo, [baserevspec, revspec]) | 516 basectx, ctx = scmutil.revpair(repo, [baserevspec, revspec]) |
517 basectx = repo[basenode] | |
518 ctx = repo[node] | |
519 return getset(mctx.switch(ctx, _buildstatus(ctx, x, basectx=basectx)), x) | 517 return getset(mctx.switch(ctx, _buildstatus(ctx, x, basectx=basectx)), x) |
520 | 518 |
521 @predicate('subrepo([pattern])') | 519 @predicate('subrepo([pattern])') |
522 def subrepo(mctx, x): | 520 def subrepo(mctx, x): |
523 """Subrepositories whose paths match the given pattern. | 521 """Subrepositories whose paths match the given pattern. |