Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B73729A5C for ; Thu, 22 Mar 2012 18:53:20 +0000 (UTC) Received: (qmail 84926 invoked by uid 500); 22 Mar 2012 18:53:19 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 84877 invoked by uid 500); 22 Mar 2012 18:53:19 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 84868 invoked by uid 99); 22 Mar 2012 18:53:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2012 18:53:19 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.212.52] (HELO mail-vb0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2012 18:53:12 +0000 Received: by vbzb23 with SMTP id b23so1674433vbz.11 for ; Thu, 22 Mar 2012 11:52:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding :x-gm-message-state; bh=GZ+PGk+3iBe/t5ABUB9LZlbX3Mb/683O21f5RfTaoOo=; b=nagt3fC8Zc6U51C4rENy/ndqvEWJLtwQV+/54NCP7xViS7Okl1yyy5mAeqyYwV1zuO F94CztwNknFQASfgfrnfHVGhXp0FYSe6r8uwWCGiC2lVBQ4ulxODKBTPNzlKMTaKv6XG ZcbVKoS7VU7aiZjlNZ++SYzjeKXNub0mQ3sODDXqo25ShTLUNW90Mz+Ly30AIQCTmru0 7/htK8ssQ9Hk+M9tiIe2deEbaeElgqm6KG7+Vmsbwe7vDOgu80xIOuKnaLRUtX/5Fj5C UpVwyodByob/kYp6Ad5b+9X+4Tqe7IUORWB0DUh0Qtrlvcc6oicvIvNs8EBqPq9eWsaS ehbg== MIME-Version: 1.0 Received: by 10.52.176.198 with SMTP id ck6mr3559192vdc.0.1332442371375; Thu, 22 Mar 2012 11:52:51 -0700 (PDT) Received: by 10.220.180.194 with HTTP; Thu, 22 Mar 2012 11:52:51 -0700 (PDT) X-Originating-IP: [98.229.29.64] In-Reply-To: <4F6B714A.5040603@meetinghouse.net> References: <4F6B714A.5040603@meetinghouse.net> Date: Thu, 22 Mar 2012 14:52:51 -0400 Message-ID: Subject: Re: version control for documents? From: Sam Bisbee To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnGV8bmw4ulqjVIWHf1vsDNkcJsp3660hi4zizWH1OzO8JYYTYHTJqf/UUQ5/UYGhOeNJPf X-Virus-Checked: Checked by ClamAV on apache.org Hi Miles, Here is a tool that I built that does just that: https://github.com/sbisbee/couchdb-history The basic idea is that there is a _changes listener that grabs each new revision of a document and stores it as its own document in a different database with a deterministic _id. I wrote it last year and haven't touched it since or run it in production. It could use some TLC and I'm not sure whether PHP was the best language of choice. If I had my druthers I'd likely rewrite it in node, especially since Sag is now available in JS form. Cheers, -- Sam Bisbee On Thu, Mar 22, 2012 at 2:36 PM, Miles Fidelman wrote: > Hi Folks, > > As part of a larger applicaiton, I'm looking at using CouchDB as a "file > cabinet" to manage a collection of "documents" (surprise, surprise - it i= s a > document database after all). =C2=A0In this case, the documents really wi= ll be > documents (e.g., a word document, or a file). =C2=A0My simplistic model i= s that > each Couch document will contain json-encoded metadata, and an attachment= - > the "real" document as a blob. > > I want to apply version and change control to the documents and their > metadata. =C2=A0In essence, I want to do git-like stuff for text, html, a= nd word > documents. > > I'm aware that CouchDB-style "version control" is not real version contro= l a > la git, cvs, or what have you - and I've seen some discussions on this li= st > that suggest doing "real" version control has to be overlayed on Couch. > > So... my question is: =C2=A0Are there any good libraries and/or examples = for > doing so? > > Thanks very much, > > Miles Fidelman > > -- > In theory, there is no difference between theory and practice. > In practice, there is. =C2=A0 .... Yogi Berra > >