Same reasoning as in the previous patch. hg export drops from 0.180s
to 0.140s.
Details
Details
- Reviewers
durin42 marmoute - Group Reviewers
hg-reviewers
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
durin42 | |
marmoute |
hg-reviewers |
Same reasoning as in the previous patch. hg export drops from 0.180s
to 0.140s.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/commands.py (5 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
f896eacef196 | 4b690947aeca | Martin von Zweigbergk | Oct 22 2019, 1:40 PM |
Status | Author | Revision | |
---|---|---|---|
Abandoned | martinvonz | ||
Abandoned | martinvonz | ||
Abandoned | martinvonz | ||
Abandoned | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz |
if not kwargs.get(b'rev') and not kwargs.get(b'change'): | if not kwargs.get(b'rev') and not kwargs.get(b'change'): | ||||
use_unfiltered = True | use_unfiltered = True | ||||
elif commandname == b'diff': | elif commandname == b'diff': | ||||
if not kwargs.get(b'rev') and not kwargs.get(b'change'): | if not kwargs.get(b'rev') and not kwargs.get(b'change'): | ||||
use_unfiltered = True | use_unfiltered = True | ||||
elif commandname == b'annotate': | elif commandname == b'annotate': | ||||
if not kwargs.get(b'rev'): | if not kwargs.get(b'rev'): | ||||
use_unfiltered = True | use_unfiltered = True | ||||
elif commandname == b'export': | |||||
if not kwargs.get(b'bookmark') and not args: | |||||
use_unfiltered = True | |||||
return repo.unfiltered() if use_unfiltered else repo | return repo.unfiltered() if use_unfiltered else repo | ||||
# Commands start here, listed alphabetically | # Commands start here, listed alphabetically | ||||
@command( | @command( | ||||
""" | """ | ||||
opts = pycompat.byteskwargs(opts) | opts = pycompat.byteskwargs(opts) | ||||
bookmark = opts.get(b'bookmark') | bookmark = opts.get(b'bookmark') | ||||
changesets += tuple(opts.get(b'rev', [])) | changesets += tuple(opts.get(b'rev', [])) | ||||
if bookmark and changesets: | if bookmark and changesets: | ||||
raise error.Abort(_(b"-r and -B are mutually exclusive")) | raise error.Abort(_(b"-r and -B are mutually exclusive")) | ||||
repo =_maybeunfilteredrepo(repo, b'export', changesets, opts) | |||||
if bookmark: | if bookmark: | ||||
if bookmark not in repo._bookmarks: | if bookmark not in repo._bookmarks: | ||||
raise error.Abort(_(b"bookmark '%s' not found") % bookmark) | raise error.Abort(_(b"bookmark '%s' not found") % bookmark) | ||||
revs = scmutil.bookmarkrevs(repo, bookmark) | revs = scmutil.bookmarkrevs(repo, bookmark) | ||||
else: | else: | ||||
if not changesets: | if not changesets: | ||||
changesets = [b'.'] | changesets = [b'.'] |