Merge lp:~dobey/ubuntuone-client/update-2-0 into lp:ubuntuone-client/stable-2-0

Proposed by dobey
Status: Merged
Merged at revision: 1150
Proposed branch: lp:~dobey/ubuntuone-client/update-2-0
Merge into: lp:ubuntuone-client/stable-2-0
Diff against target: 78 lines (+23/-9)
2 files modified
tests/syncdaemon/test_sync.py (+15/-7)
ubuntuone/syncdaemon/sync.py (+8/-2)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/update-2-0
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
Roberto Alsina (community) Approve
Review via email: mp+114488@code.launchpad.net

Commit message

Force a "reput from local" when the server_hash (that came in the delta) is ""

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) :
review: Approve
Revision history for this message
Alejandro J. Cura (alecu) wrote :

+1

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (19.9 KiB)

The attempt to merge lp:~dobey/ubuntuone-client/update-2-0 into lp:ubuntuone-client/stable-2-0 failed. Below is the output from the failed tests.

/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... found 2.67
checking for automake >= 1.10...
  testing automake-1.11... found 1.11.1
checking for libtool >= 1.5...
  testing libtoolize... found 2.2.6b
checking for intltool >= 0.30...
  testing intltoolize... found 0.41.1
checking for pkg-config >= 0.14.0...
  testing pkg-config... found 0.25
checking for gtk-doc >= 1.0...
  testing gtkdocize... found 1.17
Checking for required M4 macros...
Checking for forbidden M4 macros...
Processing ./configure.ac
Running libtoolize...
libtoolize: 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...
Running gtkdocize...
Running aclocal-1.11...
Running autoconf...
Running autoheader...
Running automake-1.11...
Running ./configure --enable-gtk-doc --enable-debug ...
checking 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... no
checking for mawk... mawk
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 line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdum...

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (34.5 KiB)

The attempt to merge lp:~dobey/ubuntuone-client/update-2-0 into lp:ubuntuone-client/stable-2-0 failed. Below is the output from the failed tests.

/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... found 2.67
checking for automake >= 1.10...
  testing automake-1.11... found 1.11.1
checking for libtool >= 1.5...
  testing libtoolize... found 2.2.6b
checking for intltool >= 0.30...
  testing intltoolize... found 0.41.1
checking for pkg-config >= 0.14.0...
  testing pkg-config... found 0.25
checking for gtk-doc >= 1.0...
  testing gtkdocize... found 1.17
Checking for required M4 macros...
Checking for forbidden M4 macros...
Processing ./configure.ac
Running libtoolize...
libtoolize: 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...
Running gtkdocize...
Running aclocal-1.11...
Running autoconf...
Running autoheader...
Running automake-1.11...
Running ./configure --enable-gtk-doc --enable-debug ...
checking 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... no
checking for mawk... mawk
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 line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdum...

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (33.7 KiB)

The attempt to merge lp:~dobey/ubuntuone-client/update-2-0 into lp:ubuntuone-client/stable-2-0 failed. Below is the output from the failed tests.

/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... found 2.67
checking for automake >= 1.10...
  testing automake-1.11... found 1.11.1
checking for libtool >= 1.5...
  testing libtoolize... found 2.2.6b
checking for intltool >= 0.30...
  testing intltoolize... found 0.41.1
checking for pkg-config >= 0.14.0...
  testing pkg-config... found 0.25
checking for gtk-doc >= 1.0...
  testing gtkdocize... found 1.17
Checking for required M4 macros...
Checking for forbidden M4 macros...
Processing ./configure.ac
Running libtoolize...
libtoolize: 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...
Running gtkdocize...
Running aclocal-1.11...
Running autoconf...
Running autoheader...
Running automake-1.11...
Running ./configure --enable-gtk-doc --enable-debug ...
checking 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... no
checking for mawk... mawk
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 line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdum...

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (166.0 KiB)

The attempt to merge lp:~dobey/ubuntuone-client/update-2-0 into lp:ubuntuone-client/stable-2-0 failed. Below is the output from the failed tests.

/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... found 2.67
checking for automake >= 1.10...
  testing automake-1.11... found 1.11.1
checking for libtool >= 1.5...
  testing libtoolize... found 2.2.6b
checking for intltool >= 0.30...
  testing intltoolize... found 0.41.1
checking for pkg-config >= 0.14.0...
  testing pkg-config... found 0.25
checking for gtk-doc >= 1.0...
  testing gtkdocize... found 1.17
Checking for required M4 macros...
Checking for forbidden M4 macros...
Processing ./configure.ac
Running libtoolize...
libtoolize: 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...
Running gtkdocize...
Running aclocal-1.11...
Running autoconf...
Running autoheader...
Running automake-1.11...
Running ./configure --enable-gtk-doc --enable-debug ...
checking 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... no
checking for mawk... mawk
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 line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdum...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/syncdaemon/test_sync.py'
2--- tests/syncdaemon/test_sync.py 2011-09-02 12:22:35 +0000
3+++ tests/syncdaemon/test_sync.py 2012-07-11 19:01:22 +0000
4@@ -375,20 +375,29 @@
5 self.sync._handle_SV_HASH_NEW(mdobj.share_id, mdobj.node_id, '')
6 self.assertTrue(self.called)
7
8- def test_SV_HASH_NEW_with_file_uploadinterrupted_coverage(self):
9- """A SV_HASH_NEW is received after upload interrupted."""
10+ def test_SV_HASH_NEW_with_special_hash(self):
11+ """A SV_HASH_NEW is received with hash in None, don't care state."""
12 self.called = False
13
14- # create a file and put it in local, without server_hash, as
15- # if the upload was cut in the middle after the make file
16+ def fake_meth(_, event, params, hash):
17+ """Wrap SSMR.reput_file_from_local to test."""
18+ self.assertEqual(event, 'SV_HASH_NEW')
19+ self.assertEqual(hash, '')
20+ self.called = True
21+ self.patch(SyncStateMachineRunner, 'reput_file_from_local', fake_meth)
22+
23+ # create a file and leave it as NONE state
24 somepath = os.path.join(self.root, 'somepath')
25 mdid = self.fsm.create(somepath, '', node_id='node_id')
26- self.fsm.set_by_mdid(mdid, local_hash='somehash', crc32='crc32',
27- stat='stat', size='size')
28+ self.fsm.set_by_mdid(mdid, local_hash='somehsh', server_hash='somehsh',
29+ crc32='crc32', stat='stat', size='size')
30
31 # send the event with no content and check
32 mdobj = self.fsm.get_by_mdid(mdid)
33 self.sync._handle_SV_HASH_NEW(mdobj.share_id, mdobj.node_id, '')
34+ self.assertTrue(self.called)
35+ mdobj = self.fsm.get_by_mdid(mdid)
36+ self.assertEqual(mdobj.server_hash, '')
37
38 def test_AQ_FILE_NEW_OK_with_md_in_none(self):
39 """Created the file, and MD says it's in NONE."""
40@@ -979,7 +988,6 @@
41 with self._test_putcontent_upload_id(with_upload_id=False):
42 self.ssmr.reput_file_from_local("SV_HASH_NEW", None, '')
43
44-
45 def test_commit_file_without_partial(self):
46 """The .partial is lost when commiting the file."""
47 # create the partial correctly, and break it!
48
49=== modified file 'ubuntuone/syncdaemon/sync.py'
50--- ubuntuone/syncdaemon/sync.py 2011-09-01 19:50:22 +0000
51+++ ubuntuone/syncdaemon/sync.py 2012-07-11 19:01:22 +0000
52@@ -597,10 +597,10 @@
53 """Starts the scan again on a dir."""
54 self.m.lr.scan_dir(self.key['mdid'], self.key['path'], udfmode)
55
56- def reput_file_from_local(self, event, params, hash):
57+ def reput_file_from_local(self, event, params, hash_value):
58 """Re put the file from its local state."""
59 self.m.action_q.cancel_upload(share_id=self.key['share_id'],
60- node_id=self.key['node_id'])
61+ node_id=self.key['node_id'])
62
63 local_hash = self.key['local_hash']
64 previous_hash = self.key['server_hash']
65@@ -854,7 +854,13 @@
66 """on SV_HASH_NEW. No longer called by EQ, only internally."""
67 key = FSKey(self.m.fs, share_id=share_id, node_id=node_id)
68 log = FileLogger(self.logger, key)
69+
70 ssmr = SyncStateMachineRunner(self.fsm, self.m, key, log)
71+ if hash == "":
72+ # Special case for hash == "", aka broken node.
73+ # Set the server_hash = hash to force LOCAL state
74+ key.set(server_hash=hash)
75+ key.sync()
76 ssmr.signal_event_with_hash("SV_HASH_NEW", hash)
77
78 def _handle_SV_FILE_NEW(self, share_id, node_id, parent_id, name):

Subscribers

People subscribed via source and target branches

to all changes: