Details
Details
- Reviewers
durin42 martinvonz - Group Reviewers
hg-reviewers - Commits
- rHGebbc4e70ebd1: narrow: fix command name in error messsage
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
durin42 | |
martinvonz |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/narrow/narrowcommands.py (2 lines) | |||
M | tests/test-narrow-trackedcmd.t (10 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Pulkit Goyal | Feb 11 2019, 11:41 AM |
If --clear is specified, then all previous includes and excludes are DROPPED | If --clear is specified, then all previous includes and excludes are DROPPED | ||||
and replaced by the new ones specified to --addinclude and --addexclude. | and replaced by the new ones specified to --addinclude and --addexclude. | ||||
If --clear is specified without any further options, the narrowspec will be | If --clear is specified without any further options, the narrowspec will be | ||||
empty and will not match any files. | empty and will not match any files. | ||||
""" | """ | ||||
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 narrow command is only supported on ' | raise error.Abort(_('the tracked command is only supported on ' | ||||
'respositories cloned with --narrow')) | 'respositories 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 |
searching for changes | searching for changes | ||||
no changes found | no changes found | ||||
saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob) | saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob) | ||||
adding changesets | adding changesets | ||||
adding manifests | adding manifests | ||||
adding file changes | adding file changes | ||||
added 3 changesets with 0 changes to 0 files | added 3 changesets with 0 changes to 0 files | ||||
new changesets *:* (glob) | new changesets *:* (glob) | ||||
$ cd .. | |||||
Testing tracked command on a non-narrow repo | |||||
$ hg init non-narrow | |||||
$ cd non-narrow | |||||
$ hg tracked --addinclude foobar | |||||
abort: the tracked command is only supported on respositories cloned with --narrow | |||||
[255] |