changeset 30078 | 173bdb502503 |
parent 29948 | e40343ce9c4c |
child 30397 | 564b33acc21f |
--- a/mercurial/patch.py Sat Oct 08 08:54:05 2016 -0700 +++ b/mercurial/patch.py Sat Oct 08 05:26:58 2016 -0700 @@ -1952,8 +1952,10 @@ data, mode = None, None if gp.op in ('RENAME', 'COPY'): data, mode = store.getfile(gp.oldpath)[:2] - # FIXME: failing getfile has never been handled here - assert data is not None + if data is None: + # This means that the old path does not exist + raise PatchError(_("source file '%s' does not exist") + % gp.oldpath) if gp.mode: mode = gp.mode if gp.op == 'ADD':