merge stable
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Sun, 16 Aug 2009 19:55:05 +0200
branchstable
changeset 2865 a791b39470cf
parent 2864 dc915a059ea1 (current diff)
parent 2862 08d214ffa514 (diff)
child 2866 4c804711548d
merge
--- a/server/migractions.py	Sun Aug 16 19:54:29 2009 +0200
+++ b/server/migractions.py	Sun Aug 16 19:55:05 2009 +0200
@@ -169,16 +169,15 @@
         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
--- a/web/views/basecontrollers.py	Sun Aug 16 19:54:29 2009 +0200
+++ b/web/views/basecontrollers.py	Sun Aug 16 19:55:05 2009 +0200
@@ -310,7 +310,7 @@
                 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)