##// END OF EJS Templates
commands: add hidden -T option for files/manifest/status/tags...
Matt Mackall -
r22429:7a7eed51 default
parent child Browse files
Show More
@@ -101,6 +101,12 commitopts2 = [
101 101 _('record the specified user as committer'), _('USER')),
102 102 ]
103 103
104 # hidden for now
105 formatteropts = [
106 ('T', 'template', '',
107 _('display with template (DEPRECATED)'), _('TEMPLATE')),
108 ]
109
104 110 templateopts = [
105 111 ('', 'style', '',
106 112 _('display using template map file (DEPRECATED)'), _('STYLE')),
@@ -3064,7 +3070,7 def export(ui, repo, *changesets, **opts
3064 3070 @command('files',
3065 3071 [('r', 'rev', '', _('search the repository as it is in REV'), _('REV')),
3066 3072 ('0', 'print0', None, _('end filenames with NUL, for use with xargs')),
3067 ] + walkopts,
3073 ] + walkopts + formatteropts,
3068 3074 _('[OPTION]... [PATTERN]...'))
3069 3075 def files(ui, repo, *pats, **opts):
3070 3076 """list tracked files
@@ -4343,7 +4349,8 def log(ui, repo, *pats, **opts):
4343 4349
4344 4350 @command('manifest',
4345 4351 [('r', 'rev', '', _('revision to display'), _('REV')),
4346 ('', 'all', False, _("list files from all revisions"))],
4352 ('', 'all', False, _("list files from all revisions"))]
4353 + formatteropts,
4347 4354 _('[-r REV]'))
4348 4355 def manifest(ui, repo, node=None, rev=None, **opts):
4349 4356 """output the current or given revision of the project manifest
@@ -5502,7 +5509,7 class httpservice(object):
5502 5509 ('0', 'print0', None, _('end filenames with NUL, for use with xargs')),
5503 5510 ('', 'rev', [], _('show difference from revision'), _('REV')),
5504 5511 ('', 'change', '', _('list the changed files of a revision'), _('REV')),
5505 ] + walkopts + subrepoopts,
5512 ] + walkopts + subrepoopts + formatteropts,
5506 5513 _('[OPTION]... [FILE]...'),
5507 5514 inferrepo=True)
5508 5515 def status(ui, repo, *pats, **opts):
@@ -5957,7 +5964,7 def tag(ui, repo, name1, *names, **opts)
5957 5964 finally:
5958 5965 release(lock, wlock)
5959 5966
5960 @command('tags', [], '')
5967 @command('tags', formatteropts, '')
5961 5968 def tags(ui, repo, **opts):
5962 5969 """list repository tags
5963 5970
@@ -211,7 +211,7 Show all commands + options
211 211 push: force, rev, bookmark, branch, new-branch, ssh, remotecmd, insecure
212 212 remove: after, force, include, exclude
213 213 serve: accesslog, daemon, daemon-pipefds, errorlog, port, address, prefix, name, web-conf, webdir-conf, pid-file, stdio, cmdserver, templates, style, ipv6, certificate
214 status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, change, include, exclude, subrepos
214 status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, change, include, exclude, subrepos, template
215 215 summary: remote
216 216 update: clean, check, date, rev, tool
217 217 addremove: similarity, include, exclude, dry-run
@@ -258,7 +258,7 Show all commands + options
258 258 debugsuccessorssets:
259 259 debugwalk: include, exclude
260 260 debugwireargs: three, four, five, ssh, remotecmd, insecure
261 files: rev, print0, include, exclude
261 files: rev, print0, include, exclude, template
262 262 graft: rev, continue, edit, log, force, currentdate, currentuser, date, user, tool, dry-run
263 263 grep: print0, all, text, follow, ignore-case, files-with-matches, line-number, rev, user, date, include, exclude
264 264 heads: rev, topo, active, closed, style, template
@@ -267,7 +267,7 Show all commands + options
267 267 import: strip, base, edit, force, no-commit, bypass, partial, exact, import-branch, message, logfile, date, user, similarity
268 268 incoming: force, newest-first, bundle, rev, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos
269 269 locate: rev, print0, fullpath, include, exclude
270 manifest: rev, all
270 manifest: rev, all, template
271 271 outgoing: force, rev, newest-first, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos
272 272 parents: rev, style, template
273 273 paths:
@@ -279,7 +279,7 Show all commands + options
279 279 rollback: dry-run, force
280 280 root:
281 281 tag: force, local, rev, remove, edit, message, date, user
282 tags:
282 tags: template
283 283 tip: patch, git, style, template
284 284 unbundle: update
285 285 verify:
@@ -179,6 +179,24 hg tags (utf-8)
179 179 tip 5:a52c0692f24a
180 180 \xc3\xa9 3:ca661e7520de (esc)
181 181
182 hg tags (JSON)
183
184 $ hg tags -Tjson
185 [
186 {
187 "id": "a52c0692f24a",
188 "rev": 5,
189 "tag": "tip",
190 "type": ""
191 },
192 {
193 "id": "ca661e7520de",
194 "rev": 3,
195 "tag": "\xc3\xa9", (esc)
196 "type": ""
197 }
198 ]
199
182 200 hg branches (ascii)
183 201
184 202 $ HGENCODING=ascii hg branches
@@ -165,6 +165,42 hg status -A:
165 165 C .hgignore
166 166 C modified
167 167
168 $ hg status -A -Tjson
169 [
170 {
171 "path": "added",
172 "status": "A"
173 },
174 {
175 "copy": "modified",
176 "path": "copied",
177 "status": "A"
178 },
179 {
180 "path": "removed",
181 "status": "R"
182 },
183 {
184 "path": "deleted",
185 "status": "!"
186 },
187 {
188 "path": "unknown",
189 "status": "?"
190 },
191 {
192 "path": "ignored",
193 "status": "I"
194 },
195 {
196 "path": ".hgignore",
197 "status": "C"
198 },
199 {
200 "path": "modified",
201 "status": "C"
202 }
203 ]
168 204
169 205 $ echo "^ignoreddir$" > .hgignore
170 206 $ mkdir ignoreddir
General Comments 0
You need to be logged in to leave comments. Login now