##// END OF EJS Templates
hg status: added options to select files by status....
tksoh@users.sourceforge.net -
r840:14174460 default
parent child Browse files
Show More
@@ -346,6 +346,10 b' status [options] [files]::'
346
346
347 options:
347 options:
348
348
349 -m, --modified show only modified files
350 -a, --added show only added files
351 -r, --removed show only removed files
352 -u, --unknown show only unknown (not tracked) files
349 -I, --include <pat> include names matching the given patterns
353 -I, --include <pat> include names matching the given patterns
350 -X, --exclude <pat> exclude names matching the given patterns
354 -X, --exclude <pat> exclude names matching the given patterns
351
355
@@ -1040,14 +1040,17 b' def status(ui, repo, *pats, **opts):'
1040 (c, a, d, u) = [[pathto(cwd, x) for x in n]
1040 (c, a, d, u) = [[pathto(cwd, x) for x in n]
1041 for n in repo.changes(files=files, match=matchfn)]
1041 for n in repo.changes(files=files, match=matchfn)]
1042
1042
1043 for f in c:
1043 filetype = "";
1044 ui.write("M ", f, "\n")
1044 if opts['modified']: filetype += "M";
1045 for f in a:
1045 if opts[ 'added']: filetype += "A";
1046 ui.write("A ", f, "\n")
1046 if opts[ 'removed']: filetype += "R";
1047 for f in d:
1047 if opts[ 'unknown']: filetype += "?";
1048 ui.write("R ", f, "\n")
1048 if filetype == "" : filetype = "MAR?"
1049 for f in u:
1049
1050 ui.write("? ", f, "\n")
1050 for key, value in zip(["M", "A", "R", "?"], (c, a, d, u)):
1051 if value and filetype.find(key) >= 0:
1052 for f in value:
1053 ui.write("%s " % key, f, "\n")
1051
1054
1052 def tag(ui, repo, name, rev=None, **opts):
1055 def tag(ui, repo, name, rev=None, **opts):
1053 """add a tag for the current tip or a given revision"""
1056 """add a tag for the current tip or a given revision"""
@@ -1261,10 +1264,15 b' table = {'
1261 ('t', 'templates', "", 'template map'),
1264 ('t', 'templates', "", 'template map'),
1262 ('6', 'ipv6', None, 'use IPv6 in addition to IPv4')],
1265 ('6', 'ipv6', None, 'use IPv6 in addition to IPv4')],
1263 "hg serve [OPTION]..."),
1266 "hg serve [OPTION]..."),
1264 "^status": (status,
1267 "^status":
1265 [('I', 'include', [], 'include path in search'),
1268 (status,
1266 ('X', 'exclude', [], 'exclude path from search')],
1269 [('m', 'modified', None, 'show only modified files'),
1267 'hg status [FILE]...'),
1270 ('a', 'added', None, 'show only added files'),
1271 ('r', 'removed', None, 'show only removed files'),
1272 ('u', 'unknown', None, 'show only unknown (not tracked) files'),
1273 ('I', 'include', [], 'include path in search'),
1274 ('X', 'exclude', [], 'exclude path from search')],
1275 "hg status [FILE]..."),
1268 "tag":
1276 "tag":
1269 (tag,
1277 (tag,
1270 [('l', 'local', None, 'make the tag local'),
1278 [('l', 'local', None, 'make the tag local'),
General Comments 0
You need to be logged in to leave comments. Login now