##// END OF EJS Templates
transplant: crash if repo.commit() finds nothing to commit...
Greg Ward -
r11638:79231258 stable
parent child Browse files
Show More
@@ -246,6 +246,15 b' class transplanter(object):'
246 m = match.exact(repo.root, '', files)
246 m = match.exact(repo.root, '', files)
247
247
248 n = repo.commit(message, user, date, extra=extra, match=m)
248 n = repo.commit(message, user, date, extra=extra, match=m)
249 if not n:
250 # Crash here to prevent an unclear crash later, in
251 # transplants.write(). This can happen if patch.patch()
252 # does nothing but claims success or if repo.status() fails
253 # to report changes done by patch.patch(). These both
254 # appear to be bugs in other parts of Mercurial, but dying
255 # here, as soon as we can detect the problem, is preferable
256 # to silently dropping changesets on the floor.
257 raise RuntimeError('nothing committed after transplant')
249 if not merge:
258 if not merge:
250 self.transplants.set(n, node)
259 self.transplants.set(n, node)
251
260
General Comments 0
You need to be logged in to leave comments. Login now