equal
deleted
inserted
replaced
274 source.restore(osp.join(tmpdir, source.uri), self.confirm, drop, format) |
274 source.restore(osp.join(tmpdir, source.uri), self.confirm, drop, format) |
275 except Exception as exc: |
275 except Exception as exc: |
276 print('-> error trying to restore %s [%s]' % (source.uri, exc)) |
276 print('-> error trying to restore %s [%s]' % (source.uri, exc)) |
277 if not self.confirm('Continue anyway?', default='n'): |
277 if not self.confirm('Continue anyway?', default='n'): |
278 raise SystemExit(1) |
278 raise SystemExit(1) |
279 shutil.rmtree(tmpdir) |
279 finally: |
|
280 shutil.rmtree(tmpdir) |
280 # call hooks |
281 # call hooks |
281 repo.bootstrap() |
282 repo.bootstrap() |
282 repo.hm.call_hooks('server_restore', repo=repo, timestamp=backupfile) |
283 repo.hm.call_hooks('server_restore', repo=repo, timestamp=backupfile) |
283 print('-> database restored.') |
284 print('-> database restored.') |
284 |
285 |