comparison mercurial/commands.py @ 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 626aa658e2a9
children ba0b6d17a6de
comparison
equal deleted inserted replaced
730:d2dc7663d512 731:91ca3afab8e8
978 ui.status('listening at http://%s:%d/\n' % (addr, port)) 978 ui.status('listening at http://%s:%d/\n' % (addr, port))
979 else: 979 else:
980 ui.status('listening at http://%s/\n' % addr) 980 ui.status('listening at http://%s/\n' % addr)
981 httpd.serve_forever() 981 httpd.serve_forever()
982 982
983 def status(ui, repo): 983 def status(ui, repo, *pats, **opts):
984 '''show changed files in the working directory 984 '''show changed files in the working directory
985 985
986 C = changed 986 C = changed
987 A = added 987 A = added
988 R = removed 988 R = removed
989 ? = not tracked''' 989 ? = not tracked'''
990 990
991 (c, a, d, u) = repo.changes() 991 (c, a, d, u) = repo.changes(match = matchpats(ui, repo.getcwd(),
992 pats, opts))
992 (c, a, d, u) = map(lambda x: relfilter(repo, x), (c, a, d, u)) 993 (c, a, d, u) = map(lambda x: relfilter(repo, x), (c, a, d, u))
993 994
994 for f in c: 995 for f in c:
995 ui.write("C ", f, "\n") 996 ui.write("C ", f, "\n")
996 for f in a: 997 for f in a:
1190 ('a', 'address', '', 'interface address'), 1191 ('a', 'address', '', 'interface address'),
1191 ('n', 'name', os.getcwd(), 'repository name'), 1192 ('n', 'name', os.getcwd(), 'repository name'),
1192 ('', 'stdio', None, 'for remote clients'), 1193 ('', 'stdio', None, 'for remote clients'),
1193 ('t', 'templates', "", 'template map')], 1194 ('t', 'templates', "", 'template map')],
1194 "hg serve [OPTION]..."), 1195 "hg serve [OPTION]..."),
1195 "^status": (status, [], 'hg status'), 1196 "^status": (status,
1197 [('I', 'include', [], 'include path in search'),
1198 ('X', 'exclude', [], 'exclude path from search')],
1199 'hg status [OPTION]... [FILE]...'),
1196 "tag": 1200 "tag":
1197 (tag, 1201 (tag,
1198 [('l', 'local', None, 'make the tag local'), 1202 [('l', 'local', None, 'make the tag local'),
1199 ('t', 'text', "", 'commit text'), 1203 ('t', 'text', "", 'commit text'),
1200 ('d', 'date', "", 'date code'), 1204 ('d', 'date', "", 'date code'),