Re: [Evolution-hackers] concurrent modifications of items in GUI and EDS database

2009-08-03 Thread Patrick Ohly
On Tue, 2009-07-28 at 13:05 +0530, Chenthill wrote:
> On Fri, 2009-07-24 at 20:20 +0200, Patrick Ohly wrote:
> > I have not looked at the calendar API yet. Let me know what you think
> > about the attached patch for a new ebook API and I will continue with
> > calendar next, before implementing anything.
> Then changes made are reasonable. Nice api documentation! This can be
> done in calendar also. For calendars we use sequence numbers for items
> shared with people

I'm not sure what you mean with "items shared with people". Care to
explain?

>  and last-modified in general.

SyncEvolution is based on LAST-MODIFIED since 0.8.x, as mentioned on
this list before.

Attached is my current patch set, with one typo fix in the ebook part
and the ecal API also extended. Less functions need to be patched
because there is no async API.

> > In this current incarnation the patch tries a bit to provide simple
> > implementations of the new calls, but this isn't meant to be complete.
> Would be better to get these api's committed after the branching is done
> for 2.27.x. We will be merging the eds-addressbook dbus port this week
> (for 2.27.x) and the calendar part for evolution 3.0. Will keep you
> informed on the same.

Implementing the new API would require changing the libecal/ebook<->EDS
communication. Is that something that has to be done twice, once for the
old communication mechanism and once for D-Bus? Will there be a
configure switch to select between one or the other?

-- 
Bye, Patrick Ohly
--  
patrick.o...@gmx.de
http://www.estamos.de/

>From c7985fca473926b1058dc4859fb77f7b3dacb19b Mon Sep 17 00:00:00 2001
From: Patrick Ohly 
Date: Fri, 17 Jul 2009 16:27:29 +0200
Subject: [PATCH 1/3] documentation fix

e_book_remove_contact_by_id() does not exist, probably
e_book_remove_contact() was meant.
---
 addressbook/libebook/e-book.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index e9b3b01..fefe4fa 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -1688,7 +1688,7 @@ e_book_remove_contact (EBook   *book,
  * @error: a #GError to set on failure
  *
  * Removes the contacts with ids from the list @ids from @book.  This is
- * always more efficient than calling e_book_remove_contact_by_id if you
+ * always more efficient than calling e_book_remove_contact() if you
  * have more than one id to remove, as some backends can implement it
  * as a batch request.
  *
@@ -1769,7 +1769,7 @@ e_book_async_remove_contact_by_id (EBook *book,
  * @closure: data to pass to callback function
  *
  * Removes the contacts with ids from the list @ids from @book.  This is
- * always more efficient than calling e_book_remove_contact_by_id() if you
+ * always more efficient than calling e_book_remove_contact() if you
  * have more than one id to remove, as some backends can implement it
  * as a batch request.
  *
-- 
1.6.2

>From 78a7b1bbe267b3171d7614946589b6b386c0c242 Mon Sep 17 00:00:00 2001
From: Patrick Ohly 
Date: Fri, 24 Jul 2009 20:08:01 +0200
Subject: [PATCH 2/3] ebook atomic updates and deletes: check and return revision

Same API change as for ecal, using REV instead of LAST-MODIFIED.

The current API suffers from multiple race conditions: when
overwriting a contact, another client might have already made
an update that gets overwritten by older data. Removing a
contact is also affected => added an API extension that
allows backends a) to detect that clients want the more
careful data modifications and b) provides enough information
to do the checking based on the revision string in the backend
(EBOOK_STATIC_CAPABILITY_ATOMIC_MODIFICATIONS).

Software that does change tracking based on the revision string
(like SyncEvolution) needs to know which revision string was
assigned to an updated or added contact. Currently it must do
the operation, then ask for the whole contact. There is a small
window for a race condition here, but more important, this
requires another round-trip and transmit too much information.
With EBOOK_STATIC_CAPABILITY_RETURN_REV the client can be sure
to get the necessary information right away.
---
 addressbook/libebook/e-book-types.h |   12 ++
 addressbook/libebook/e-book.c   |  268 +-
 addressbook/libebook/e-book.h   |6 +
 3 files changed, 278 insertions(+), 8 deletions(-)

diff --git a/addressbook/libebook/e-book-types.h b/addressbook/libebook/e-book-types.h
index 00a814e..2dadf27 100644
--- a/addressbook/libebook/e-book-types.h
+++ b/addressbook/libebook/e-book-types.h
@@ -64,11 +64,23 @@ typedef enum {
 	E_BOOK_CHANGE_CARD_MODIFIED
 } EBookChangeType;
 
+typedef enum {
+	E_BOOK_UNDEFINED_REVISION_HANDLING = 0,
+	E_BOOK_IGNORE_REVISION = 1<<0,
+	E_BOOK_CHECK_REVISION = 1<<1,
+	E_BOOK_SET_REVISION = 1<<2
+} EBookRevisionHandlingFlags;
+
 typedef struct {
 	EBookChangeType  change_type;
 	EContact*contact;
 

Re: [Evolution-hackers] go-evolution.org

2009-08-03 Thread Nirav Kumar
On Fri, 2009-07-31 at 11:56 +0530, Chenthill wrote:
> On Thu, 2009-07-30 at 07:25 -0400, Matthew Barnes wrote:
> > On Thu, 2009-07-30 at 11:32 +0530, Chenthill wrote:
> > >   The archived contents would be eventually moved to
> > > www.gnome.org/projects/evolution . Time-line for the same is not yet
> > > decided. Until then the contents would remain in go-evolution.org.
> > 
> > Okay, so what does moving wiki contents to a non-wiki website mean
> > exactly?  Do we snapshot all the pages and copy the static HTML?  And if
> > we do that, how do we find archived wiki pages without the wiki's search
> > feature?  I guess we'd have to set up a global index page or something?
> Yes copying the static html. Manual work might be required. We should be
> having indexes like we have already at,
> http://projects.gnome.org/evolution/developer.shtml .
> 
> > 
> > Another option, perhaps only for the short-term, might be to just lock
> > down go-evolution.org so no new accounts, pages, or edits are possible.
> > That should preserve the search feature, and also solve the spam
> > problem, no?
> Possible. We still need get the admin right for that. Nirav ?
Let me know the plan for migration and i will try to get things set up
accordingly.
> 
> > 
> > On a different note, now that we've decided to move we need to compile a
> > list of which pages to move.  How about we set up a wiki page for that
> > and invite both developers and the community (or at least the evo-list
> > subscribers) to add what wiki pages they'd like to see moved.  Set a
> > deadline of, say, end of August?
> Lets first gather the contents to be migrated to lgo and
> gnome.org/projects/evolution. This will give us an idea to choose a
> right dead-line along with individuals for the tasks.
> 
> > 
> > On a third note, anyone know of a good MediaWiki-to-MoinMoin syntax
> > conversion program?  My Google results have yielded mostly conversion
> > scripts in the opposite direction (MoinMoin-to-MediaWiki), or else
> > software that requires admin access to the MoinMoin database.
> I searched for it sometime back. I did find scripts to convert form
> moinmoin-to-mediawiki but not vice-versa :( May be a question on pgo
> might help to find if anyone else knows ?
> 
> - Chenthill.
> > 
> > Matthew Barnes
> 
> ___
> Evolution-hackers mailing list
> Evolution-hackers@gnome.org
> http://mail.gnome.org/mailman/listinfo/evolution-hackers

___
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers