Merge lp:~mandel/ubuntuone-windows-installer/manual_sync_does_nothing into lp:ubuntuone-windows-installer/beta

Proposed by Manuel de la Peña
Status: Merged
Approved by: John Lenton
Approved revision: 175
Merged at revision: 130
Proposed branch: lp:~mandel/ubuntuone-windows-installer/manual_sync_does_nothing
Merge into: lp:ubuntuone-windows-installer/beta
Prerequisite: lp:~mandel/ubuntuone-windows-installer/add_beta_tab
Diff against target: 80 lines (+4/-19)
4 files modified
src/UbuntuOneClient/App.config (+2/-2)
src/UbuntuOneClient/Config/log4net.config (+1/-1)
src/sync/u1sync/main.py (+1/-8)
src/sync/u1sync/ubuntuone_optparse.py (+0/-8)
To merge this branch: bzr merge lp:~mandel/ubuntuone-windows-installer/manual_sync_does_nothing
Reviewer Review Type Date Requested Status
John Lenton (community) Approve
Review via email: mp+40542@code.launchpad.net

Description of the change

Fixed python code that prevented manual sync from working.
Changed the config of the logging so that it uses the appdata of the current user.

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) :
review: Approve
176. By Manuel de la Peña

Use the appdata dir for logs.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/UbuntuOneClient/App.config'
--- src/UbuntuOneClient/App.config 2010-10-18 10:53:55 +0000
+++ src/UbuntuOneClient/App.config 2010-11-11 11:28:42 +0000
@@ -21,8 +21,8 @@
21 <!-- choices are INLINE, FILE, FILE-WATCH, EXTERNAL-->21 <!-- choices are INLINE, FILE, FILE-WATCH, EXTERNAL-->
22 <!-- otherwise BasicConfigurer.Configure is used -->22 <!-- otherwise BasicConfigurer.Configure is used -->
23 <!-- log4net configuration file is specified with key configFile-->23 <!-- log4net configuration file is specified with key configFile-->
24 <arg key="configType" value="FILE"/>24 <arg key="configType" value="FILE-WATCH" />
25 <arg key="configFile" value="~/Config/log4net.config"/>25 <arg key="configFile" value="~/Config/log4net.config" />
26 </factoryAdapter>26 </factoryAdapter>
27 </logging>27 </logging>
28 </common>28 </common>
2929
=== modified file 'src/UbuntuOneClient/Config/log4net.config'
--- src/UbuntuOneClient/Config/log4net.config 2010-11-11 11:28:42 +0000
+++ src/UbuntuOneClient/Config/log4net.config 2010-11-11 11:28:42 +0000
@@ -2,7 +2,7 @@
2<log4net>2<log4net>
3 <appender name="RollingFileAppender"3 <appender name="RollingFileAppender"
4 type="log4net.Appender.RollingFileAppender">4 type="log4net.Appender.RollingFileAppender">
5 <file value="Logs/Client.log" />5 <file value="${APPDATA}\UbuntuOneClient\Client.log" />
6 <appendToFile value="true" />6 <appendToFile value="true" />
7 <rollingStyle value="Size" />7 <rollingStyle value="Size" />
8 <maxSizeRollBackups value="10" />8 <maxSizeRollBackups value="10" />
99
=== modified file 'src/sync/u1sync/main.py'
--- src/sync/u1sync/main.py 2010-11-11 11:28:42 +0000
+++ src/sync/u1sync/main.py 2010-11-11 11:28:42 +0000
@@ -47,7 +47,6 @@
47from u1sync import metadata47from u1sync import metadata
48from u1sync.constants import METADATA_DIR_NAME48from u1sync.constants import METADATA_DIR_NAME
49from u1sync.ubuntuone_optparse import UbuntuOneOptionsParser49from u1sync.ubuntuone_optparse import UbuntuOneOptionsParser
50from u1sync.icons import file_was_added, file_was_modified
5150
52# pylint: disable-msg=W021251# pylint: disable-msg=W0212
53NODE_TYPE_ENUM = dircontent_pb2._NODETYPE52NODE_TYPE_ENUM = dircontent_pb2._NODETYPE
@@ -322,13 +321,7 @@
322 queue.put(None)321 queue.put(None)
323 finally:322 finally:
324 reactor.callWhenRunning(reactor.stop)323 reactor.callWhenRunning(reactor.stop)
325324
326 # test if the user wants to know f a path was added or modified
327 if options_parser.options.was_added:
328 return file_was_added(options_parser.options.was_added)
329 if options_parser.options.was_modified:
330 return file_was_modified(options_parser.options.was_modified)
331
332 queue = Queue()325 queue = Queue()
333 reactor.callInThread(capture_exception, queue, run_client)326 reactor.callInThread(capture_exception, queue, run_client)
334 reactor.run(installSignalHandlers=False)327 reactor.run(installSignalHandlers=False)
335328
=== modified file 'src/sync/u1sync/ubuntuone_optparse.py'
--- src/sync/u1sync/ubuntuone_optparse.py 2010-11-11 11:28:42 +0000
+++ src/sync/u1sync/ubuntuone_optparse.py 2010-11-11 11:28:42 +0000
@@ -102,12 +102,6 @@
102 self.add_option("--subtree", dest="subtree", metavar="PATH",102 self.add_option("--subtree", dest="subtree", metavar="PATH",
103 default=None,103 default=None,
104 help="Mirror a subset of the share or volume")104 help="Mirror a subset of the share or volume")
105 self.add_option("--was-added", dest="was_added", metavar="PATH",
106 default=None,
107 help="Returns if the metadata know about the path.")
108 self.add_option("--was-modified", dest="was_modified", metavar="PATH",
109 default=None,
110 help="Returns if the file has been locally modified")
111 105
112 def get_options(self, arguments):106 def get_options(self, arguments):
113 """Parses the arguments to from the command line."""107 """Parses the arguments to from the command line."""
@@ -188,8 +182,6 @@
188 182
189 def _validate_oauth(self):183 def _validate_oauth(self):
190 """Validates that the oatuh was passed."""184 """Validates that the oatuh was passed."""
191 if self.options.was_modified or self.options.was_added:
192 return
193 if self.options.oauth is None:185 if self.options.oauth is None:
194 self.error("--oauth is currently compulsery.")186 self.error("--oauth is currently compulsery.")
195 else:187 else:

Subscribers

People subscribed via source and target branches

to all changes: