From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id CF251429E26 for ; Fri, 7 Oct 2011 04:36:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.001 X-Spam-Level: * X-Spam-Status: No, score=1.001 tagged_above=-999 required=5 tests=[FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=1] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EwJ5iUqaoCcT for ; Fri, 7 Oct 2011 04:36:32 -0700 (PDT) Received: from ladybug (li131-231.members.linode.com [69.164.216.231]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 2CE27431FB6 for ; Fri, 7 Oct 2011 04:36:32 -0700 (PDT) Received: from jkr by ladybug with local (Exim 4.76) (envelope-from ) id 1RC8j8-0008GB-JU; Fri, 07 Oct 2011 07:36:30 -0400 From: Jesse Rosenthal To: David Bremner , Jameson Graef Rollins , Notmuch Mail Subject: Re: tag sharing In-Reply-To: <87ipo2td84.fsf@zancas.localnet> References: <1306619520-25730-1-git-send-email-jrollins@finestructure.net> <87hb8eebdi.fsf@servo.factory.finestructure.net> <87pqmyn224.fsf@servo.factory.finestructure.net> <87zklyjshd.fsf@yoom.home.cworth.org> <87sjrng5k3.fsf@servo.factory.finestructure.net> <87oc2bjgrs.fsf@yoom.home.cworth.org> <8762oigc0y.fsf@servo.factory.finestructure.net> <87boya98sf.fsf@gogo.home> <87vcwg2p2m.fsf@servo.factory.finestructure.net> <87wrcijn1w.fsf@zancas.localnet> <87ipo2td84.fsf@zancas.localnet> User-Agent: Notmuch/unknown (http://notmuchmail.org) Emacs/23.3.1 (x86_64-apple-darwin) Date: Fri, 07 Oct 2011 07:36:30 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2011 11:36:32 -0000 On Thu, 06 Oct 2011 11:18:51 -0300, David Bremner wrote: Non-text part: multipart/signed > On Thu, 06 Oct 2011 09:21:48 -0400, Jesse Rosenthal wrote: > > morning's project. In retrospect, I think the main issue was that I was > > trying to figure out how history would be kept. By using git, though, > > your idea would be that we get history for free, right? > > Yeah. Of course, one would have to decide if the history of the current > dump file format is intelligible, or if some alternative format should > be used. I've managed to reconstruct a bit of my thinking. I think it could work with the current format if we went as follows. I also think we could use git, but I'm not sure that wouldn't be overkill. Some of the steps are in extreme slow motion, just to make sure we're on the same page. (I've also replaced the real msg-ids to cut down on noise). 1. David dumps the targeted messages (tags in namespace "my"), so we get a file like this: msg-id-1@example.1 (my.foo inbox) msg-id-2@example.2 (answered my.to-do inbox signed) 2. David strips out everything but tags in the namespace and removes the namespace: msg-id-1@example.1 (foo) msg-id-2@example.2 (to-do) 3. David makes it available, Jesse pulls. 4. Jesse dumps the namespace he has associated with David ("bremner"): msg-id-3@example.3 (bremner.bar) msg-id-4@example.4 (bremner.bar unread) msg-id-1@example.1 (bremner.foo inbox) msg-id-5@example.5 (bremner.wishlist inbox) 5. Jesse strips the tags: msg-id-3@example.3 (bar) msg-id-4@example.4 (bar) msg-id-1@example.1 (foo) msg-id-5@example.5 (wishlist) 6. Jesse replaces this list with David's: msg-id-1@example.1 (foo) msg-id-2@example.2 (to-do) 7. Jesse removes all tags with the "bremner" namespace from his database. 8. Jesse adds the tags from the list in step (6), with the appropriate namespace, to his list of tags. The messages of interest now look like: msg-id-3@example.3 () msg-id-4@example.4 (unread) msg-id-1@example.1 (bremner.foo inbox) msg-id-5@example.5 (inbox) msg-id-2@example.2 (bremner.to-do someothertag) 9. Jesse runs `notmuch restore` The reason I went through this slowly is to highlight the fact that the only thing that needs to be recorded in diffs somehow (in git, let's say) are the files in steps (5) and (6). So if we integrated this with git, there would be something along the lines of a commit (on Jesse's computer) in step (5) and then another commit (again on Jesse's computer) in step (6). Note that we don't actually need (5) to do tag-sharing. The only reason it's there is for keeping history. I'm pretty sure that we don't need a commit on David's computer in step (1), because what the history would record is when the tag-sharing utility changed your tags, not when you did. Note also that all we would really be asking git to do here is keep an ordered collection of diffs of a single file. Honest question: since this is the barest possible form of version control, is git necessary? Some of the features, like commit messages, don't seem to fit well with this model; and others, like branching, seem pretty useless. What's the value added over just keeping a (compressed?) collection of diffs for each namespace? Best, Jesse