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
1=== modified file 'src/UbuntuOneClient/App.config'
2--- src/UbuntuOneClient/App.config 2010-10-18 10:53:55 +0000
3+++ src/UbuntuOneClient/App.config 2010-11-11 11:28:42 +0000
4@@ -21,8 +21,8 @@
5 <!-- choices are INLINE, FILE, FILE-WATCH, EXTERNAL-->
6 <!-- otherwise BasicConfigurer.Configure is used -->
7 <!-- log4net configuration file is specified with key configFile-->
8- <arg key="configType" value="FILE"/>
9- <arg key="configFile" value="~/Config/log4net.config"/>
10+ <arg key="configType" value="FILE-WATCH" />
11+ <arg key="configFile" value="~/Config/log4net.config" />
12 </factoryAdapter>
13 </logging>
14 </common>
15
16=== modified file 'src/UbuntuOneClient/Config/log4net.config'
17--- src/UbuntuOneClient/Config/log4net.config 2010-11-11 11:28:42 +0000
18+++ src/UbuntuOneClient/Config/log4net.config 2010-11-11 11:28:42 +0000
19@@ -2,7 +2,7 @@
20 <log4net>
21 <appender name="RollingFileAppender"
22 type="log4net.Appender.RollingFileAppender">
23- <file value="Logs/Client.log" />
24+ <file value="${APPDATA}\UbuntuOneClient\Client.log" />
25 <appendToFile value="true" />
26 <rollingStyle value="Size" />
27 <maxSizeRollBackups value="10" />
28
29=== modified file 'src/sync/u1sync/main.py'
30--- src/sync/u1sync/main.py 2010-11-11 11:28:42 +0000
31+++ src/sync/u1sync/main.py 2010-11-11 11:28:42 +0000
32@@ -47,7 +47,6 @@
33 from u1sync import metadata
34 from u1sync.constants import METADATA_DIR_NAME
35 from u1sync.ubuntuone_optparse import UbuntuOneOptionsParser
36-from u1sync.icons import file_was_added, file_was_modified
37
38 # pylint: disable-msg=W0212
39 NODE_TYPE_ENUM = dircontent_pb2._NODETYPE
40@@ -322,13 +321,7 @@
41 queue.put(None)
42 finally:
43 reactor.callWhenRunning(reactor.stop)
44-
45- # test if the user wants to know f a path was added or modified
46- if options_parser.options.was_added:
47- return file_was_added(options_parser.options.was_added)
48- if options_parser.options.was_modified:
49- return file_was_modified(options_parser.options.was_modified)
50-
51+
52 queue = Queue()
53 reactor.callInThread(capture_exception, queue, run_client)
54 reactor.run(installSignalHandlers=False)
55
56=== modified file 'src/sync/u1sync/ubuntuone_optparse.py'
57--- src/sync/u1sync/ubuntuone_optparse.py 2010-11-11 11:28:42 +0000
58+++ src/sync/u1sync/ubuntuone_optparse.py 2010-11-11 11:28:42 +0000
59@@ -102,12 +102,6 @@
60 self.add_option("--subtree", dest="subtree", metavar="PATH",
61 default=None,
62 help="Mirror a subset of the share or volume")
63- self.add_option("--was-added", dest="was_added", metavar="PATH",
64- default=None,
65- help="Returns if the metadata know about the path.")
66- self.add_option("--was-modified", dest="was_modified", metavar="PATH",
67- default=None,
68- help="Returns if the file has been locally modified")
69
70 def get_options(self, arguments):
71 """Parses the arguments to from the command line."""
72@@ -188,8 +182,6 @@
73
74 def _validate_oauth(self):
75 """Validates that the oatuh was passed."""
76- if self.options.was_modified or self.options.was_added:
77- return
78 if self.options.oauth is None:
79 self.error("--oauth is currently compulsery.")
80 else:

Subscribers

People subscribed via source and target branches

to all changes: