Mercurial > hg
changeset 731:91ca3afab8e8
Add name matching to status command.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed, 20 Jul 2005 03:01:23 -0800 |
parents | d2dc7663d512 |
children | ba0b6d17a6de |
files | doc/hg.1.txt mercurial/commands.py |
diffstat | 2 files changed, 16 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/hg.1.txt Wed Jul 20 02:57:20 2005 -0800 +++ b/doc/hg.1.txt Wed Jul 20 03:01:23 2005 -0800 @@ -319,8 +319,10 @@ -n, --name <name> name to show in web pages (default: working dir) -t, --templatedir <path> web templates to use -status:: - Show changed files in the working directory. +status [options] [files]:: + Show changed files in the working directory. If no names are + given, all files are shown. Otherwise, only files matching the + given names are shown. The codes used to show the status of files are: @@ -329,6 +331,11 @@ R = removed ? = not tracked + options: + + -I, --include <pat> include directories matching the given patterns + -X, --exclude <pat> exclude directories matching the given patterns + tag [-l -t <text> -d <datecode> -u <user>] <name> [revision]:: Name a particular revision using <name>.
--- a/mercurial/commands.py Wed Jul 20 02:57:20 2005 -0800 +++ b/mercurial/commands.py Wed Jul 20 03:01:23 2005 -0800 @@ -980,7 +980,7 @@ ui.status('listening at http://%s/\n' % addr) httpd.serve_forever() -def status(ui, repo): +def status(ui, repo, *pats, **opts): '''show changed files in the working directory C = changed @@ -988,7 +988,8 @@ R = removed ? = not tracked''' - (c, a, d, u) = repo.changes() + (c, a, d, u) = repo.changes(match = matchpats(ui, repo.getcwd(), + pats, opts)) (c, a, d, u) = map(lambda x: relfilter(repo, x), (c, a, d, u)) for f in c: @@ -1192,7 +1193,10 @@ ('', 'stdio', None, 'for remote clients'), ('t', 'templates', "", 'template map')], "hg serve [OPTION]..."), - "^status": (status, [], 'hg status'), + "^status": (status, + [('I', 'include', [], 'include path in search'), + ('X', 'exclude', [], 'exclude path from search')], + 'hg status [OPTION]... [FILE]...'), "tag": (tag, [('l', 'local', None, 'make the tag local'),