Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGf290f130d7fc: fileset: use context-returning revpair()
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/fileset.py (4 lines) |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz |
| baseerr = _("first argument to status must be a revision") | baseerr = _("first argument to status must be a revision") | ||||
| baserevspec = getstring(b, baseerr) | baserevspec = getstring(b, baseerr) | ||||
| if not baserevspec: | if not baserevspec: | ||||
| raise error.ParseError(baseerr) | raise error.ParseError(baseerr) | ||||
| reverr = _("second argument to status must be a revision") | reverr = _("second argument to status must be a revision") | ||||
| revspec = getstring(r, reverr) | revspec = getstring(r, reverr) | ||||
| if not revspec: | if not revspec: | ||||
| raise error.ParseError(reverr) | raise error.ParseError(reverr) | ||||
| basenode, node = scmutil.revpairnodes(repo, [baserevspec, revspec]) | basectx, ctx = scmutil.revpair(repo, [baserevspec, revspec]) | ||||
| basectx = repo[basenode] | |||||
| ctx = repo[node] | |||||
| return getset(mctx.switch(ctx, _buildstatus(ctx, x, basectx=basectx)), x) | return getset(mctx.switch(ctx, _buildstatus(ctx, x, basectx=basectx)), x) | ||||
| @predicate('subrepo([pattern])') | @predicate('subrepo([pattern])') | ||||
| def subrepo(mctx, x): | def subrepo(mctx, x): | ||||
| """Subrepositories whose paths match the given pattern. | """Subrepositories whose paths match the given pattern. | ||||
| """ | """ | ||||
| # i18n: "subrepo" is a keyword | # i18n: "subrepo" is a keyword | ||||
| getargs(x, 0, 1, _("subrepo takes at most one argument")) | getargs(x, 0, 1, _("subrepo takes at most one argument")) | ||||