Mercurial > hg
comparison hgext/record.py @ 12674:aa2fe1f52ff4
patch: always raise PatchError with a message, simplify handling
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 09 Oct 2010 15:13:08 -0500 |
parents | 00658492e2aa |
children | 3e2281b85990 |
comparison
equal
deleted
inserted
replaced
12673:9ad16d1bce4b | 12674:aa2fe1f52ff4 |
---|---|
497 pfiles = {} | 497 pfiles = {} |
498 patch.internalpatch(fp, ui, 1, repo.root, files=pfiles, | 498 patch.internalpatch(fp, ui, 1, repo.root, files=pfiles, |
499 eolmode=None) | 499 eolmode=None) |
500 cmdutil.updatedir(ui, repo, pfiles) | 500 cmdutil.updatedir(ui, repo, pfiles) |
501 except patch.PatchError, err: | 501 except patch.PatchError, err: |
502 s = str(err) | 502 raise util.Abort(str(err)) |
503 if s: | |
504 raise util.Abort(s) | |
505 else: | |
506 raise util.Abort(_('patch failed to apply')) | |
507 del fp | 503 del fp |
508 | 504 |
509 # 4. We prepared working directory according to filtered patch. | 505 # 4. We prepared working directory according to filtered patch. |
510 # Now is the time to delegate the job to commit/qrefresh or the like! | 506 # Now is the time to delegate the job to commit/qrefresh or the like! |
511 | 507 |