##// END OF EJS Templates
Move commands.forget over to using new walk code....
Bryan O'Sullivan -
r810:790a0ff3 default
parent child Browse files
Show More
@@ -161,9 +161,13 b' export [-o filespec] [revision] ...::'
161
161
162 -o, --output <filespec> print output to file with formatted named
162 -o, --output <filespec> print output to file with formatted named
163
163
164 forget [files]::
164 forget [options] [files]::
165 Undo an 'hg add' scheduled for the next commit.
165 Undo an 'hg add' scheduled for the next commit.
166
166
167 options:
168 -I, --include <pat> include directories matching the given patterns
169 -X, --exclude <pat> exclude directories matching the given patterns
170
167 heads::
171 heads::
168 Show all repository head changesets.
172 Show all repository head changesets.
169
173
@@ -601,9 +601,15 b' def export(ui, repo, *changesets, **opts'
601 seqno += 1
601 seqno += 1
602 doexport(ui, repo, cset, seqno, total, revwidth, opts)
602 doexport(ui, repo, cset, seqno, total, revwidth, opts)
603
603
604 def forget(ui, repo, file1, *files):
604 def forget(ui, repo, *pats, **opts):
605 """don't add the specified files on the next commit"""
605 """don't add the specified files on the next commit"""
606 repo.forget(relpath(repo, (file1,) + files))
606 q = dict(zip(pats, pats))
607 forget = []
608 for src, abs, rel in walk(repo, pats, opts):
609 if repo.dirstate.state(abs) == 'a':
610 forget.append(abs)
611 if rel not in q: ui.status('forgetting ', rel, '\n')
612 repo.forget(forget)
607
613
608 def heads(ui, repo):
614 def heads(ui, repo):
609 """show current repository heads"""
615 """show current repository heads"""
@@ -1153,7 +1159,10 b' table = {'
1153 (export,
1159 (export,
1154 [('o', 'output', "", 'output to file')],
1160 [('o', 'output', "", 'output to file')],
1155 "hg export [-o OUTFILE] REV..."),
1161 "hg export [-o OUTFILE] REV..."),
1156 "forget": (forget, [], "hg forget FILE..."),
1162 "forget": (forget,
1163 [('I', 'include', [], 'include path in search'),
1164 ('X', 'exclude', [], 'exclude path from search')],
1165 "hg forget FILE..."),
1157 "heads": (heads, [], 'hg heads'),
1166 "heads": (heads, [], 'hg heads'),
1158 "help": (help_, [], 'hg help [COMMAND]'),
1167 "help": (help_, [], 'hg help [COMMAND]'),
1159 "identify|id": (identify, [], 'hg identify'),
1168 "identify|id": (identify, [], 'hg identify'),
General Comments 0
You need to be logged in to leave comments. Login now