Permalink
Commits on May 20, 2012
  1. windows support in escript for refuge-build

    fairwinds
    fairwinds committed May 20, 2012
Commits on May 19, 2012
  1. add windows support branches to nifs repos

    fairwinds
    fairwinds committed May 19, 2012
Commits on May 17, 2012
  1. vhosts values should not be empty.

    benoitc committed May 17, 2012
    A vhost value can be empty when removed with the couch_config module.
Commits on May 16, 2012
  1. all should be compile & deps.

    benoitc committed May 16, 2012
  2. fix whitespaces

    benoitc committed May 16, 2012
Commits on May 12, 2012
  1. filter fields in included doc when returned from a _changes

    benoitc committed May 12, 2012
    With this changes you can only return a specified list of fields in the
    included docs by passing the list of them to an optionnal `fields`
    parameter. For now nested fields are ignored.
    
        $ curl -XPUT localhost:5984/testdb
        {"ok":true}
        $ curl -XPUT localhost:5984/testdb/test -d'{"f1": 1, "f2": 2, "f3":
    3}'
        {"ok":true,"id":"test","rev":"1-2b23983c05a9ca8015b6ea7bdc1b3478"}
        $ curl -XPUT localhost:5984/testdb/test1 -d'{"f1": 1, "f2": 4, "f3":
    3}'
        {"ok":true,"id":"test1","rev":"1-2942771a428c4b45315710db0b6aaa7a"}
        $ curl -XPUT localhost:5984/testdb/test2 -d'{"f1": 1, "f2": 7, "f3":
    8}'
        {"ok":true,"id":"test2","rev":"1-ac4cd62a83a0a98421e9ed74adcadcc3"}
        $ curl "http://localhost:5984/testdb/_changes?include_docs=true"
        {"results":[
        {"seq":1,"id":"test","changes":[{"rev":"1-2b23983c05a9ca8015b6ea7bdc1b3478"}],"doc":{"_id":"test","_rev":"1-2b23983c05a9ca8015b6ea7bdc1b3478","f1":1,"f2":2,"f3":3}},
        {"seq":2,"id":"test1","changes":[{"rev":"1-2942771a428c4b45315710db0b6aaa7a"}],"doc":{"_id":"test1","_rev":"1-2942771a428c4b45315710db0b6aaa7a","f1":1,"f2":4,"f3":3}},
        {"seq":3,"id":"test2","changes":[{"rev":"1-ac4cd62a83a0a98421e9ed74adcadcc3"}],"doc":{"_id":"test2","_rev":"1-ac4cd62a83a0a98421e9ed74adcadcc3","f1":1,"f2":7,"f3":8}}
        ],
        "last_seq":3}
        $ curl
    'http://localhost:5984/testdb/_changes?include_docs=true&fields=\["f1"\]'
        {"results":[
        {"seq":1,"id":"test","changes":[{"rev":"1-2b23983c05a9ca8015b6ea7bdc1b3478"}],"doc":{"_id":"test","_rev":"1-2b23983c05a9ca8015b6ea7bdc1b3478","f1":1}},
        {"seq":2,"id":"test1","changes":[{"rev":"1-2942771a428c4b45315710db0b6aaa7a"}],"doc":{"_id":"test1","_rev":"1-2942771a428c4b45315710db0b6aaa7a","f1":1}},
        {"seq":3,"id":"test2","changes":[{"rev":"1-ac4cd62a83a0a98421e9ed74adcadcc3"}],"doc":{"_id":"test2","_rev":"1-ac4cd62a83a0a98421e9ed74adcadcc3","f1":1}}
        ],
        "last_seq":3}
    
        $ curl
    'http://localhost:5984/testdb/_changes?include_docs=true&fields=\["f1","f2"\]'
        {"results":[
        {"seq":1,"id":"test","changes":[{"rev":"1-2b23983c05a9ca8015b6ea7bdc1b3478"}],"doc":{"_id":"test","_rev":"1-2b23983c05a9ca8015b6ea7bdc1b3478","f1":1,"f2":2}},
        {"seq":2,"id":"test1","changes":[{"rev":"1-2942771a428c4b45315710db0b6aaa7a"}],"doc":{"_id":"test1","_rev":"1-2942771a428c4b45315710db0b6aaa7a","f1":1,"f2":4}},
        {"seq":3,"id":"test2","changes":[{"rev":"1-ac4cd62a83a0a98421e9ed74adcadcc3"}],"doc":{"_id":"test2","_rev":"1-ac4cd62a83a0a98421e9ed74adcadcc3","f1":1,"f2":7}}
        ],
        "last_seq":3}
    
    Conflicts:
    
    	apps/couch_changes/src/couch_changes.erl
Commits on May 10, 2012
  1. add support of Server-Sent Events protocol to db changes API.

    benoitc committed May 10, 2012
    This patch add support for the new specification of w3c by adding a new
    feed type named `eventsource`:
    
    http://www.w3.org/TR/2009/WD-eventsource-20090423/
    
    ex:
    
        $ curl
    'http://127.0.0.1:5984/testdb/_changes?feed=eventsource&heartbeat=true&timeout=10000'
        data:
    {"seq":1,"id":"test","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}
        id: 1
    
        data:
    {"seq":2,"id":"test1","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}
        id: 2
Commits on May 7, 2012
  1. Add dropbox databases support.

    benoitc committed May 7, 2012
    Dropobx databases are databases only acceping write but can only be read
    by selected users. Only nodes' admins or dropbox members can read
    documents
    that have  been dropped in a dropbox database.
    
    To mark a database as a Drop Box, add the property `{"dropbox": true}`
    to the security object.
    
    Dropbox members are admins (global or db admins) and users sets in the
    `dropbox_members` property:
    
        {"dropbox_members": {"names": [], "roles": []}}
    
    Example of usage:
    
        $ curl -XPUT admin:test@127.0.0.1:5984/testdb
        {"ok":true}
        $ curl -XPUT 127.0.0.1:5984/testdb/test -d'{}'
        {"ok":true,"id":"test","rev":"1-967a00dff5e02add41819138abb3284d"}
        $ curl -XPUT 127.0.0.1:5984/testdb/test1 -d'{}'
        {"ok":true,"id":"test1","rev":"1-967a00dff5e02add41819138abb3284d"}
        $ curl -XGET 127.0.0.1:5984/testdb/_all_docs
        {"total_rows":2,"offset":0,"rows":[
        {"id":"test","key":"test","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}},
        {"id":"test1","key":"test1","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}}]}
        $ curl -XGET 127.0.0.1:5984/testdb/test1
        {"_id":"test1","_rev":"1-967a00dff5e02add41819138abb3284d"}
        $ curl -XPUT admin:test@127.0.0.1:5984/testdb/_security -d'{"dropbox": true}'
        {"ok":true}
        $ curl -XGET 127.0.0.1:5984/testdb/test1
        {"error":"forbidden","reason":"Only administrators can view docs in a dropbox database."}
        $ curl -XGET 127.0.0.1:5984/testdb/_all_docs
        {"error":"forbidden","reason":"Only admins can access _all docs"}
        $ curl -XPUT 127.0.0.1:5984/testdb/test2 -d'{}'
        {"ok":true,"id":"test2","rev":"1-967a00dff5e02add41819138abb3284d"}
        $ curl -XGET 127.0.0.1:5984/testdb/test2
        {"error":"forbidden","reason":"Only administrators can view docs in a dropbox database."}
        $ curl -XGET admin:test@127.0.0.1:5984/testdb/_all_docs
        {"total_rows":3,"offset":0,"rows":[
        {"id":"test","key":"test","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}},
        {"id":"test1","key":"test1","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}},
        {"id":"test2","key":"test2","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}}
        ]}
  2. make sure that ClearPassword string is handled.

    benoitc committed May 7, 2012
    When you set a clear password in the config, the
    `couch_passwords:hash_admin_password/1` get a string instead of a
    binary.
Commits on May 5, 2012
  1. Added Magnus Hoff to apps/couch/THANKS

    dch authored and benoitc committed Apr 30, 2012
  2. Merged pull request #19 from @maghoff with thanks

    maghoff authored and benoitc committed Apr 28, 2012
    Fix failed loading of CommonJS modules that end in a line comment.
  3. Use TEquals for great good

    rnewson authored and benoitc committed Apr 26, 2012
  4. Silence compiler warning

    davisp authored and benoitc committed Apr 25, 2012
  5. Update changes with JS CLI test changes

    davisp authored and benoitc committed Apr 25, 2012
  6. Limit rewrite recursion depth

    RonnyPfannschmidt authored and benoitc committed Mar 28, 2012
    Loops in the rewriter would end up pegging the CPU until memory was
    exhausted. Max recursion is now configurable and limited to 100
    iterations.
    
    Fixes: COUCHDB-1441
  7. Do not overwrite X-CouchDB-Requested-Path

    RonnyPfannschmidt authored and benoitc committed Mar 23, 2012
    Repeated rewrites would replace the initial value of
    X-CouchDB-Requested-Path.
    
    Fixes: COUCHDB-1442
  8. Fixing the replicator_db JS test

    davisp authored and benoitc committed Mar 26, 2012
  9. Fix race condition in the auth db creation

    davisp authored and benoitc committed Mar 25, 2012
    This test deletes a database and then tries to go and write to it
    without ensuring that it exists. This is just a race with the auth cache
    code trying to recreate its own database. This addition just makes sure
    it exists by trying to create it and ignoring any 412 errors if the auth
    cache won the race.
  10. Fix random failures in replication.js test

    davisp authored and benoitc committed Mar 25, 2012
    This should fix the random failures for the 'expected "25" got "31"
    error message that pops up occasionally. If my hunch is correct when we
    remove the two docs from the source db its possible to get the writes on
    the target out of order depending on a race condition.
    
    This just sleeps a bit in between the deletions to try and reduce that
    possibility. I haven't spotted this error after applying this patch.
  11. Make password hashing synchronous when using the /_config/admins API.

    janl authored and benoitc committed Apr 23, 2012
    This should account for many intermittent JavaScript test suite errors.
    
    The patch retains hashing admins on couch_server start to account for
    users editing their .ini files directly.
    
    Knowledge about password hash prefixes and the password hashing itself
    has been moved to couch_passwords.
    
    Thanks to Dale Harvey and Robert Newson for helping me to hunt this down
    and shaping and reviewing the patch.
  12. Added 1.2.1 sections

    nslater authored and benoitc committed Apr 7, 2012
  13. COUCHDB-1060 - Fix tests

    rnewson authored and benoitc committed Apr 6, 2012
Commits on Apr 20, 2012
Commits on Apr 14, 2012
  1. we don't care if they die.

    benoitc committed Apr 14, 2012
Commits on Apr 13, 2012
  1. Avoid possible timeout initializing replications

    fdmanana authored and benoitc committed Apr 13, 2012
    If 2 different replications start and finish at about the same
    time, there's a chance one is doing a synchronous gen_server
    call to the replication manager (to notify it that it started)
    while the replication manager is doing a call to the replication
    supervisor because the other replication just finished.
    
    COUCHDB-1461