[merge] backport stable fixes

authorAurelien Campeas <aurelien.campeas@logilab.fr>
changeseta682f5cb73f6
branchdefault
phasepublic
hiddenno
parent revision#76ce456f8f07 [merge] backport stable, #b752df3e8596 [bin/clonedeps] fix NameError (closes #2334080)
child revision#76c7149d9076 [ldapfeed] don't crash if entity is None. Closes (superficialy) #2341266
files modified by this revision
bin/clone_deps.py
server/sources/native.py
# HG changeset patch
# User Aurelien Campeas <aurelien.campeas@logilab.fr>
# Date 1335946419 -7200
# Wed May 02 10:13:39 2012 +0200
# Node ID a682f5cb73f6cf11beca603a9b5c714b60fdb981
# Parent 76ce456f8f076a0614670b733dbcd843788801bc
# Parent b752df3e8596676d7059c432335ffdbb220c20af
[merge] backport stable fixes

diff --git a/bin/clone_deps.py b/bin/clone_deps.py
@@ -1,10 +1,11 @@
1  #!/usr/bin/python
2  import sys
3 
4  from subprocess import call as sbp_call, Popen, PIPE
5  from urllib import urlopen
6 +import os
7  from os import path as osp, pardir, chdir
8 
9 
10  def find_mercurial():
11      print "trying to find mercurial from the command line ..."
diff --git a/server/sources/native.py b/server/sources/native.py
@@ -1809,12 +1809,14 @@
12          sequences = archive.read('sequences.txt').splitlines()
13          file_versions = self._parse_versions(archive.read('versions.txt'))
14          versions = set(self._get_versions())
15          if file_versions != versions:
16              self.logger.critical('Unable to restore : versions do not match')
17 -            self.logger.critical('Expected:\n%s', '\n'.join(list(sorted(versions))))
18 -            self.logger.critical('Found:\n%s', '\n'.join(list(sorted(file_versions))))
19 +            self.logger.critical('Expected:\n%s', '\n'.join('%s : %s' % (cube, ver)
20 +                                                            for cube, ver in sorted(versions)))
21 +            self.logger.critical('Found:\n%s', '\n'.join('%s : %s' % (cube, ver)
22 +                                                         for cube, ver in sorted(file_versions)))
23              raise ValueError('Unable to restore : versions do not match')
24          table_chunks = {}
25          for name in archive.namelist():
26              if not name.startswith('tables/'):
27                  continue