Commit d6fa708c authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

merge

--HG--
branch : stable
......@@ -169,16 +169,15 @@ class ServerMigrationHelper(MigrationHelper):
bkup = tarfile.open(backupfile, 'r|gz')
tmpdir = tempfile.mkdtemp()
bkup.extractall(path=tmpdir)
if systemonly:
repo.system_source.restore(osp.join(tmpdir,'system'), drop=drop)
else:
for source in repo.sources:
try:
source.restore(osp.join(tmpdir, source.uri), drop=drop)
except Exception, exc:
print '-> error trying to restore [%s]' % exc
if not self.confirm('Continue anyway?', default='n'):
raise SystemExit(1)
for source in repo.sources:
if systemonly and source.uri != 'system':
continue
try:
source.restore(osp.join(tmpdir, source.uri), drop=drop)
except Exception, exc:
print '-> error trying to restore [%s]' % exc
if not self.confirm('Continue anyway?', default='n'):
raise SystemExit(1)
bkup.close()
shutil.rmtree(tmpdir)
# call hooks
......
......@@ -310,7 +310,7 @@ class JSonController(Controller):
vtitle = self.req.form.get('vtitle')
if vtitle:
stream.write(u'<h1 class="vtitle">%s</h1>\n' % vtitle)
view.pagination(req, rset, view.w, not view.need_navigation)
view.pagination(req, self.rset, view.w, not view.need_navigation)
if divid == 'pageContent':
stream.write(u'<div id="contentmain">')
view.render(**kwargs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment