Mercurial > hg-stable
changeset 15195:5b2a3bb06cef
import: rename some local variables
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Sat, 01 Oct 2011 21:49:04 -0400 |
parents | 0705f2ac79d6 |
children | 7f78a4137f8f |
files | mercurial/commands.py |
diffstat | 1 files changed, 9 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Oct 01 21:30:49 2011 -0400 +++ b/mercurial/commands.py Sat Oct 01 21:49:04 2011 -0400 @@ -3261,7 +3261,7 @@ if (opts.get('exact') or not opts.get('force')) and update: cmdutil.bailifchanged(repo) - d = opts["base"] + base = opts["base"] strip = opts["strip"] wlock = lock = None msgs = [] @@ -3371,18 +3371,17 @@ wlock = repo.wlock() lock = repo.lock() parents = repo.parents() - for p in patches: - pf = os.path.join(d, p) - - if pf == '-': - ui.status(_("applying patch from stdin\n")) - pf = ui.fin + for patchurl in patches: + patchurl = os.path.join(base, patchurl) + if patchurl == '-': + ui.status(_('applying patch from stdin\n')) + patchfile = ui.fin else: - ui.status(_("applying %s\n") % p) - pf = url.open(ui, pf) + ui.status(_('applying %s\n') % patchurl) + patchfile = url.open(ui, patchurl) haspatch = False - for hunk in patch.split(pf): + for hunk in patch.split(patchfile): (msg, node) = tryone(ui, hunk, parents) if msg: haspatch = True