Merge lp:~verterok/ubuntuone-client/local_rescan-only-active-volumes into lp:ubuntuone-client

Proposed by Guillermo Gonzalez
Status: Merged
Approved by: Guillermo Gonzalez
Approved revision: 488
Merged at revision: not available
Proposed branch: lp:~verterok/ubuntuone-client/local_rescan-only-active-volumes
Merge into: lp:ubuntuone-client
Diff against target: 56 lines (+22/-3)
2 files modified
tests/syncdaemon/test_localrescan.py (+19/-0)
ubuntuone/syncdaemon/local_rescan.py (+3/-3)
To merge this branch: bzr merge lp:~verterok/ubuntuone-client/local_rescan-only-active-volumes
Reviewer Review Type Date Requested Status
dobey (community) Approve
Natalia Bidart (community) Approve
Review via email: mp+23262@code.launchpad.net

Commit message

Avoid scaning "inactive" (unsubscribed UDFs) volumes during initial local rescan.

Description of the change

This branch fix local_rescan to not include inactive volumes in the initial scan.

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Nice going! Server tests and client tests all green.

review: Approve
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
John Lenton (chipaca) wrote :
Download full text (16.6 KiB)

The attempt to merge lp:~verterok/ubuntuone-client/local_rescan-only-active-volumes into lp:ubuntuone-client failed.Below is the output from the failed tests.

Using saved parent location: bzr+ssh://bazaar.launchpad.net/~ubuntuone-control-tower/ubuntuone-storage-protocol/trunk/
No revisions to pull.
/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
(B testing autoconf2.50... not found.
  testing autoconf... found 2.65
checking for automake >= 1.10...
(B testing automake-1.11... found 1.11.1
checking for libtool >= 1.5...
(B testing libtoolize... found 2.2.6b
checking for intltool >= 0.30...
(B testing intltoolize... found 0.41.0
checking for pkg-config >= 0.14.0...
(B testing pkg-config... found 0.22
Checking for required M4 macros...
(BChecking for forbidden M4 macros...
(BProcessing ./configure.ac
(BRunning libtoolize...
(Blibtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
Running intltoolize...
(BRunning aclocal-1.11...
(BRunning autoconf...
(BRunning autoheader...
(BRunning automake-1.11...
(BRunning ./configure --with-protocol=/home/john/canonical/ubuntuone-storage-protocol/trunk ...
(Bchecking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command li...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/syncdaemon/test_localrescan.py'
--- tests/syncdaemon/test_localrescan.py 2010-03-26 15:00:11 +0000
+++ tests/syncdaemon/test_localrescan.py 2010-04-12 19:33:20 +0000
@@ -338,6 +338,25 @@
338 d.addCallback(check)338 d.addCallback(check)
339 return d339 return d
340340
341 @defer.inlineCallbacks
342 def test_start_with_udf_unsubscribed(self):
343 """LR start() having removed UDFs."""
344 unsub_vol = self.volumes.pop(0)
345 path_idx = self.expected.index(unsub_vol.path)
346 unsub_path = self.expected.pop(path_idx)
347 assert unsub_vol.path == unsub_path
348 self.fsm.vm.unsubscribe_udf(unsub_vol.volume_id)
349 toscan = []
350 def f():
351 """helper"""
352 for _, path, _, _, udfmode in self.lr._queue:
353 toscan.append(path)
354 return defer.succeed(None)
355
356 self.lr._queue_scan = f
357 yield self.lr.start()
358 self.assertEqual(self.expected, sorted(toscan))
359
341360
342class TwistedBase(BaseTestCase):361class TwistedBase(BaseTestCase):
343 """Base class for twisted tests."""362 """Base class for twisted tests."""
344363
=== modified file 'ubuntuone/syncdaemon/local_rescan.py'
--- ubuntuone/syncdaemon/local_rescan.py 2010-03-26 20:24:15 +0000
+++ ubuntuone/syncdaemon/local_rescan.py 2010-04-12 19:33:20 +0000
@@ -60,7 +60,7 @@
60 def start(self):60 def start(self):
61 """Start the comparison."""61 """Start the comparison."""
62 log_info("start scan all volumes")62 log_info("start scan all volumes")
63 to_scan = self._get_volumes()63 to_scan = self._get_volumes(all_volumes=False)
64 for vol in to_scan:64 for vol in to_scan:
65 try:65 try:
66 mdobj = self.fsm.get_by_path(vol.path)66 mdobj = self.fsm.get_by_path(vol.path)
@@ -90,11 +90,11 @@
90 log_info("unlink from trash: " + datalog)90 log_info("unlink from trash: " + datalog)
91 self.aq.unlink(share_id, parent_id, node_id)91 self.aq.unlink(share_id, parent_id, node_id)
9292
93 def _get_volumes(self, access_level='Modify'):93 def _get_volumes(self, all_volumes=True, access_level='Modify'):
94 """Get all the shares and udfs matching access_level to compare."""94 """Get all the shares and udfs matching access_level to compare."""
95 modify = access_level == 'Modify'95 modify = access_level == 'Modify'
96 view = access_level == 'View'96 view = access_level == 'View'
97 for volume in self.vm.get_volumes(all_volumes=True):97 for volume in self.vm.get_volumes(all_volumes=all_volumes):
98 if (modify and volume.can_write()) or \98 if (modify and volume.can_write()) or \
99 (view and not volume.can_write()):99 (view and not volume.can_write()):
100 yield volume100 yield volume

Subscribers

People subscribed via source and target branches