Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 5829:784073457a0f
cmdutil.commit: extract 'addremove' from opts carefully
we are going to use cmdutil.commit for qrecord, and it's brother
qrefresh does not support addremove.
author | Kirill Smelkov <kirr@mns.spb.ru> |
---|---|
date | Thu, 10 Jan 2008 12:07:18 +0300 |
parents | 7b7f03c7dfa5 |
children | c5c9a022bd9a |
comparison
equal
deleted
inserted
replaced
5828:863e237b58fb | 5829:784073457a0f |
---|---|
1115 | 1115 |
1116 def commit(ui, repo, commitfunc, pats, opts): | 1116 def commit(ui, repo, commitfunc, pats, opts): |
1117 '''commit the specified files or all outstanding changes''' | 1117 '''commit the specified files or all outstanding changes''' |
1118 message = logmessage(opts) | 1118 message = logmessage(opts) |
1119 | 1119 |
1120 if opts['addremove']: | 1120 # extract addremove carefully -- this function can be called from a command |
1121 # that doesn't support addremove | |
1122 if opts.get('addremove'): | |
1121 addremove(repo, pats, opts) | 1123 addremove(repo, pats, opts) |
1124 | |
1122 fns, match, anypats = matchpats(repo, pats, opts) | 1125 fns, match, anypats = matchpats(repo, pats, opts) |
1123 if pats: | 1126 if pats: |
1124 status = repo.status(files=fns, match=match) | 1127 status = repo.status(files=fns, match=match) |
1125 modified, added, removed, deleted, unknown = status[:5] | 1128 modified, added, removed, deleted, unknown = status[:5] |
1126 files = modified + added + removed | 1129 files = modified + added + removed |