##// END OF EJS Templates
import: rename some local variables
Greg Ward -
r15195:5b2a3bb0 default
parent child Browse files
Show More
@@ -3261,7 +3261,7 b' def import_(ui, repo, patch1, *patches, '
3261 if (opts.get('exact') or not opts.get('force')) and update:
3261 if (opts.get('exact') or not opts.get('force')) and update:
3262 cmdutil.bailifchanged(repo)
3262 cmdutil.bailifchanged(repo)
3263
3263
3264 d = opts["base"]
3264 base = opts["base"]
3265 strip = opts["strip"]
3265 strip = opts["strip"]
3266 wlock = lock = None
3266 wlock = lock = None
3267 msgs = []
3267 msgs = []
@@ -3371,18 +3371,17 b' def import_(ui, repo, patch1, *patches, '
3371 wlock = repo.wlock()
3371 wlock = repo.wlock()
3372 lock = repo.lock()
3372 lock = repo.lock()
3373 parents = repo.parents()
3373 parents = repo.parents()
3374 for p in patches:
3374 for patchurl in patches:
3375 pf = os.path.join(d, p)
3375 patchurl = os.path.join(base, patchurl)
3376
3376 if patchurl == '-':
3377 if pf == '-':
3377 ui.status(_('applying patch from stdin\n'))
3378 ui.status(_("applying patch from stdin\n"))
3378 patchfile = ui.fin
3379 pf = ui.fin
3380 else:
3379 else:
3381 ui.status(_("applying %s\n") % p)
3380 ui.status(_('applying %s\n') % patchurl)
3382 pf = url.open(ui, pf)
3381 patchfile = url.open(ui, patchurl)
3383
3382
3384 haspatch = False
3383 haspatch = False
3385 for hunk in patch.split(pf):
3384 for hunk in patch.split(patchfile):
3386 (msg, node) = tryone(ui, hunk, parents)
3385 (msg, node) = tryone(ui, hunk, parents)
3387 if msg:
3386 if msg:
3388 haspatch = True
3387 haspatch = True
General Comments 0
You need to be logged in to leave comments. Login now