Mercurial > hg
comparison mercurial/commands.py @ 10651:5f091fc1bab7
style: use consistent variable names (*mod) with imports which would shadow
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Thu, 11 Mar 2010 17:43:44 +0100 |
parents | 9ea7238ad935 |
children | 153dd9139b0e |
comparison
equal
deleted
inserted
replaced
10650:9ea7238ad935 | 10651:5f091fc1bab7 |
---|---|
11 import os, re, sys, difflib, time, tempfile | 11 import os, re, sys, difflib, time, tempfile |
12 import hg, util, revlog, bundlerepo, extensions, copies, error | 12 import hg, util, revlog, bundlerepo, extensions, copies, error |
13 import patch, help, mdiff, url, encoding, templatekw | 13 import patch, help, mdiff, url, encoding, templatekw |
14 import archival, changegroup, cmdutil, sshserver, hbisect | 14 import archival, changegroup, cmdutil, sshserver, hbisect |
15 from hgweb import server, hgweb_mod, hgwebdir_mod | 15 from hgweb import server, hgweb_mod, hgwebdir_mod |
16 import merge as merge_ | 16 import merge as mergemod |
17 import minirst | 17 import minirst |
18 | 18 |
19 # Commands start here, listed alphabetically | 19 # Commands start here, listed alphabetically |
20 | 20 |
21 def add(ui, repo, *pats, **opts): | 21 def add(ui, repo, *pats, **opts): |
2594 raise util.Abort(_("can't specify --all and patterns")) | 2594 raise util.Abort(_("can't specify --all and patterns")) |
2595 if not (all or pats or show or mark or unmark): | 2595 if not (all or pats or show or mark or unmark): |
2596 raise util.Abort(_('no files or directories specified; ' | 2596 raise util.Abort(_('no files or directories specified; ' |
2597 'use --all to remerge all files')) | 2597 'use --all to remerge all files')) |
2598 | 2598 |
2599 ms = merge_.mergestate(repo) | 2599 ms = mergemod.mergestate(repo) |
2600 m = cmdutil.match(repo, pats, opts) | 2600 m = cmdutil.match(repo, pats, opts) |
2601 | 2601 |
2602 for f in ms: | 2602 for f in ms: |
2603 if m(f): | 2603 if m(f): |
2604 if show: | 2604 if show: |
3081 ui.write(m) | 3081 ui.write(m) |
3082 else: | 3082 else: |
3083 ui.status(m) | 3083 ui.status(m) |
3084 | 3084 |
3085 st = list(repo.status(unknown=True))[:6] | 3085 st = list(repo.status(unknown=True))[:6] |
3086 ms = merge_.mergestate(repo) | 3086 ms = mergemod.mergestate(repo) |
3087 st.append([f for f in ms if ms[f] == 'u']) | 3087 st.append([f for f in ms if ms[f] == 'u']) |
3088 labels = [_('%d modified'), _('%d added'), _('%d removed'), | 3088 labels = [_('%d modified'), _('%d added'), _('%d removed'), |
3089 _('%d deleted'), _('%d unknown'), _('%d ignored'), | 3089 _('%d deleted'), _('%d unknown'), _('%d ignored'), |
3090 _('%d unresolved')] | 3090 _('%d unresolved')] |
3091 t = [] | 3091 t = [] |