mercurial/commands.py
changeset 15197 7f65ce5cc011
parent 15196 7f78a4137f8f
child 15198 62dc0e7ab092
equal deleted inserted replaced
15196:7f78a4137f8f 15197:7f65ce5cc011
  3373         parents = repo.parents()
  3373         parents = repo.parents()
  3374         for patchurl in patches:
  3374         for patchurl in patches:
  3375             if patchurl == '-':
  3375             if patchurl == '-':
  3376                 ui.status(_('applying patch from stdin\n'))
  3376                 ui.status(_('applying patch from stdin\n'))
  3377                 patchfile = ui.fin
  3377                 patchfile = ui.fin
       
  3378                 patchurl = 'stdin'      # for error message
  3378             else:
  3379             else:
  3379                 patchurl = os.path.join(base, patchurl)
  3380                 patchurl = os.path.join(base, patchurl)
  3380                 ui.status(_('applying %s\n') % patchurl)
  3381                 ui.status(_('applying %s\n') % patchurl)
  3381                 patchfile = url.open(ui, patchurl)
  3382                 patchfile = url.open(ui, patchurl)
  3382 
  3383 
  3390                     parents = repo.parents()
  3391                     parents = repo.parents()
  3391                 else:
  3392                 else:
  3392                     parents = [repo[node]]
  3393                     parents = [repo[node]]
  3393 
  3394 
  3394             if not haspatch:
  3395             if not haspatch:
  3395                 raise util.Abort(_('no diffs found'))
  3396                 raise util.Abort(_('%s: no diffs found') % patchurl)
  3396 
  3397 
  3397         if msgs:
  3398         if msgs:
  3398             repo.savecommitmessage('\n* * *\n'.join(msgs))
  3399             repo.savecommitmessage('\n* * *\n'.join(msgs))
  3399     finally:
  3400     finally:
  3400         release(lock, wlock)
  3401         release(lock, wlock)