##// END OF EJS Templates
add new option --all to manifest command...
Adrian Buehlmann -
r14399:71938479 default
parent child Browse files
Show More
@@ -3392,9 +3392,10 b' def log(ui, repo, *pats, **opts):'
3392 3392 displayer.close()
3393 3393
3394 3394 @command('manifest',
3395 [('r', 'rev', '', _('revision to display'), _('REV'))],
3395 [('r', 'rev', '', _('revision to display'), _('REV')),
3396 ('', 'all', False, _("list files from all revisions"))],
3396 3397 _('[-r REV]'))
3397 def manifest(ui, repo, node=None, rev=None):
3398 def manifest(ui, repo, node=None, rev=None, **opts):
3398 3399 """output the current or given revision of the project manifest
3399 3400
3400 3401 Print a list of version controlled files for the given revision.
@@ -3404,8 +3405,30 b' def manifest(ui, repo, node=None, rev=No'
3404 3405 With -v, print file permissions, symlink and executable bits.
3405 3406 With --debug, print file revision hashes.
3406 3407
3408 If option --all is specified, the list of all files from all revisions
3409 is printed. This includes deleted and renamed files.
3410
3407 3411 Returns 0 on success.
3408 3412 """
3413 if opts.get('all'):
3414 if rev or node:
3415 raise util.Abort(_("can't specify a revision with --all"))
3416
3417 res = []
3418 prefix = "data/"
3419 suffix = ".i"
3420 plen = len(prefix)
3421 slen = len(suffix)
3422 lock = repo.lock()
3423 try:
3424 for fn, b, size in repo.store.datafiles():
3425 if size != 0 and fn[-slen:] == suffix and fn[:plen] == prefix:
3426 res.append(fn[plen:-slen])
3427 finally:
3428 lock.release()
3429 for f in sorted(res):
3430 ui.write("%s\n" % f)
3431 return
3409 3432
3410 3433 if rev and node:
3411 3434 raise util.Abort(_("please specify just one revision"))
@@ -246,7 +246,7 b' Show all commands + options'
246 246 import: strip, base, force, no-commit, exact, import-branch, message, logfile, date, user, similarity
247 247 incoming: force, newest-first, bundle, rev, bookmarks, branch, patch, git, limit, no-merges, stat, style, template, ssh, remotecmd, insecure, subrepos
248 248 locate: rev, print0, fullpath, include, exclude
249 manifest: rev
249 manifest: rev, all
250 250 outgoing: force, rev, newest-first, bookmarks, branch, patch, git, limit, no-merges, stat, style, template, ssh, remotecmd, insecure, subrepos
251 251 parents: rev, style, template
252 252 paths:
@@ -53,6 +53,10 b' The next call is expected to return noth'
53 53 b/a
54 54 l
55 55
56 $ hg manifest --all
57 a
58 b/a
59 l
56 60
57 61 The next two calls are expected to abort:
58 62
General Comments 0
You need to be logged in to leave comments. Login now