comparison mercurial/context.py @ 40302:af2306bf7d5d

context: raise runtime errors with sysstrs We should probably *not* use RuntimeError for this, but let's deal with that later, rather than as part of the Python 3 effort. Differential Revision: https://phab.mercurial-scm.org/D5108
author Augie Fackler <augie@google.com>
date Sun, 14 Oct 2018 11:05:41 -0400
parents 2f47703c5489
children 1423ff45c322 44c2e80db985
comparison
equal deleted inserted replaced
40301:b929bce413f4 40302:af2306bf7d5d
2335 2335
2336 # sanity check to ensure that the reused manifest parents are 2336 # sanity check to ensure that the reused manifest parents are
2337 # manifests of our commit parents 2337 # manifests of our commit parents
2338 mp1, mp2 = self.manifestctx().parents 2338 mp1, mp2 = self.manifestctx().parents
2339 if p1 != nullid and p1.manifestnode() != mp1: 2339 if p1 != nullid and p1.manifestnode() != mp1:
2340 raise RuntimeError('can\'t reuse the manifest: ' 2340 raise RuntimeError(r"can't reuse the manifest: its p1 "
2341 'its p1 doesn\'t match the new ctx p1') 2341 r"doesn't match the new ctx p1")
2342 if p2 != nullid and p2.manifestnode() != mp2: 2342 if p2 != nullid and p2.manifestnode() != mp2:
2343 raise RuntimeError('can\'t reuse the manifest: ' 2343 raise RuntimeError(r"can't reuse the manifest: "
2344 'its p2 doesn\'t match the new ctx p2') 2344 r"its p2 doesn't match the new ctx p2")
2345 2345
2346 self._files = originalctx.files() 2346 self._files = originalctx.files()
2347 self.substate = {} 2347 self.substate = {}
2348 2348
2349 if editor: 2349 if editor: