Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 15196:7f78a4137f8f
import: join base with patchurl *after* checking for stdin
This only matters when using the deprecated --base option, and
combining --base with a patch on stdin makes no sense. But it's such
an obvious bug and easy fix that I couldn't pass it by.
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Sat, 01 Oct 2011 21:51:25 -0400 |
parents | 5b2a3bb06cef |
children | 7f65ce5cc011 |
comparison
equal
deleted
inserted
replaced
15195:5b2a3bb06cef | 15196:7f78a4137f8f |
---|---|
3370 try: | 3370 try: |
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 patchurl in patches: | 3374 for patchurl in patches: |
3375 patchurl = os.path.join(base, patchurl) | |
3376 if patchurl == '-': | 3375 if patchurl == '-': |
3377 ui.status(_('applying patch from stdin\n')) | 3376 ui.status(_('applying patch from stdin\n')) |
3378 patchfile = ui.fin | 3377 patchfile = ui.fin |
3379 else: | 3378 else: |
3379 patchurl = os.path.join(base, patchurl) | |
3380 ui.status(_('applying %s\n') % patchurl) | 3380 ui.status(_('applying %s\n') % patchurl) |
3381 patchfile = url.open(ui, patchurl) | 3381 patchfile = url.open(ui, patchurl) |
3382 | 3382 |
3383 haspatch = False | 3383 haspatch = False |
3384 for hunk in patch.split(patchfile): | 3384 for hunk in patch.split(patchfile): |