Details
Details
- Reviewers
durin42 pulkit - Group Reviewers
hg-reviewers - Commits
- rHG383fdfa6bba9: narrow: fix typo "respositories"
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
durin42 | |
pulkit |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/narrow/narrowcommands.py (2 lines) | |||
M | tests/test-narrow-trackedcmd.t (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
1f4b0f460d43 | 8ab1ae7f1cf4 | Martin von Zweigbergk | Aug 22 2019, 7:47 PM |
--import-rules accepts a path to a file containing rules, allowing you to | --import-rules accepts a path to a file containing rules, allowing you to | ||||
add --addinclude, --addexclude rules in bulk. Like the other include and | add --addinclude, --addexclude rules in bulk. Like the other include and | ||||
exclude switches, the changes are applied immediately. | exclude switches, the changes are applied immediately. | ||||
""" | """ | ||||
opts = pycompat.byteskwargs(opts) | opts = pycompat.byteskwargs(opts) | ||||
if repository.NARROW_REQUIREMENT not in repo.requirements: | if repository.NARROW_REQUIREMENT not in repo.requirements: | ||||
raise error.Abort(_('the tracked command is only supported on ' | raise error.Abort(_('the tracked command is only supported on ' | ||||
'respositories cloned with --narrow')) | 'repositories cloned with --narrow')) | ||||
# Before supporting, decide whether it "hg tracked --clear" should mean | # Before supporting, decide whether it "hg tracked --clear" should mean | ||||
# tracking no paths or all paths. | # tracking no paths or all paths. | ||||
if opts['clear']: | if opts['clear']: | ||||
raise error.Abort(_('the --clear option is not yet supported')) | raise error.Abort(_('the --clear option is not yet supported')) | ||||
# import rules from a file | # import rules from a file | ||||
newrules = opts.get('import_rules') | newrules = opts.get('import_rules') |
$ cd .. | $ cd .. | ||||
Testing tracked command on a non-narrow repo | Testing tracked command on a non-narrow repo | ||||
$ hg init non-narrow | $ hg init non-narrow | ||||
$ cd non-narrow | $ cd non-narrow | ||||
$ hg tracked --addinclude foobar | $ hg tracked --addinclude foobar | ||||
abort: the tracked command is only supported on respositories cloned with --narrow | abort: the tracked command is only supported on repositories cloned with --narrow | ||||
[255] | [255] |