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 C102FD58E for ; Fri, 24 May 2013 08:35:35 +0000 (UTC) Received: (qmail 80842 invoked by uid 500); 24 May 2013 08:35:34 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 80377 invoked by uid 500); 24 May 2013 08:35:34 -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 Delivered-To: moderator for user@couchdb.apache.org Received: (qmail 65773 invoked by uid 99); 24 May 2013 05:37:44 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jason.h.smith@gmail.com designates 209.85.214.180 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=+64nSCAHXHfwyNU0mDSKGlJK435j87Y2yxUo01fYbqk=; b=ZVjHguJLTgtSsEPQe1zaDyGPP3BvZ4t+58RVTAVHIABCoOhiVePkaVMj82au2xFuSf f9pPrvplube1RPZwGtIzicvKeFHrlGb9ptvgYEpwoychoD9Exd/YEajcQhPdMcCtwnQw DiTquPJtmQQ3u3+C4S2MkIzWMBM5JF8zQM4zFpogaNcT+NTyjCqKDjJ4GO31m9rRNmt6 HZTnxWo35YD5qX0Nsypk4K+MwqDVYk0x5Kj7SNomcTlTYEt3FziVe0uLbS7fjQDa5ZYS afVbWjL24Tiwxd6G/rhCOH4KYh/YVVSbKvN9nJPd02j1p+kyXLu1iWiSNXaNna20KHN7 EKRA== X-Received: by 10.182.45.197 with SMTP id p5mr10443950obm.92.1369373837246; Thu, 23 May 2013 22:37:17 -0700 (PDT) MIME-Version: 1.0 Sender: jason.h.smith@gmail.com In-Reply-To: <116DF3F19DB44CF9AB36993A20398CBA@martynus.net> References: <116DF3F19DB44CF9AB36993A20398CBA@martynus.net> From: Jason Smith Date: Fri, 24 May 2013 12:36:57 +0700 X-Google-Sender-Auth: Vef-FCe8NHtLZu-ivc0OvbOYsGA Message-ID: Subject: Re: using POST _bulk_docs with ?edits=false To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=047d7b67637a2249ab04dd703192 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b67637a2249ab04dd703192 Content-Type: text/plain; charset=UTF-8 Calculating _rev "correctly" depends on what you need. If you and I have the same document and make the same changes except _rev (and _revisions), then we will get a conflict when we replicate to each other. The only project I know that uses edits=false somewhat successfully is mikeal/replicate. It might help, although it gets its _revisions value from CouchDB, it doesn't calculate anything. Can you paste some example documents (with the _revisions) value? On Fri, May 24, 2013 at 3:28 AM, Gregor Martynus wrote: > Hey, > > I'm using the edits=false flag to push changes from the browser to the > couch, to prevent that data can get lost. My current implementations > randomly generates a _rev number and adds the _revisions attribute with the > current _rev and the newly generated _rev number. But that leads to > conflicts. I was told that the _rev number has to be calculated based on > the objects. > > I try to find out how to calculate a new the _rev number correctly but > can't figure it out. I've described the issues here: > https://github.com/hoodiehq/hoodie.js/issues/66 > > Would really appreciate your help > > -- > Gregor > > --047d7b67637a2249ab04dd703192--