diff --git a/hgext/graphlog.py b/hgext/graphlog.py --- a/hgext/graphlog.py +++ b/hgext/graphlog.py @@ -39,7 +39,6 @@ testedwith = 'internal' _('show changesets within the given named branch'), _('BRANCH')), ('P', 'prune', [], _('do not display revision or any of its ancestors'), _('REV')), - ('', 'hidden', False, _('show hidden changesets (DEPRECATED)')), ] + commands.logopts + commands.walkopts, _('[OPTION]... [FILE]')) def graphlog(ui, repo, *pats, **opts): diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -1406,8 +1406,6 @@ def getgraphlogrevs(repo, pats, opts): # depends on revisions resolved from --rev... follow = opts.get('follow') or opts.get('follow_first') possiblyunsorted = False # whether revs might need sorting - if not opts.get('hidden'): - repo = repo.filtered('hidden') if opts.get('rev'): revs = scmutil.revrange(repo, opts['rev']) # Don't sort here because _makegraphlogrevset might depend on the diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -49,6 +49,7 @@ globalopts = [ ('', 'profile', None, _('print command execution profile')), ('', 'version', None, _('output version information and exit')), ('h', 'help', None, _('display help and exit')), + ('', 'hidden', False, _('consider hidden changesets')), ] dryrunopts = [('n', 'dry-run', None, @@ -4091,7 +4092,6 @@ def locate(ui, repo, *pats, **opts): _('show changesets within the given named branch'), _('BRANCH')), ('P', 'prune', [], _('do not display revision or any of its ancestors'), _('REV')), - ('', 'hidden', False, _('show hidden changesets (DEPRECATED)')), ] + logopts + walkopts, _('[OPTION]... [FILE]')) def log(ui, repo, *pats, **opts): @@ -4207,8 +4207,6 @@ def log(ui, repo, *pats, **opts): return if opts.get('branch') and ctx.branch() not in opts['branch']: return - if not opts.get('hidden') and ctx.hidden(): - return if df and not df(ctx.date()[0]): return diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -710,6 +710,10 @@ def _dispatch(req): repo = hg.repository(ui, path=path) if not repo.local(): raise util.Abort(_("repository '%s' is not local") % path) + if not options['hidden']: + repo = repo.filtered('hidden') + else: + repo = repo.unfiltered() repo.ui.setconfig("bundle", "mainreporoot", repo.root) except error.RequirementError: raise diff --git a/tests/test-commit-amend.t b/tests/test-commit-amend.t --- a/tests/test-commit-amend.t +++ b/tests/test-commit-amend.t @@ -492,9 +492,9 @@ Test that amend does not make it easy to --------------------------------------------------------------------- - $ hg id -r 14 + $ hg id -r 14 --hidden b650e6ee8614 (a) - $ hg revert -ar 14 + $ hg revert -ar 14 --hidden reverting a $ hg commit --amend $ hg id diff --git a/tests/test-debugcomplete.t b/tests/test-debugcomplete.t --- a/tests/test-debugcomplete.t +++ b/tests/test-debugcomplete.t @@ -123,6 +123,7 @@ Show the global options --encoding --encodingmode --help + --hidden --noninteractive --profile --quiet @@ -153,6 +154,7 @@ Show the options for the "serve" command --encodingmode --errorlog --help + --hidden --ipv6 --name --noninteractive @@ -200,7 +202,7 @@ Show all commands + options export: output, switch-parent, rev, text, git, nodates forget: include, exclude init: ssh, remotecmd, insecure - log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, branch, prune, hidden, patch, git, limit, no-merges, stat, graph, style, template, include, exclude + log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, branch, prune, patch, git, limit, no-merges, stat, graph, style, template, include, exclude merge: force, rev, preview, tool pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure push: force, rev, bookmark, branch, new-branch, ssh, remotecmd, insecure diff --git a/tests/test-extension.t b/tests/test-extension.t --- a/tests/test-extension.t +++ b/tests/test-extension.t @@ -200,6 +200,7 @@ hide outer repo --profile print command execution profile --version output version information and exit -h --help display help and exit + --hidden consider hidden changesets [+] marked option can be specified multiple times @@ -230,6 +231,7 @@ hide outer repo --profile print command execution profile --version output version information and exit -h --help display help and exit + --hidden consider hidden changesets [+] marked option can be specified multiple times $ echo 'debugextension = !' >> $HGRCPATH diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -248,6 +248,7 @@ Test short command list with verbose opt --profile print command execution profile --version output version information and exit -h --help display help and exit + --hidden consider hidden changesets [+] marked option can be specified multiple times @@ -334,6 +335,7 @@ Verbose help for add --profile print command execution profile --version output version information and exit -h --help display help and exit + --hidden consider hidden changesets [+] marked option can be specified multiple times diff --git a/tests/test-keyword.t b/tests/test-keyword.t --- a/tests/test-keyword.t +++ b/tests/test-keyword.t @@ -576,6 +576,7 @@ Copy and show added kwfiles Commit and show expansion in original and copy $ hg --debug commit -ma2c -d '1 0' -u 'User Name ' + invalid branchheads cache (unserved): tip differs c c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292 overwriting c expanding keywords @@ -759,7 +760,6 @@ Commit with multi-line message and custo | invalid here. $ hg --debug commit -l log -d '2 0' -u 'User Name ' - invalid branchheads cache: tip differs invalid branchheads cache (unserved): tip differs a invalid branchheads cache: tip differs @@ -806,7 +806,6 @@ remove with status checks $ hg remove a $ hg --debug commit -m rma invalid branchheads cache: tip differs - invalid branchheads cache: tip differs committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012 $ hg status ? c @@ -917,7 +916,6 @@ kwexpand x/a should abort [255] $ cd x $ hg --debug commit -m xa -d '3 0' -u 'User Name ' - invalid branchheads cache: tip differs x/a x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e invalid branchheads cache: tip differs diff --git a/tests/test-log.t b/tests/test-log.t --- a/tests/test-log.t +++ b/tests/test-log.t @@ -1164,7 +1164,7 @@ enable obsolete to test hidden feature test that parent prevent a changeset to be hidden - $ hg up 1 -q + $ hg up 1 -q --hidden $ hg log --template='{rev}:{node}\n' 1:a765632148dc55d38c35c4f247c618701886cb2f 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 diff --git a/tests/test-newbranch.t b/tests/test-newbranch.t --- a/tests/test-newbranch.t +++ b/tests/test-newbranch.t @@ -136,7 +136,6 @@ Test for invalid branch cache: $ cp .hg/bc-invalid $branchcache $ hg --debug log -r foo - invalid branchheads cache: tip differs changeset: 4:adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 branch: foo tag: tip diff --git a/tests/test-obsolete-divergent.t b/tests/test-obsolete-divergent.t --- a/tests/test-obsolete-divergent.t +++ b/tests/test-obsolete-divergent.t @@ -27,7 +27,7 @@ Enable obsolete > hg ci -m "$1" > } $ getid() { - > hg id --debug -ir "desc('$1')" + > hg id --debug --hidden -ir "desc('$1')" > } setup repo @@ -72,7 +72,7 @@ A_1 have two direct and divergent succes |/ @ 0:d20a80d4def3 base - $ hg debugsuccessorssets 'all()' + $ hg debugsuccessorssets --hidden 'all()' d20a80d4def3 d20a80d4def3 007dc284c1f8 @@ -119,7 +119,7 @@ indirect divergence with known changeset |/ o 0:d20a80d4def3 base - $ hg debugsuccessorssets 'all()' + $ hg debugsuccessorssets --hidden 'all()' d20a80d4def3 d20a80d4def3 007dc284c1f8 @@ -154,7 +154,7 @@ indirect divergence with known changeset |/ @ 0:d20a80d4def3 base - $ hg debugsuccessorssets 'all()' + $ hg debugsuccessorssets --hidden 'all()' d20a80d4def3 d20a80d4def3 007dc284c1f8 @@ -180,7 +180,7 @@ do not take unknown node in account if t $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccccccccccccccccc $ hg debugobsolete `getid A_1` dddddddddddddddddddddddddddddddddddddddd - $ hg debugsuccessorssets 'desc('A_0')' + $ hg debugsuccessorssets --hidden 'desc('A_0')' 007dc284c1f8 392fd25390da @@ -208,7 +208,7 @@ divergence that converge again is not di |/ o 0:d20a80d4def3 base - $ hg debugsuccessorssets 'all()' + $ hg debugsuccessorssets --hidden 'all()' d20a80d4def3 d20a80d4def3 007dc284c1f8 @@ -236,7 +236,7 @@ split is not divergences |/ @ 0:d20a80d4def3 base - $ hg debugsuccessorssets 'all()' + $ hg debugsuccessorssets --hidden 'all()' d20a80d4def3 d20a80d4def3 007dc284c1f8 @@ -277,7 +277,7 @@ Even when subsequente rewriting happen |/ o 0:d20a80d4def3 base - $ hg debugsuccessorssets 'all()' + $ hg debugsuccessorssets --hidden 'all()' d20a80d4def3 d20a80d4def3 007dc284c1f8 @@ -333,7 +333,7 @@ Check more complexe obsolescence graft ( |/ @ 0:d20a80d4def3 base - $ hg debugsuccessorssets 'all()' + $ hg debugsuccessorssets --hidden 'all()' d20a80d4def3 d20a80d4def3 007dc284c1f8 @@ -400,7 +400,7 @@ fix the divergence |/ @ 0:d20a80d4def3 base - $ hg debugsuccessorssets 'all()' + $ hg debugsuccessorssets --hidden 'all()' d20a80d4def3 d20a80d4def3 007dc284c1f8 @@ -440,7 +440,7 @@ successors-set. (report [A,B] not [A] + $ hg debugobsolete `getid A_0` `getid A_2` $ hg debugobsolete `getid A_0` `getid A_1` `getid A_2` invalid branchheads cache (unserved): tip differs - $ hg debugsuccessorssets 'desc('A_0')' + $ hg debugsuccessorssets --hidden 'desc('A_0')' 007dc284c1f8 82623d38b9ba 392fd25390da diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t --- a/tests/test-obsolete.t +++ b/tests/test-obsolete.t @@ -11,7 +11,7 @@ > hg ci -m "add $1" > } $ getid() { - > hg id --debug -ir "desc('$1')" + > hg id --debug --hidden -ir "desc('$1')" > } $ cat > debugkeys.py <