Merge lp:~chipaca/ubuntu-push/client-client-client into lp:ubuntu-push

Proposed by John Lenton
Status: Merged
Approved by: John Lenton
Approved revision: 72
Merged at revision: 81
Proposed branch: lp:~chipaca/ubuntu-push/client-client-client
Merge into: lp:ubuntu-push
Diff against target: 67 lines (+44/-0)
3 files modified
Makefile (+1/-0)
dependencies.tsv (+1/-0)
ubuntu-push-client.go (+42/-0)
To merge this branch: bzr merge lp:~chipaca/ubuntu-push/client-client-client
Reviewer Review Type Date Requested Status
Samuele Pedroni Approve
Review via email: mp+210582@code.launchpad.net

Commit message

The Push Client itself.

Description of the change

The Push Client itself.

No tests (yet); it's fairly trivial, and will get covered by system-level tests when those get done.

To post a comment you must log in.
Revision history for this message
Samuele Pedroni (pedronis) wrote :

shouldn't it go to its own directory? client/push-client

maybe cfg should be cfgFname?

our initial style of import ordering now looks odd to me, also now there is this:

http://code.google.com/p/go-wiki/wiki/CodeReviewComments#Imports

Revision history for this message
John Lenton (chipaca) wrote :

I don't think it should go in its own directory, no -- unless it breaks anything like this? It's a lot more obvious that this is the client itself if it isn't essentially undistinguishable from library code when browsing.

Funny that you suggest cfg -> cfgFname and not lvl -> lvlFname. Updated both.

Fixed import style.

Revision history for this message
Samuele Pedroni (pedronis) wrote :

cool!

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

The attempt to merge lp:~chipaca/ubuntu-push/client-client-client into lp:ubuntu-push failed. Below is the output from the failed tests.

mkdir -p /mnt/tarmac/cache/ubuntu-push/go-ws/bin
mkdir -p /mnt/tarmac/cache/ubuntu-push/go-ws/pkg
go get -u launchpad.net/godeps
go get -d -u launchpad.net/gocheck launchpad.net/go-dbus/v1 launchpad.net/go-xdg/v0 code.google.com/p/gosqlite/sqlite3
/mnt/tarmac/cache/ubuntu-push/go-ws/bin/godeps -u dependencies.tsv
"/mnt/tarmac/cache/ubuntu-push/go-ws/src/launchpad.net/gocheck" now at <email address hidden>
go install launchpad.net/gocheck launchpad.net/go-dbus/v1 launchpad.net/go-xdg/v0 code.google.com/p/gosqlite/sqlite3
go test launchpad.net/ubuntu-push/...
? launchpad.net/ubuntu-push [no test files]
ok launchpad.net/ubuntu-push/bus 0.009s
ok launchpad.net/ubuntu-push/bus/connectivity 0.148s
ok launchpad.net/ubuntu-push/bus/networkmanager 0.044s
ok launchpad.net/ubuntu-push/bus/notifications 0.016s
ok launchpad.net/ubuntu-push/bus/testing 0.017s
ok launchpad.net/ubuntu-push/bus/urldispatcher 0.010s
ok launchpad.net/ubuntu-push/client 0.071s
ok launchpad.net/ubuntu-push/client/session 0.091s
ok launchpad.net/ubuntu-push/client/session/levelmap 0.030s
ok launchpad.net/ubuntu-push/config 0.009s
ok launchpad.net/ubuntu-push/logger 0.008s
ok launchpad.net/ubuntu-push/protocol 0.010s
ok launchpad.net/ubuntu-push/server 0.044s
ok launchpad.net/ubuntu-push/server/acceptance 0.007s
? launchpad.net/ubuntu-push/server/acceptance/cmd [no test files]
? launchpad.net/ubuntu-push/server/acceptance/suites [no test files]
ok launchpad.net/ubuntu-push/server/api 0.021s
ok launchpad.net/ubuntu-push/server/broker 0.007s
ok launchpad.net/ubuntu-push/server/broker/simple 0.008s
? launchpad.net/ubuntu-push/server/broker/testing [no test files]
? launchpad.net/ubuntu-push/server/broker/testsuite [no test files]
? launchpad.net/ubuntu-push/server/dev [no test files]
ok launchpad.net/ubuntu-push/server/listener 0.376s
ok launchpad.net/ubuntu-push/server/session 0.159s
ok launchpad.net/ubuntu-push/server/store 0.207s
? launchpad.net/ubuntu-push/testing [no test files]
ok launchpad.net/ubuntu-push/testing/condition 0.004s
ok launchpad.net/ubuntu-push/util 0.012s
? launchpad.net/ubuntu-push/whoopsie [no test files]
ok launchpad.net/ubuntu-push/whoopsie/identifier 0.013s
ok launchpad.net/ubuntu-push/whoopsie/identifier/testing 0.018s
go test -race launchpad.net/ubuntu-push/...
? launchpad.net/ubuntu-push [no test files]
ok launchpad.net/ubuntu-push/bus 1.024s
ok launchpad.net/ubuntu-push/bus/connectivity 1.209s
ok launchpad.net/ubuntu-push/bus/networkmanager 1.059s
ok launchpad.net/ubuntu-push/bus/notifications 1.062s
ok launchpad.net/ubuntu-push/bus/testing 1.034s
ok launchpad.net/ubuntu-push/bus/urldispatcher 1.013s
ok launchpad.net/ubuntu-push/client 1.295s

----------------------------------------------------------------------
FAIL: session_test.go:785: clientSessionSuite.TestDialWorks

[LOG] 36.85478 ERROR unable to start: write version: read tcp 127.0.0.1:39058: i/o timeout
session_test.go:823:
    c.Assert(err,...

Read more...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2014-02-12 13:39:12 +0000
3+++ Makefile 2014-03-12 13:25:28 +0000
4@@ -9,6 +9,7 @@
5
6 GODEPS = launchpad.net/gocheck
7 GODEPS += launchpad.net/go-dbus/v1
8+GODEPS += launchpad.net/go-xdg/v0
9 GODEPS += code.google.com/p/gosqlite/sqlite3
10
11 bootstrap:
12
13=== modified file 'dependencies.tsv'
14--- dependencies.tsv 2014-02-12 11:36:01 +0000
15+++ dependencies.tsv 2014-03-12 13:25:28 +0000
16@@ -1,3 +1,4 @@
17 code.google.com/p/gosqlite hg 74691fb6f83716190870cde1b658538dd4b18eb0 15
18 launchpad.net/go-dbus/v1 bzr james@jamesh.id.au-20140206110213-pbzcr6ucaz3rqmnw 125
19+launchpad.net/go-xdg/v0 bzr john.lenton@canonical.com-20140208094800-gubd5md7cro3mtxa 10
20 launchpad.net/gocheck bzr gustavo@niemeyer.net-20140127131816-zshobk1qqme626xw 86
21
22=== added file 'ubuntu-push-client.go'
23--- ubuntu-push-client.go 1970-01-01 00:00:00 +0000
24+++ ubuntu-push-client.go 2014-03-12 13:25:28 +0000
25@@ -0,0 +1,42 @@
26+/*
27+ Copyright 2013-2014 Canonical Ltd.
28+
29+ This program is free software: you can redistribute it and/or modify it
30+ under the terms of the GNU General Public License version 3, as published
31+ by the Free Software Foundation.
32+
33+ This program is distributed in the hope that it will be useful, but
34+ WITHOUT ANY WARRANTY; without even the implied warranties of
35+ MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
36+ PURPOSE. See the GNU General Public License for more details.
37+
38+ You should have received a copy of the GNU General Public License along
39+ with this program. If not, see <http://www.gnu.org/licenses/>.
40+*/
41+
42+package main
43+
44+import (
45+ "log"
46+
47+ "launchpad.net/go-xdg/v0"
48+
49+ "launchpad.net/ubuntu-push/client"
50+)
51+
52+func main() {
53+ cfgFname, err := xdg.Config.Find("ubuntu-push-client/config.json")
54+ if err != nil {
55+ log.Fatalf("unable to find a configuration file: %v", err)
56+ }
57+ lvlFname, err := xdg.Data.Ensure("ubuntu-push-client/levels.db")
58+ if err != nil {
59+ log.Fatalf("unable to open the levels database: %v", err)
60+ }
61+ cli := client.NewPushClient(cfgFname, lvlFname)
62+ err = cli.Start()
63+ if err != nil {
64+ log.Fatalf("unable to start: %v", err)
65+ }
66+ cli.Loop()
67+}

Subscribers

People subscribed via source and target branches