Merge lp:~rodrigo-moya/evolution-couchdb/0-3-2-delete-multiple-contacts into lp:~ubuntu-desktop/evolution-couchdb/ubuntu

Proposed by Rodrigo Moya
Status: Merged
Merged at revision: not available
Proposed branch: lp:~rodrigo-moya/evolution-couchdb/0-3-2-delete-multiple-contacts
Merge into: lp:~ubuntu-desktop/evolution-couchdb/ubuntu
Diff against target: 56 lines
2 files modified
debian/changelog (+7/-0)
debian/patches/02_delete_multiple_contacts.patch (+37/-0)
To merge this branch: bzr merge lp:~rodrigo-moya/evolution-couchdb/0-3-2-delete-multiple-contacts
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+13785@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Added upstream patch to allow removal of multiple contacts at once

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2009-10-12 12:38:04 +0000
3+++ debian/changelog 2009-10-22 13:55:18 +0000
4@@ -1,3 +1,10 @@
5+evolution-couchdb (0.3.2-0ubuntu2) karmic; urgency=low
6+
7+ * Added upstream patch for allowing removal of multiple contacts at once
8+ (LP: #456024)
9+
10+ -- Rodrigo Moya <rodrigo.moya@canonical.com> Thu, 22 Oct 2009 13:19:38 +0200
11+
12 evolution-couchdb (0.3.2-0ubuntu1) UNRELEASED; urgency=low
13
14 * New upstream release:
15
16=== added file 'debian/patches/02_delete_multiple_contacts.patch'
17--- debian/patches/02_delete_multiple_contacts.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/02_delete_multiple_contacts.patch 2009-10-22 13:55:18 +0000
19@@ -0,0 +1,37 @@
20+commit 3420a1b23316371922bca9287beb454b09be542f
21+Author: Rodrigo Moya <rodrigo@gnome-db.org>
22+Date: Tue Oct 20 17:44:08 2009 +0200
23+
24+ Get the UID from the iterated list item, not from the head of the list, which tries to delete all the time the first ID
25+
26+diff --git a/addressbook/e-book-backend-couchdb.c b/addressbook/e-book-backend-couchdb.c
27+index c8364b1..834df63 100644
28+--- a/addressbook/e-book-backend-couchdb.c
29++++ b/addressbook/e-book-backend-couchdb.c
30+@@ -1083,12 +1083,25 @@ e_book_backend_couchdb_remove_contacts (EBookBackend *backend,
31+ for (l = id_list; l != NULL; l = l->next) {
32+ CouchDBDocument *document;
33+ GError *error = NULL;
34+- const gchar *uid = (const gchar *) id_list->data;
35++ const gchar *uid = (const gchar *) l->data;
36+
37+ document = couchdb_document_get (couchdb_backend->couchdb, couchdb_backend->dbname, uid, &error);
38+ if (document) {
39+ if (couchdb_document_delete (document, &error))
40+ deleted_ids = g_list_append (deleted_ids, (gpointer) uid);
41++ else {
42++ if (error != NULL) {
43++ g_debug ("Error deleting document: %s", error->message);
44++ g_error_free (error);
45++ } else
46++ g_debug ("Error deleting document");
47++ }
48++ } else {
49++ if (error != NULL) {
50++ g_debug ("Error getting document: %s", error->message);
51++ g_error_free (error);
52++ } else
53++ g_debug ("Error getting document");
54+ }
55+ }
56+

Subscribers

People subscribed via source and target branches

to all changes: