Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG93620a4ba88d: subrepo: avoid calculating subrepo prefix twice for cat() (API)
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/cmdutil.py (8 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| Martin von Zweigbergk | Feb 7 2019, 12:46 PM |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz | ||
| Closed | martinvonz |
| for abs in ctx.walk(matcher): | for abs in ctx.walk(matcher): | ||||
| write(abs) | write(abs) | ||||
| err = 0 | err = 0 | ||||
| for subpath in sorted(ctx.substate): | for subpath in sorted(ctx.substate): | ||||
| sub = ctx.sub(subpath) | sub = ctx.sub(subpath) | ||||
| try: | try: | ||||
| submatch = matchmod.subdirmatcher(subpath, matcher) | submatch = matchmod.subdirmatcher(subpath, matcher) | ||||
| subprefix = os.path.join(prefix, sub._path) | |||||
| if not sub.cat(submatch, basefm, fntemplate, | if not sub.cat(submatch, basefm, fntemplate, subprefix, | ||||
| os.path.join(prefix, sub._path), | |||||
| **pycompat.strkwargs(opts)): | **pycompat.strkwargs(opts)): | ||||
| err = 0 | err = 0 | ||||
| except error.RepoLookupError: | except error.RepoLookupError: | ||||
| ui.status(_("skipping missing subrepository: %s\n") | ui.status(_("skipping missing subrepository: %s\n") % subprefix) | ||||
| % os.path.join(prefix, subpath)) | |||||
| return err | return err | ||||
| def commit(ui, repo, commitfunc, pats, opts): | def commit(ui, repo, commitfunc, pats, opts): | ||||
| '''commit the specified files or all outstanding changes''' | '''commit the specified files or all outstanding changes''' | ||||
| date = opts.get('date') | date = opts.get('date') | ||||
| if date: | if date: | ||||
| opts['date'] = dateutil.parsedate(date) | opts['date'] = dateutil.parsedate(date) | ||||