##// END OF EJS Templates
log: do not display hidden changeset...
Pierre-Yves David -
r14645:e4cfdff6 default
parent child Browse files
Show More
@@ -3345,6 +3345,7 b' def locate(ui, repo, *pats, **opts):'
3345 _('show changesets within the given named branch'), _('BRANCH')),
3345 _('show changesets within the given named branch'), _('BRANCH')),
3346 ('P', 'prune', [],
3346 ('P', 'prune', [],
3347 _('do not display revision or any of its ancestors'), _('REV')),
3347 _('do not display revision or any of its ancestors'), _('REV')),
3348 ('h', 'hidden', False, _('show hidden changesets')),
3348 ] + logopts + walkopts,
3349 ] + logopts + walkopts,
3349 _('[OPTION]... [FILE]'))
3350 _('[OPTION]... [FILE]'))
3350 def log(ui, repo, *pats, **opts):
3351 def log(ui, repo, *pats, **opts):
@@ -3406,6 +3407,8 b' def log(ui, repo, *pats, **opts):'
3406 return
3407 return
3407 if opts.get('branch') and ctx.branch() not in opts['branch']:
3408 if opts.get('branch') and ctx.branch() not in opts['branch']:
3408 return
3409 return
3410 if not opts.get('hidden') and ctx.hidden():
3411 return
3409 if df and not df(ctx.date()[0]):
3412 if df and not df(ctx.date()[0]):
3410 return
3413 return
3411 if opts['user'] and not [k for k in opts['user']
3414 if opts['user'] and not [k for k in opts['user']
@@ -194,7 +194,7 b' Show all commands + options'
194 export: output, switch-parent, rev, text, git, nodates
194 export: output, switch-parent, rev, text, git, nodates
195 forget: include, exclude
195 forget: include, exclude
196 init: ssh, remotecmd, insecure
196 init: ssh, remotecmd, insecure
197 log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, branch, prune, patch, git, limit, no-merges, stat, style, template, include, exclude
197 log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, branch, prune, hidden, patch, git, limit, no-merges, stat, style, template, include, exclude
198 merge: force, tool, rev, preview
198 merge: force, tool, rev, preview
199 pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure
199 pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure
200 push: force, rev, bookmark, branch, new-branch, ssh, remotecmd, insecure
200 push: force, rev, bookmark, branch, new-branch, ssh, remotecmd, insecure
@@ -1138,3 +1138,21 b' Diff here should be the same:'
1138 date: Thu Jan 01 00:00:00 1970 +0000
1138 date: Thu Jan 01 00:00:00 1970 +0000
1139 summary: a
1139 summary: a
1140
1140
1141 $ cat > $HGTMP/testhidden.py << EOF
1142 > def reposetup(ui, repo):
1143 > for line in repo.opener('hidden'):
1144 > ctx = repo[line.strip()]
1145 > repo.changelog.hiddenrevs.add(ctx.rev())
1146 > EOF
1147 $ echo '[extensions]' >> $HGRCPATH
1148 $ echo "hidden=$HGTMP/testhidden.py" >> $HGRCPATH
1149 $ touch .hg/hidden
1150 $ hg log --template='{rev}:{node}\n'
1151 1:a765632148dc55d38c35c4f247c618701886cb2f
1152 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1153 $ echo a765632148dc55d38c35c4f247c618701886cb2f > .hg/hidden
1154 $ hg log --template='{rev}:{node}\n'
1155 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
1156 $ hg log --template='{rev}:{node}\n' --hidden
1157 1:a765632148dc55d38c35c4f247c618701886cb2f
1158 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
General Comments 0
You need to be logged in to leave comments. Login now