You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2013/12/16 21:03:21 UTC

[01/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Updated Branches:
  refs/heads/1744-single-config-file 3fd7500f2 -> 1c344a966 (forced update)


Fix minor documemtation typo

Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/2b807087
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/2b807087
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/2b807087

Branch: refs/heads/1744-single-config-file
Commit: 2b8070875b799810a1409d7067afdf9ac6b90d16
Parents: 4e57f8f
Author: Jens Rantil <je...@gmail.com>
Authored: Thu Nov 28 23:30:31 2013 +0100
Committer: Jens Rantil <je...@gmail.com>
Committed: Thu Nov 28 23:30:31 2013 +0100

----------------------------------------------------------------------
 share/doc/src/api/database/compact.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/2b807087/share/doc/src/api/database/compact.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/database/compact.rst b/share/doc/src/api/database/compact.rst
index cdafb26..706eedf 100644
--- a/share/doc/src/api/database/compact.rst
+++ b/share/doc/src/api/database/compact.rst
@@ -91,7 +91,7 @@
 
   Compacts the view indexes associated with the specified design document.
   If may be that compacting a large view can return more storage than
-  compacting the atual db. Thus, you can use this in place of the full
+  compacting the actual db. Thus, you can use this in place of the full
   database compaction if you know a specific set of view indexes have been
   affected by a recent database change.
 


[22/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Added 'copy:ace' to the release task and out of the couchdebug one


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/1ba9aa35
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1ba9aa35
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1ba9aa35

Branch: refs/heads/1744-single-config-file
Commit: 1ba9aa35a17ec7710a941981644111e655c7ecf4
Parents: 72c7810
Author: suelockwood <de...@apache.org>
Authored: Wed Dec 4 14:56:43 2013 -0500
Committer: suelockwood <de...@apache.org>
Committed: Wed Dec 4 14:56:43 2013 -0500

----------------------------------------------------------------------
 src/fauxton/Gruntfile.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/1ba9aa35/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index 75fcc5d..e8a12be 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -423,7 +423,7 @@ module.exports = function(grunt) {
 
   grunt.registerTask('watchRun', ['clean:watch', 'dependencies', 'jshint']);
   // build a release
-  grunt.registerTask('release', ['clean' ,'dependencies', "gen_initialize:release", 'jshint', 'build', 'minify', 'copy:dist']);
+  grunt.registerTask('release', ['clean' ,'dependencies', "gen_initialize:release", 'jshint', 'build', 'minify', 'copy:dist', 'copy:ace']);
 
   /*
    * Install into CouchDB in either debug, release, or couchapp mode
@@ -431,7 +431,7 @@ module.exports = function(grunt) {
   // make a development install that is server by mochiweb under _utils
   grunt.registerTask('couchdebug', ['debug', 'copy:couchdebug']);
   // make a minimized install that is server by mochiweb under _utils
-  grunt.registerTask('couchdb', ['release', 'copy:ace', 'copy:couchdb']);
+  grunt.registerTask('couchdb', ['release', 'copy:couchdb']);
   // make an install that can be deployed as a couchapp
   grunt.registerTask('couchapp_setup', ['release']);
   // install fauxton as couchapp


[34/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
jquery.couch.js: db.changes().stop() should abort XMLHTTPRequest


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/9eb26297
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/9eb26297
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/9eb26297

Branch: refs/heads/1744-single-config-file
Commit: 9eb262979aa053f7d4b40bc39365a022ee0a52b6
Parents: 6c71f2c
Author: Fedor Indutny <fe...@gmail.com>
Authored: Tue Dec 10 17:29:16 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Tue Dec 10 17:29:16 2013 +0400

----------------------------------------------------------------------
 share/www/script/jquery.couch.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/9eb26297/share/www/script/jquery.couch.js
----------------------------------------------------------------------
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
index db4e8ef..1a4c3b7 100644
--- a/share/www/script/jquery.couch.js
+++ b/share/www/script/jquery.couch.js
@@ -412,6 +412,7 @@
           // set up the promise object within a closure for this handler
           var timeout = 100, db = this, active = true,
             listeners = [],
+            xhr = null,
             promise = /** @lends $.couch.db.changes */ {
               /**
                * Add a listener callback
@@ -428,6 +429,9 @@
                */
             stop : function() {
               active = false;
+              if (xhr){
+                xhr.abort();
+              }
             }
           };
           // call each listener when there is a change
@@ -458,7 +462,7 @@
               feed : "longpoll",
               since : since
             });
-            ajax(
+            xhr = ajax(
               {url: db.uri + "_changes"+encodeOptions(opts)},
               options,
               "Error connecting to "+db.uri+"/_changes."
@@ -976,7 +980,7 @@
     ajaxOptions = $.extend(defaultAjaxOpts, ajaxOptions);
     errorMessage = errorMessage || "Unknown error";
     timeStart = (new Date()).getTime();
-    $.ajax($.extend($.extend({
+    return $.ajax($.extend($.extend({
       type: "GET", dataType: "json", cache : maybeUseCache(),
       beforeSend: function(xhr){
         if(ajaxOptions && ajaxOptions.headers){


[50/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Ship single full document default config file.

The default.ini becomes really solid default config file with full set of
options with short documentation and default values. The big warning alerts you,
that any changes made in default.ini might be overwritten and suggests you
to use local.ini for any modifications instead.

The local.ini is removed and doesn't ships with new CouchDB installations.
This also resolves issue when after CouchDB upgrade package manager asks users
to merge their local.ini with shipped one. However, when CouchDB starts it
checks for local.ini existence and will create it if missed to keep there all
config options modifications.

COUCHDB-1744


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/1c344a96
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1c344a96
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1c344a96

Branch: refs/heads/1744-single-config-file
Commit: 1c344a9669f6b3b6bafeac82ddc29a52d3eccf18
Parents: d734db0
Author: Alexander Shorin <kx...@apache.org>
Authored: Sun Jul 7 03:54:45 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Tue Dec 17 00:01:09 2013 +0400

----------------------------------------------------------------------
 bin/couchdb.tpl.in             |   3 +
 etc/couchdb/Makefile.am        |  12 +-
 etc/couchdb/default.ini.tpl.in | 897 +++++++++++++++++++++++++++---------
 etc/couchdb/local.ini          |  97 ----
 4 files changed, 679 insertions(+), 330 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/1c344a96/bin/couchdb.tpl.in
----------------------------------------------------------------------
diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in
index 538ebcb..d879f3b 100644
--- a/bin/couchdb.tpl.in
+++ b/bin/couchdb.tpl.in
@@ -153,6 +153,9 @@ _load_config () {
     _add_config_dir "$DEFAULT_CONFIG_DIR"
     # We initialize plugins here to get the desired default config load order
     _find_plugins
+    if test ! -r "$LOCAL_CONFIG_FILE" ; then
+      touch "$LOCAL_CONFIG_FILE" 2> /dev/null || true
+    fi
     _add_config_file "$LOCAL_CONFIG_FILE"
     _add_config_dir "$LOCAL_CONFIG_DIR"
     if [ "$COUCHDB_ADDITIONAL_CONFIG_FILE" != '' ]

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1c344a96/etc/couchdb/Makefile.am
----------------------------------------------------------------------
diff --git a/etc/couchdb/Makefile.am b/etc/couchdb/Makefile.am
index 51b8fcb..e71d95b 100644
--- a/etc/couchdb/Makefile.am
+++ b/etc/couchdb/Makefile.am
@@ -16,8 +16,6 @@ devcouchprivlibdir = $(abs_top_builddir)/src/couchdb/priv/.libs
 localconf_DATA = default.ini
 noinst_DATA = default_dev.ini local_dev.ini
 
-EXTRA_DIST = local.ini
-
 CLEANFILES = $(localconf_DATA) $(noinst_DATA)
 
 transform = @program_transform_name@
@@ -72,16 +70,13 @@ default_dev.ini: default.ini.tpl
 
 # Noah said to not specify local.ini but it borks
 # VPATH builds that make distcheck uses.
-local_dev.ini: local.ini
+local_dev.ini:
 	if test ! -f "$@"; then \
-	    cp $< $@; \
+	    touch $@; \
 	    chmod +w $@; \
 	fi
 
 install-data-hook:
-	if test ! -f "$(DESTDIR)$(localconfdir)/local.ini"; then \
-	    cp $(srcdir)/local.ini "$(DESTDIR)$(localconfdir)/local.ini"; \
-	fi
 	if test ! "$(mkdir_p)" = ""; then \
 	    $(mkdir_p) "$(DESTDIR)$(localconfdir)/default.d"; \
 	    $(mkdir_p) "$(DESTDIR)$(localconfdir)/local.d"; \
@@ -90,6 +85,3 @@ install-data-hook:
 	    mkdir -p "$(DESTDIR)$(localconfdir)/default.d"; \
 	    mkdir -p "$(DESTDIR)$(localconfdir)/local.d"; \
 	fi
-
-uninstall-local:
-	rm -f "$(DESTDIR)/$(localconfdir)/local.ini"

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1c344a96/etc/couchdb/default.ini.tpl.in
----------------------------------------------------------------------
diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in
index 3267001..e98bce6 100644
--- a/etc/couchdb/default.ini.tpl.in
+++ b/etc/couchdb/default.ini.tpl.in
@@ -1,100 +1,350 @@
 ; @configure_input@
 
-; Upgrading CouchDB will overwrite this file.
-[vendor]
-name = %package_author_name%
-version = %version%
+;; WARNING! DO NOT MODIFY THIS FILE!
+;; Upgrading CouchDB will overwrite this file!
+;; Instead, copy it as local.ini within the same directory and edit it to
+;; override these default setting. Make sure that couchdb user has read-write
+;; permissions for it.
+;;
+;; For the latest actual configuration options description please consult with
+;; CouchDB docs:
+;; http://docs.couchdb.org/en/latest/config/index.html
+;;
+
+
+;-------------------------------------------------------------------------------
+; Server Administrators
+;-------------------------------------------------------------------------------
+; To create an admin account uncomment the '[admins]' section below and add a
+; line in the format 'username = password'. When you next start CouchDB, it
+; will change the password to a hash (so that your passwords don't linger
+; around in plain-text files). You can add more admin accounts with more
+; 'username = password' lines. Don't forget to restart CouchDB after
+; changing this.
+[admins]
+;admin = mysecretpassword
+
+
+;-------------------------------------------------------------------------------
+; CouchDB Base Configuration
+;-------------------------------------------------------------------------------
 
 [couchdb]
+
+; Location of CouchDB's databases files.
 database_dir = %localstatelibdir%
+
+; Location of CouchDB's view index files.
 view_index_dir = %localstatelibdir%
+
+; Specified location of Erlang's binary drivers.
 util_driver_dir = %couchprivlibdir%
-max_document_size = 4294967296 ; 4 GB
-os_process_timeout = 5000 ; 5 seconds. for view and external servers.
-max_dbs_open = 100
-delayed_commits = true ; set this to false to ensure an fsync before 201 Created is returned
+
+; Location of CouchDB plugins.
+plugin_dir = %locallibdir%/plugins
+
+; Location of the URI file.
+; Used to locate CouchDB active instance host:port pair.
+;
 uri_file = %localstaterundir%/couch.uri
-; Method used to compress everything that is appended to database and view index files, except
-; for attachments (see the attachments section). Available methods are:
+
+; CouchDB instance UUID. Sets automatically on first start.
+uuid =
+
+; This option places an upper bound on the number of databases that can be open
+; at one time. CouchDB reference counts database accesses internally and will
+; close idle databases when it must.
+; Sometimes it is necessary to keep more than the default open at once, such as
+; in deployments where many databases will be continuously replicating.
+;
+max_dbs_open = 100
+
+; Defines limit of size in bytes that document may has in JSON form.
+; Doesn’t applies for attachments since they are been transferred as stream of
+; chunks.
+;
+max_document_size = 4294967296 ; 4 GB
+
+; Number of milliseconds that external processes such as query servers and
+; externals may process CouchDB commands before return any result.
+; Keeping this value smaller you’ll be ensured that your services works fast,
+; but you may tweak it depending on your needs.
+;
+os_process_timeout = 5000 ; 5 seconds
+
+; When this config value as false the CouchDB provides guaranty of fsync call
+; before return HTTP 201 Created response on each document saving.
+; Setting this option as `true` may raise some overall performance with cost of
+; losing durability - it’s strongly not recommended to do such in production.
+;
+delayed_commits = true
+
+; Method used to compress everything that is appended to database and view index
+; files, except for attachments (see the attachments section).
+; Available methods are:
+;
+; * none        - no compression
+; * snappy      - use google snappy, a very fast compressor/decompressor
+; * deflate_[N] - use zlib's deflate, N is the compression level which ranges
+;                 from 1 (fastest, lowest compression ratio) to 9 (slowest,
+;                 highest compression ratio)
 ;
-; none         - no compression
-; snappy       - use google snappy, a very fast compressor/decompressor
-; deflate_[N]  - use zlib's deflate, N is the compression level which ranges from 1 (fastest,
-;                lowest compression ratio) to 9 (slowest, highest compression ratio)
 file_compression = snappy
+
 ; Higher values may give better read performance due to less read operations
 ; and/or more OS page cache hits, but they can also increase overall response
 ; time for writes when there are many attachment write requests in parallel.
+;
 attachment_stream_buffer_size = 4096
 
-plugin_dir = %locallibdir%/plugins
 
-[database_compaction]
-; larger buffer sizes can originate smaller files
-doc_buffer_size = 524288 ; value in bytes
-checkpoint_after = 5242880 ; checkpoint after every N bytes were written
+[attachments]
+; Defines zlib compression level for the attachments from 1 (lowest, fastest)
+; to 9 (highest, slowest). 0 value disables compression.
+;
+compression_level = 8
+
+; List of attachments MIME types that are allowed to be compressed.
+compressible_types = text/*, application/javascript, application/json, application/xml
+
+
+[uuids]
+; Known algorithms:
+;
+;  * random     - 128 bits of random awesome. All awesome, all the time.
+;  * sequential - Monotonically increasing ids with random increments.
+;                 First 26 hex characters are random. Last 6 increment in
+;                 random amounts until an overflow occurs. On overflow, the
+;                 random prefix is regenerated and the process starts over.
+;  * utc_random - Time since Jan 1, 1970 UTC with microseconds.
+;                 First 14 characters are the time in hex. Last 18 are random.
+;  * utc_id     - Time since Jan 1, 1970 UTC with microseconds,
+;                 plus utc_id_suffix string.
+;                 First 14 characters are the time in hex,
+;                 uuids/utc_id_suffix string value is appended to these.
+;
+algorithm = sequential
+
+; The utc_id_suffix value will be appended to uuids generated by the utc_id
+; algorithm. Replicating instances should have unique utc_id_suffix values
+; to ensure uniqueness of utc_id ids.
+;
+utc_id_suffix =
 
-[view_compaction]
-; larger buffer sizes can originate smaller files
-keyvalue_buffer_size = 2097152 ; value in bytes
+
+;-------------------------------------------------------------------------------
+; HTTP Server
+;-------------------------------------------------------------------------------
 
 [httpd]
-port = 5984
+
+; Defines the IP address by which CouchDB will be accessible.
+; To let CouchDB listen any available IP address, just setup 0.0.0.0 value:
+;bind_address = 0.0.0.0
+; For IPv6 support you need to set ::1 if you want to let CouchDB listen local
+; IP address:
+;bind_address = ::1
+; or :: for any available:
+;bind_address = ::
+;
 bind_address = 127.0.0.1
-authentication_handlers = {couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}
-default_handler = {couch_httpd_db, handle_request}
-secure_rewrites = true
-vhost_global_handlers = _utils, _uuids, _session, _oauth, _users
-allow_jsonp = false
+
+; Defined the port number to listen. To let CouchDB handle any free port, set
+; this option to 0:
+;port = 0
+; The assigned port for CouchDB could be located in the URI file.
+;
+port = 5984
+
 ; Options for the MochiWeb HTTP server.
 ;server_options = [{backlog, 128}, {acceptor_pool_size, 16}]
+
 ; For more socket options, consult Erlang's module 'inet' man page.
 ;socket_options = [{recbuf, 262144}, {sndbuf, 262144}, {nodelay, true}]
-log_max_chunk_size = 1000000
+
+; List of used authentication handlers that used by CouchDB. You may extend
+; them via third-party plugins or remove some of them if you won’t let users
+; to use one of provided methods.
+;
+; Available handlers:
+;
+;    {couch_httpd_oauth, oauth_authentication_handler}: handles OAuth;
+;    {couch_httpd_auth, cookie_authentication_handler}: used for Cookie auth;
+;    {couch_httpd_auth, proxy_authentication_handler}: used for Proxy auth;
+;    {couch_httpd_auth, default_authentication_handler}: used for Basic auth;
+;    {couch_httpd_auth, null_authentication_handler}: Everlasting Admin Party!
+;
+authentication_handlers = {couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}
+
+; Sets the configuration modification whitelist. Only whitelisted values may be
+; changed via the config's HTTP API. To allow the admin to change this list over
+; HTTP, remember to include {httpd,config_whitelist} itself to the whitelist.
+; Excluding it from the list would require editing config file for updates.
+; For example:
+;config_whitelist = [{httpd,config_whitelist}, {log,level}]
+;
+config_whitelist =
+
+; Controls JSONP feature support.
+allow_jsonp = false
+
+; Controls CORS feature support.
 enable_cors = false
 
+; Isolates databases via subdomains for rewrites.
+secure_rewrites = true
+
+; Specifies default HTTP requests handler.
+default_handler = {couch_httpd_db, handle_request}
+
+; List of global handlers that are available for virtual hosts.
+vhost_global_handlers = _utils, _uuids, _session, _oauth, _users
+
+; Specifies default timeout value for Changes Feed in milliseconds.
+changes_feed = 60000 ; 60 seconds
+
+; Defines maximum chunk size in bytes for _log resource.
+log_max_chunk_size = 1000000
+
+; The x_forwarded_host header (X-Forwarded-Host by default) is used to forward
+; the original value of the Host header field in case, for example, if a reverse
+; proxy is rewriting the “Host” header field to some internal host name before
+; forward the request to CouchDB.
+;
+x_forwarded_host = X-Forwarded-Host
+
+; The x_forwarded_proto header is used for identifying the originating
+; protocol of an HTTP request, since a reverse proxy may communicate
+; with CouchDB instance using HTTP even if the request to the reverse proxy is
+; HTTPS.
+;
+x_forwarded_proto = X-Forwarded-Proto
+
+; The x_forwarded_ssl header tells CouchDB that it should use the https scheme
+; instead of the http. Actually, it’s a synonym for "X-Forwarded-Proto: https"
+; header, but used by some reverse proxies.
+;
+x_forwarded_ssl = X-Forwarded-Ssl
+
+; Set this option to trigger basic-auth popup on unauthorized requests.
+; Commonly used with require_valid_user option from [couch_httpd_auth] section.
+; If you don't configure a WWW-Authenticate header, CouchDB will send
+; Basic realm="server" in order to prevent you getting logged out.
+;
+;WWW-Authenticate = Basic realm="Welcome to the CouchDB!"
+
+
+;-------------------------------------------------------------------------------
+; SSL Support
+;-------------------------------------------------------------------------------
+; To activate SSL support, enable HTTPS daemon first:
+;
+;   [daemons]
+;   httpsd = {couch_httpd, start_link, [https]}
+;
 [ssl]
+
+; Port number for HTTPS connections.
 port = 6984
 
-[log]
-file = %localstatelogdir%/couch.log
-level = info
-include_sasl = true
+; Path to file containing PEM encoded CA certificates (trusted
+; certificates used for verifying a peer certificate). May be omitted if
+; you do not want to verify the peer.
+;
+;cacert_file = /etc/ssl/certs
+
+; Path to a file containing the user’s certificate.
+;cert_file = /etc/couchdb/server.pem
+
+; Path to file containing user’s private PEM encoded key.
+;key_file = /etc/couchdb/server_key.pem
+
+; Certificate's password in plain text. Only used if the private keyfile is
+; password protected. Make sure that only trusted users may read config file.
+;
+;password = somepassword
+
+; Maximum peer certificate depth (must be set even if certificate
+; validation is off).
+;
+ssl_certificate_max_depth = 1
+
+; Set to true to validate peer certificates.
+verify_ssl_certificates = false
+
+; The verification fun (optional) if not specified, the default
+; verification fun will be used. The function definition should be written in
+; the next format:
+;verify_fun = {Module, VerifyFun}
+
+
+;-------------------------------------------------------------------------------
+; Authentication and Authorization
+;-------------------------------------------------------------------------------
 
 [couch_httpd_auth]
+; Makes cookies persistent if true.
+allow_persistent_cookies = false
+
+; Number of user context object's to cache in memory to reduce disk lookups.
+auth_cache_size = 50
+
+; Specifies name of the system database for storing CouchDB users.
 authentication_db = _users
+
+; Specifies location for redirection on successful authentication
+; if text/html response accepted by client (via Accept header).
+;
 authentication_redirect = /_utils/session.html
+
+; Number of iterations for password hashing by PBKDF2 algorithm.
+; Higher number provides better hash durability, but with cost of performance
+; on each request that requires authentication.
+;
+iterations = 10
+
+; When this option true the secret is required for Proxy Auth.
+proxy_use_secret = false
+
+; Allows all users browse /_all_docs resource of authentication database and
+; activates public_fields feature.
+;
+users_db_public = false
+
+; Comma-separated list of field names that will be available to view for
+; any user document in authentication_db. If unset or not specified,
+; authenticated users may retrieve only their own docs.
+; You need set users_db_public=true to enable this feature.
+;
+public_fields =
+
+; When this option true no requests allowed from anonymous users -
+; everyone should be authenticated. If you set this to true, you would like also
+; to set the WWW-Authenticate option in [httpd] section.
+;
 require_valid_user = false
-timeout = 600 ; number of seconds before automatic logout
-auth_cache_size = 50 ; size is number of cache entries
-allow_persistent_cookies = false ; set to true to allow persistent cookies
-iterations = 10 ; iterations for password hashing
-; comma-separated list of public fields, 404 if empty
-; public_fields =
 
-[cors]
-credentials = false
-; List of origins separated by a comma, * means accept all
-; Origins must include the scheme: http://example.com
-; You can’t set origins: * and credentials = true at the same time.
-;origins = *
-; List of accepted headers separated by a comma
-; headers =
-; List of accepted methods
-; methods =
+; Authentication secret. Sets automatically on first auth if was unset.
+secret =
 
+; Number of seconds since the last request before session will be expired.
+timeout = 600
+
+; Specifies HTTP header name for Proxy Auth that contains the list of user’s
+; roles separated by a comma.
+;
+x_auth_roles = X-Auth-CouchDB-Roles
+
+; Specifies HTTP header name for Proxy Auth with token to authenticate
+; the authorization. This token is an HMAC-SHA1 created from secret key and
+; username. The secret key should be the same in the client and CouchDB node.
+; This token is optional if value of proxy_use_secret option isn’t true.
+;
+x_auth_roles = X-Auth-CouchDB-Token
+
+; Specifies HTTP header name for Proxy Auth containing the username.
+x_auth_username = X-Auth-CouchDB-UserName
 
-; Configuration for a vhost
-;[cors:http://example.com]
-; credentials = false
-; List of origins separated by a comma
-; Origins must include the scheme: http://example.com
-; You can’t set origins: * and credentials = true at the same time.
-;origins =
-; List of accepted headers separated by a comma
-; headers =
-; List of accepted methods
-; methods =
 
 [couch_httpd_oauth]
 ; If set to 'true', oauth token and consumer secrets will be looked up
@@ -118,159 +368,70 @@ credentials = false
 ;             }
 ;         }
 ;     }
+;
 use_users_db = false
 
-[query_servers]
-javascript = %bindir%/%couchjs_command_name% %localbuilddatadir%/server/main.js
-coffeescript = %bindir%/%couchjs_command_name% %localbuilddatadir%/server/main-coffee.js
-
 
-; Changing reduce_limit to false will disable reduce_limit.
-; If you think you're hitting reduce_limit with a "good" reduce function,
-; please let us know on the mailing list so we can fine tune the heuristic.
-[query_server_config]
-reduce_limit = true
-os_process_limit = 25
+;-------------------------------------------------------------------------------
+; Logging
+;-------------------------------------------------------------------------------
 
-[daemons]
-index_server={couch_index_server, start_link, []}
-external_manager={couch_external_manager, start_link, []}
-query_servers={couch_query_servers, start_link, []}
-vhosts={couch_httpd_vhost, start_link, []}
-httpd={couch_httpd, start_link, []}
-stats_aggregator={couch_stats_aggregator, start, []}
-stats_collector={couch_stats_collector, start, []}
-uuids={couch_uuids, start, []}
-auth_cache={couch_auth_cache, start_link, []}
-replicator_manager={couch_replicator_manager, start_link, []}
-os_daemons={couch_os_daemons, start_link, []}
-compaction_daemon={couch_compaction_daemon, start_link, []}
-
-[httpd_global_handlers]
-/ = {couch_httpd_misc_handlers, handle_welcome_req, <<"Welcome">>}
-favicon.ico = {couch_httpd_misc_handlers, handle_favicon_req, "%localdatadir%/www"}
-
-_utils = {couch_httpd_misc_handlers, handle_utils_dir_req, "%localdatadir%/www"}
-_all_dbs = {couch_httpd_misc_handlers, handle_all_dbs_req}
-_active_tasks = {couch_httpd_misc_handlers, handle_task_status_req}
-_config = {couch_httpd_misc_handlers, handle_config_req}
-_replicate = {couch_replicator_httpd, handle_req}
-_uuids = {couch_httpd_misc_handlers, handle_uuids_req}
-_restart = {couch_httpd_misc_handlers, handle_restart_req}
-_stats = {couch_httpd_stats_handlers, handle_stats_req}
-_log = {couch_httpd_misc_handlers, handle_log_req}
-_session = {couch_httpd_auth, handle_session_req}
-_oauth = {couch_httpd_oauth, handle_oauth_req}
-_db_updates = {couch_dbupdates_httpd, handle_req}
-_plugins = {couch_plugins_httpd, handle_req}
-
-[httpd_db_handlers]
-_all_docs = {couch_mrview_http, handle_all_docs_req}
-_changes = {couch_httpd_db, handle_changes_req}
-_compact = {couch_httpd_db, handle_compact_req}
-_design = {couch_httpd_db, handle_design_req}
-_temp_view = {couch_mrview_http, handle_temp_view_req}
-_view_cleanup = {couch_mrview_http, handle_cleanup_req}
-
-; The external module takes an optional argument allowing you to narrow it to a
-; single script. Otherwise the script name is inferred from the first path section
-; after _external's own path.
-; _mypath = {couch_httpd_external, handle_external_req, <<"mykey">>}
-; _external = {couch_httpd_external, handle_external_req}
+[log]
+; Specifies the location of file for logging output.
+file = %localstatelogdir%/couch.log
 
-[httpd_design_handlers]
-_compact = {couch_mrview_http, handle_compact_req}
-_info = {couch_mrview_http, handle_info_req}
-_list = {couch_mrview_show, handle_view_list_req}
-_rewrite = {couch_httpd_rewrite, handle_rewrite_req}
-_show = {couch_mrview_show, handle_doc_show_req}
-_update = {couch_mrview_show, handle_doc_update_req}
-_view = {couch_mrview_http, handle_view_req}
+; Logging level defines how verbose and detailed logging will be
+; Available levels:
+;
+;  * debug: Very informative and detailed debug logging. Includes HTTP headers,
+;           external processes communications, auth information and more;
+;  * info: Informative logging. Includes HTTP requests headlines,
+;          startup notifications of external processes etc.
+;  * warning: Warning messages are alerts about edge situations which may lead
+;             to errors. For instance, compaction daemon alerts about low or
+;             insufficient disk space at this level.
+;  * error: Error level includes only things that going wrong, crush reports
+;           and HTTP error responses (5xx codes).
+;  * none: Disables logging for any messages.
+;
+level = info
 
-; enable external as an httpd handler, then link it with commands here.
-; note, this api is still under consideration.
-; [external]
-; mykey = /path/to/mycommand
+; Includes SASL information in logs.
+include_sasl = true
 
-; Here you can setup commands for CouchDB to manage
-; while it is alive. It will attempt to keep each command
-; alive if it exits.
-; [os_daemons]
-; some_daemon_name = /path/to/script -with args
+[log_level_by_module]
+; In this section you can specify  log level on a per-module basis.
+; See src/*/*.erl for various available modules. For example:
+;couch_httpd = debug
+;couch_replicator = info
+;couch_query_servers = error
 
 
-[uuids]
-; Known algorithms:
-;   random - 128 bits of random awesome
-;     All awesome, all the time.
-;   sequential - monotonically increasing ids with random increments
-;     First 26 hex characters are random. Last 6 increment in
-;     random amounts until an overflow occurs. On overflow, the
-;     random prefix is regenerated and the process starts over.
-;   utc_random - Time since Jan 1, 1970 UTC with microseconds
-;     First 14 characters are the time in hex. Last 18 are random.
-;   utc_id - Time since Jan 1, 1970 UTC with microseconds, plus utc_id_suffix string
-;     First 14 characters are the time in hex. uuids/utc_id_suffix string value is appended to these.
-algorithm = sequential
-; The utc_id_suffix value will be appended to uuids generated by the utc_id algorithm.
-; Replicating instances should have unique utc_id_suffix values to ensure uniqueness of utc_id ids.
-utc_id_suffix =
+;-------------------------------------------------------------------------------
+; Compaction
+;-------------------------------------------------------------------------------
 
-[stats]
-; rate is in milliseconds
-rate = 1000
-; sample intervals are in seconds
-samples = [0, 60, 300, 900]
+[database_compaction]
+; Larger buffer sizes (in bytes) can originate smaller files.
+doc_buffer_size = 524288
 
-[attachments]
-compression_level = 8 ; from 1 (lowest, fastest) to 9 (highest, slowest), 0 to disable compression
-compressible_types = text/*, application/javascript, application/json, application/xml
+; Checkpoint after every N bytes were written.
+checkpoint_after = 5242880
 
-[replicator]
-db = _replicator
-; Maximum replicaton retry count can be a non-negative integer or "infinity".
-max_replication_retry_count = 10
-; More worker processes can give higher network throughput but can also
-; imply more disk and network IO.
-worker_processes = 4
-; With lower batch sizes checkpoints are done more frequently. Lower batch sizes
-; also reduce the total amount of used RAM memory.
-worker_batch_size = 500
-; Maximum number of HTTP connections per replication.
-http_connections = 20
-; HTTP connection timeout per replication.
-; Even for very fast/reliable networks it might need to be increased if a remote
-; database is too busy.
-connection_timeout = 30000
-; If a request fails, the replicator will retry it up to N times.
-retries_per_request = 10
-; Some socket options that might boost performance in some scenarios:
-;       {nodelay, boolean()}
-;       {sndbuf, integer()}
-;       {recbuf, integer()}
-;       {priority, integer()}
-; See the `inet` Erlang module's man page for the full list of options.
-socket_options = [{keepalive, true}, {nodelay, false}]
-; Path to a file containing the user's certificate.
-;cert_file = /full/path/to/server_cert.pem
-; Path to file containing user's private PEM encoded key.
-;key_file = /full/path/to/server_key.pem
-; String containing the user's password. Only used if the private keyfile is password protected.
-;password = somepassword
-; Set to true to validate peer certificates.
-verify_ssl_certificates = false
-; File containing a list of peer trusted certificates (in the PEM format).
-;ssl_trusted_certificates_file = /etc/ssl/certs/ca-certificates.crt
-; Maximum peer certificate depth (must be set even if certificate validation is off).
-ssl_certificate_max_depth = 3
+[view_compaction]
+; Larger buffer sizes (in bytes) can originate smaller files.
+keyvalue_buffer_size = 2097152
 
 [compaction_daemon]
-; The delay, in seconds, between each check for which database and view indexes
+; The delay in seconds between checks for database and view indexes
 ; need to be compacted.
+;
 check_interval = 300
+
 ; If a database or view index file is smaller then this value (in bytes),
 ; compaction will not happen. Very small files always have a very high
 ; fragmentation therefore it's not worth to compact them.
+;
 min_file_size = 131072
 
 [compactions]
@@ -284,44 +445,44 @@ min_file_size = 131072
 ;
 ; Possible parameters:
 ;
-; * db_fragmentation - If the ratio (as an integer percentage), of the amount
-;                      of old data (and its supporting metadata) over the database
-;                      file size is equal to or greater then this value, this
-;                      database compaction condition is satisfied.
-;                      This value is computed as:
+; * db_fragmentation
+; If the ratio (as an integer percentage), of the amount of old data
+; (and its supporting metadata) is over the database file size is equal to
+; or greater then this value, this database compaction condition is satisfied.
+; This value is computed as:
 ;
-;                           (file_size - data_size) / file_size * 100
+;   (file_size - data_size) / file_size * 100
 ;
-;                      The data_size and file_size values can be obtained when
-;                      querying a database's information URI (GET /dbname/).
+; The data_size and file_size values can be obtained when querying a database's
+; information URI (GET /dbname/).
 ;
-; * view_fragmentation - If the ratio (as an integer percentage), of the amount
-;                        of old data (and its supporting metadata) over the view
-;                        index (view group) file size is equal to or greater then
-;                        this value, then this view index compaction condition is
-;                        satisfied. This value is computed as:
+; * view_fragmentation
+; If the ratio (as an integer percentage), of the amount of old data
+; (and its supporting metadata) over the view index (view group) file size
+; is equal to or greater then this value, then this view index compaction
+; condition is satisfied. This value is computed as:
 ;
-;                            (file_size - data_size) / file_size * 100
+;   (file_size - data_size) / file_size * 100
 ;
-;                        The data_size and file_size values can be obtained when
-;                        querying a view group's information URI
-;                        (GET /dbname/_design/groupname/_info).
+; The data_size and file_size values can be obtained when querying
+; a view group's information URI (GET /dbname/_design/groupname/_info).
 ;
-; * from _and_ to - The period for which a database (and its view groups) compaction
-;                   is allowed. The value for these parameters must obey the format:
+; * from _and_ to
+; The period for which a database (and its view groups) compaction is allowed.
+; The value for these parameters must obey the format:
 ;
-;                   HH:MM - HH:MM  (HH in [0..23], MM in [0..59])
+;   HH:MM - HH:MM  (HH in [0..23], MM in [0..59])
 ;
-; * strict_window - If a compaction is still running after the end of the allowed
-;                   period, it will be canceled if this parameter is set to 'true'.
-;                   It defaults to 'false' and it's meaningful only if the *period*
-;                   parameter is also specified.
+; * strict_window
+; If a compaction is still running after the end of the allowed period,
+; it will be canceled if this parameter is set to 'true'.
+; It defaults to 'false' and it's meaningful only if the *period* parameter
+; is also specified.
 ;
-; * parallel_view_compaction - If set to 'true', the database and its views are
-;                              compacted in parallel. This is only useful on
-;                              certain setups, like for example when the database
-;                              and view index directories point to different
-;                              disks. It defaults to 'false'.
+; * parallel_view_compaction
+; If set to 'true', the database and its views are compacted in parallel.
+; This is only useful on certain setups, like for example when the database
+; and view index directories point to different disks. It defaults to 'false'.
 ;
 ; Before a compaction is triggered, an estimation of how much free disk space is
 ; needed is computed. This estimation corresponds to 2 times the data size of
@@ -349,5 +510,295 @@ min_file_size = 131072
 ;    Similar to the preceding example, but a database and its views can be
 ;    compacted in parallel.
 ;
+; Example of the default compaction configuration:
+;
 ;_default = [{db_fragmentation, "70%"}, {view_fragmentation, "60%"}, {from, "23:00"}, {to, "04:00"}]
 
+
+;-------------------------------------------------------------------------------
+; Replicator
+;-------------------------------------------------------------------------------
+
+[replicator]
+
+; Replicator database name.
+db = _replicator
+
+; HTTP connection timeout per replication.
+; Even for very fast/reliable networks it might need to be increased if a remote
+; database is too busy.
+;
+connection_timeout = 30000
+
+; Defines replication checkpoint interval in milliseconds.
+checkpoint_interval = 5000
+
+; Maximum number of HTTP connections per replication.
+http_connections = 20
+
+; Maximum replication retry count can be a non-negative integer or "infinity".
+max_replication_retry_count = 10
+
+; If a request fails, the replicator will retry it up to N times.
+retries_per_request = 10
+
+; Some socket options that might boost performance in some scenarios:
+;  - {nodelay, boolean()}
+;  - {sndbuf, integer()}
+;  - {recbuf, integer()}
+;  - {priority, integer()}
+; See the `inet` Erlang module's man page for the full list of options.
+;
+socket_options = [{keepalive, true}, {nodelay, false}]
+
+; If enabled, CouchDB will make checkpoints during replication and at the
+; completion of replication to efficiently resume it from any of these.
+; This is not the option that you'd like to disable!
+;
+use_checkpoints = true
+
+; With lower batch sizes checkpoints are done more frequently. Lower batch sizes
+; also reduce the total amount of used RAM memory.
+;
+worker_batch_size = 500
+
+; More worker processes can give higher network throughput but can also
+; imply more disk and network IO.
+;
+worker_processes = 4
+
+;;; Replicators SSL options
+
+; Path to a file containing the user's certificate.
+;cert_file = /full/path/to/server_cert.pem
+
+; Path to file containing user's private PEM encoded key.
+;key_file = /full/path/to/server_key.pem
+
+; String containing the user's password. Only used if the private keyfile
+; is password protected.
+;
+;password = somepassword
+
+; Maximum peer certificate depth.
+; Must be set even if certificate validation is off.
+;
+ssl_certificate_max_depth = 3
+
+; File containing a list of peer trusted certificates (in the PEM format).
+;ssl_trusted_certificates_file = /etc/ssl/certs/ca-certificates.crt
+
+; Set to true to validate peer certificates.
+verify_ssl_certificates = false
+
+
+;-------------------------------------------------------------------------------
+; Query Servers
+;-------------------------------------------------------------------------------
+
+[query_servers]
+javascript = %bindir%/%couchjs_command_name% %localbuilddatadir%/server/main.js
+coffeescript = %bindir%/%couchjs_command_name% %localbuilddatadir%/server/main-coffee.js
+
+; Experimental Node.JS query server
+; nodejs = %bindir%/couchjs-node %localbuilddatadir%/server/main.js
+
+
+[query_server_config]
+; The  delay in seconds before commit view index changes on disk.
+commit_freq = 5
+
+; Amount of processes that may be spawned for single query server's group.
+os_process_limit = 25
+
+; Changing reduce_limit to false will disable reduce_limit.
+; If you think you're hitting reduce_limit with a "good" reduce function,
+; please let us know on the mailing list so we can fine tune the heuristic.
+;
+reduce_limit = true
+
+
+[native_query_servers]
+;; WARNING! Unlike the JavaScript query server, the Erlang one does not runs
+; in a sandbox mode. This means that Erlang code has full access to your OS,
+; filesystem and network, which may lead to security issues.
+; Enable this on your own risk.
+;
+;erlang = {couch_native_process, start_link, []}
+
+
+;-------------------------------------------------------------------------------
+; CORS Support
+;-------------------------------------------------------------------------------
+; This section requires httpd/enable_cors option have true value:
+;
+;  [httpd]
+;  enable_cors = true
+;
+
+;;; Global CORS settings
+[cors]
+; By default, neither authentication headers nor cookies are included in
+; requests and responses. To do so requires both setting
+; XmlHttpRequest.withCredentials = true on the request object in the browser
+; and enabling credentials support in CouchDB.
+;
+;credentials = false
+
+; List of origins separated by a comma, * means accept all.
+; Origins must include the scheme: http://example.com
+; You can’t set origins: * and credentials = true at the same time.
+;
+;origins = *
+
+; List of accepted headers separated by a comma.
+; headers =
+
+; List of accepted methods.
+; methods =
+
+;;; Configuration for a vhost
+;
+;[cors:http://example.com]
+; credentials = false
+; List of origins separated by a comma
+; Origins must include the scheme: http://example.com
+; You can’t set origins: * and credentials = true at the same time.
+;origins =
+; List of accepted headers separated by a comma
+; headers =
+; List of accepted methods
+; methods =
+
+
+;-------------------------------------------------------------------------------
+; Virtual Hosts
+;-------------------------------------------------------------------------------
+; To enable Virtual Hosts in CouchDB, add a vhost = path directive.
+; All requests to the Virual Host will be redirected to the path.
+; In the example below all requests to http://example.com/ are redirected
+; to /database.
+; If you run CouchDB on a specific port, include the port number in the vhost:
+; example.com:5984 = /database
+;
+[vhosts]
+;example.com = /database/
+
+
+;-------------------------------------------------------------------------------
+; Externals
+;-------------------------------------------------------------------------------
+
+[external]
+; Enable external as an httpd handler, then link it with commands here.
+; See [httpd_db_handlers] section for HTTP handler definition.
+;
+;mykey = /path/to/mycommand
+
+[os_daemons]
+; For any commands listed here, CouchDB will attempt to ensure that
+; the process remains alive. Daemons should monitor their environment
+; to know when to exit. This can most easily be accomplished by exiting
+; when stdin is closed.
+;
+;foo = /path/to/command -with args
+
+[update_notification]
+;unique notifier name=/full/path/to/exe -with "cmd line arg"
+
+
+;-------------------------------------------------------------------------------
+; HTTP Resource Handlers
+;-------------------------------------------------------------------------------
+
+[httpd_global_handlers]
+/ = {couch_httpd_misc_handlers, handle_welcome_req, <<"Welcome">>}
+favicon.ico = {couch_httpd_misc_handlers, handle_favicon_req, "%localdatadir%/www"}
+
+_utils = {couch_httpd_misc_handlers, handle_utils_dir_req, "%localdatadir%/www"}
+_all_dbs = {couch_httpd_misc_handlers, handle_all_dbs_req}
+_active_tasks = {couch_httpd_misc_handlers, handle_task_status_req}
+_config = {couch_httpd_misc_handlers, handle_config_req}
+_db_updates = {couch_dbupdates_httpd, handle_req}
+_log = {couch_httpd_misc_handlers, handle_log_req}
+_oauth = {couch_httpd_oauth, handle_oauth_req}
+_plugins = {couch_plugins_httpd, handle_req}
+_replicate = {couch_replicator_httpd, handle_req}
+_restart = {couch_httpd_misc_handlers, handle_restart_req}
+_session = {couch_httpd_auth, handle_session_req}
+_stats = {couch_httpd_stats_handlers, handle_stats_req}
+_uuids = {couch_httpd_misc_handlers, handle_uuids_req}
+
+;;; HTTP Proxy handler
+; Proxies HTTP requests to the specified location
+; Example: GET /_spec/rfc2616 -> http://tools.ietf.org/html/rfc2616
+;_spec = {couch_httpd_proxy, handle_proxy_req, <<"http://tools.ietf.org/html">>}
+
+
+[httpd_db_handlers]
+_all_docs = {couch_mrview_http, handle_all_docs_req}
+_changes = {couch_httpd_db, handle_changes_req}
+_compact = {couch_httpd_db, handle_compact_req}
+_design = {couch_httpd_db, handle_design_req}
+_temp_view = {couch_mrview_http, handle_temp_view_req}
+_view_cleanup = {couch_mrview_http, handle_cleanup_req}
+
+;;; HTTP External handler
+; The external module takes an optional argument allowing you to narrow it to a
+; single script. Otherwise the script name is inferred from the first path section
+; after _external's own path.
+; For "mykey" definition see [external] section.
+;
+;_mypath = {couch_httpd_external, handle_external_req, <<"mykey">>}
+;_external = {couch_httpd_external, handle_external_req}
+
+
+[httpd_design_handlers]
+_compact = {couch_mrview_http, handle_compact_req}
+_info = {couch_mrview_http, handle_info_req}
+_list = {couch_mrview_show, handle_view_list_req}
+_rewrite = {couch_httpd_rewrite, handle_rewrite_req}
+_show = {couch_mrview_show, handle_doc_show_req}
+_update = {couch_mrview_show, handle_doc_update_req}
+_view = {couch_mrview_http, handle_view_req}
+
+
+;-------------------------------------------------------------------------------
+; Internal Services
+;-------------------------------------------------------------------------------
+[daemons]
+auth_cache={couch_auth_cache, start_link, []}
+compaction_daemon={couch_compaction_daemon, start_link, []}
+external_manager={couch_external_manager, start_link, []}
+httpd={couch_httpd, start_link, []}
+index_server={couch_index_server, start_link, []}
+os_daemons={couch_os_daemons, start_link, []}
+query_servers={couch_query_servers, start_link, []}
+replicator_manager={couch_replicator_manager, start_link, []}
+stats_aggregator={couch_stats_aggregator, start, []}
+stats_collector={couch_stats_collector, start, []}
+uuids={couch_uuids, start, []}
+vhosts={couch_httpd_vhost, start_link, []}
+
+; Uncomment to enable HTTPS support. See [ssl] section for config options.
+;httpsd = {couch_httpd, start_link, [https]}
+
+
+;-------------------------------------------------------------------------------
+; Misc
+;-------------------------------------------------------------------------------
+
+[stats]
+; Rate of statistics gathering in milliseconds.
+rate = 1000
+
+; Samples are used tracks the mean and standard value deviation within specified
+; intervals (in seconds).
+;
+samples = [0, 60, 300, 900]
+
+; For CouchDB distributors there is option to explicitly define this information
+; in welcome message
+[vendor]
+name = %package_author_name%
+version = %version%

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1c344a96/etc/couchdb/local.ini
----------------------------------------------------------------------
diff --git a/etc/couchdb/local.ini b/etc/couchdb/local.ini
deleted file mode 100644
index 8aae331..0000000
--- a/etc/couchdb/local.ini
+++ /dev/null
@@ -1,97 +0,0 @@
-; CouchDB Configuration Settings
-
-; Custom settings should be made in this file. They will override settings
-; in default.ini, but unlike changes made to default.ini, this file won't be
-; overwritten on server upgrade.
-
-[couchdb]
-;max_document_size = 4294967296 ; bytes
-
-[httpd]
-;port = 5984
-;bind_address = 127.0.0.1
-; Options for the MochiWeb HTTP server.
-;server_options = [{backlog, 128}, {acceptor_pool_size, 16}]
-; For more socket options, consult Erlang's module 'inet' man page.
-;socket_options = [{recbuf, 262144}, {sndbuf, 262144}, {nodelay, true}]
-
-; Uncomment next line to trigger basic-auth popup on unauthorized requests.
-;WWW-Authenticate = Basic realm="administrator"
-
-; Uncomment next line to set the configuration modification whitelist. Only
-; whitelisted values may be changed via the /_config URLs. To allow the admin
-; to change this value over HTTP, remember to include {httpd,config_whitelist}
-; itself. Excluding it from the list would require editing this file to update
-; the whitelist.
-;config_whitelist = [{httpd,config_whitelist}, {log,level}, {etc,etc}]
-
-[query_servers]
-;nodejs = /usr/local/bin/couchjs-node /path/to/couchdb/share/server/main.js
-
-
-[httpd_global_handlers]
-;_google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com">>}
-
-[couch_httpd_auth]
-; If you set this to true, you should also uncomment the WWW-Authenticate line
-; above. If you don't configure a WWW-Authenticate header, CouchDB will send
-; Basic realm="server" in order to prevent you getting logged out.
-; require_valid_user = false
-
-[log]
-;level = debug
-
-[log_level_by_module]
-; In this section you can specify any of the four log levels 'none', 'info',
-; 'error' or 'debug' on a per-module basis. See src/*/*.erl for various
-; modules.
-;couch_httpd = error
-
-
-[os_daemons]
-; For any commands listed here, CouchDB will attempt to ensure that
-; the process remains alive. Daemons should monitor their environment
-; to know when to exit. This can most easily be accomplished by exiting
-; when stdin is closed.
-;foo = /path/to/command -with args
-
-[daemons]
-; enable SSL support by uncommenting the following line and supply the PEM's below.
-; the default ssl port CouchDB listens on is 6984
-; httpsd = {couch_httpd, start_link, [https]}
-
-[ssl]
-;cert_file = /full/path/to/server_cert.pem
-;key_file = /full/path/to/server_key.pem
-;password = somepassword
-; set to true to validate peer certificates
-verify_ssl_certificates = false
-; Path to file containing PEM encoded CA certificates (trusted
-; certificates used for verifying a peer certificate). May be omitted if
-; you do not want to verify the peer.
-;cacert_file = /full/path/to/cacertf
-; The verification fun (optional) if not specified, the default
-; verification fun will be used.
-;verify_fun = {Module, VerifyFun}
-; maximum peer certificate depth
-ssl_certificate_max_depth = 1
-
-; To enable Virtual Hosts in CouchDB, add a vhost = path directive. All requests to
-; the Virual Host will be redirected to the path. In the example below all requests
-; to http://example.com/ are redirected to /database.
-; If you run CouchDB on a specific port, include the port number in the vhost:
-; example.com:5984 = /database
-[vhosts]
-;example.com = /database/
-
-[update_notification]
-;unique notifier name=/full/path/to/exe -with "cmd line arg"
-
-; To create an admin account uncomment the '[admins]' section below and add a
-; line in the format 'username = password'. When you next start CouchDB, it
-; will change the password to a hash (so that your passwords don't linger
-; around in plain-text files). You can add more admin accounts with more
-; 'username = password' lines. Don't forget to restart CouchDB after
-; changing this.
-[admins]
-;admin = mysecretpassword


[24/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
spelling


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/06472f86
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/06472f86
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/06472f86

Branch: refs/heads/1744-single-config-file
Commit: 06472f865e50152360e91c76385b0ed7a224cb13
Parents: c2da01d
Author: Robert Newson <rn...@apache.org>
Authored: Thu Dec 5 12:34:24 2013 +0000
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Dec 5 12:34:24 2013 +0000

----------------------------------------------------------------------
 share/doc/src/config/intro.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/06472f86/share/doc/src/config/intro.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/config/intro.rst b/share/doc/src/config/intro.rst
index 3a5c828..c528f74 100644
--- a/share/doc/src/config/intro.rst
+++ b/share/doc/src/config/intro.rst
@@ -126,7 +126,7 @@ improve configuration readability.
 
 .. note::
    In case when you'd like to remove some parameter from the `default.ini`
-   without modifiying that file, you may override in `local.ini`, but
+   without modifying that file, you may override in `local.ini`, but
    without any value::
 
      [httpd_global_handlers]


[13/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Merge branch '1795-fix-pidfile-race'

Patch via Dileep Bapat
https://github.com/dileepbapat/couchdb/commit/f90476074504058c81a6e73814266a5a0724fc55.patch


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/818ef4f9
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/818ef4f9
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/818ef4f9

Branch: refs/heads/1744-single-config-file
Commit: 818ef4f9a263a6d9b8555521478327bc69fc9e2e
Parents: 862d8ae f75b8ab
Author: Dave Cottlehuber <dc...@apache.org>
Authored: Tue Dec 3 20:43:12 2013 +0100
Committer: Dave Cottlehuber <dc...@apache.org>
Committed: Tue Dec 3 20:43:12 2013 +0100

----------------------------------------------------------------------
 bin/couchdb.tpl.in | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------



[07/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Adding Robert Kowalski <ro...@kowalski.gd> to the Thanks file for helping out with Fauxton by fixing:
COUCHDB-1921


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/352e7315
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/352e7315
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/352e7315

Branch: refs/heads/1744-single-config-file
Commit: 352e7315462618bf21ac447d3ae30a8881c8bacb
Parents: 96d737f
Author: suelockwood <de...@gmail.com>
Authored: Mon Dec 2 13:31:46 2013 -0500
Committer: suelockwood <de...@gmail.com>
Committed: Mon Dec 2 13:31:46 2013 -0500

----------------------------------------------------------------------
 THANKS.in | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/352e7315/THANKS.in
----------------------------------------------------------------------
diff --git a/THANKS.in b/THANKS.in
index b87ffec..67678f6 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -93,6 +93,7 @@ suggesting improvements or submitting changes. Some of these people are:
  * Tim Blair
  * Tady Walsh <he...@tady.me>
  * Sam Rijs <re...@awesam.de>
+ * Robert Kowalski <ro...@kowalski.gd>
 # Authors from commit 6c976bd and onwards are auto-inserted. If you are merging
 # a commit from a non-committer, you should not add an entry to this file. When
 # `bootstrap` is run, the actual THANKS file will be generated.


[10/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton: hide reduce options for no reduce


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/862d8ae4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/862d8ae4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/862d8ae4

Branch: refs/heads/1744-single-config-file
Commit: 862d8ae43ff1f44e910669031945b40c6073a01a
Parents: 5825fe6
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Dec 3 16:54:12 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Dec 3 17:26:12 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js | 28 ++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/862d8ae4/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index cf939e2..1fe4cb7 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -965,10 +965,11 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       this.viewName = options.viewName;
       this.updateViewFn = options.updateViewFn;
       this.previewFn = options.previewFn;
-      this.hadReduce = options.hasReduce || true;
+      //this.hadReduce = options.hasReduce || true;
 
       if (typeof(options.hasReduce) === 'undefined') {
         this.hasReduce = true;
+        console.log('set true');
       } else {
         this.hasReduce = options.hasReduce;
       }
@@ -997,6 +998,11 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       }
     },
 
+    renderOnUpdatehasReduce: function (hasReduce) {
+      this.hasReduce = hasReduce;
+      this.render();
+    },
+
     queryParams: function () {
       var $form = this.$(".view-query-update");
       // Ignore params without a value
@@ -1216,6 +1222,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       var $reduceContainer = $(".control-group.reduce-function");
       if ($ele.val() == "CUSTOM") {
         this.createReduceEditor();
+        this.reduceEditor.setValue(this.langTemplates.javascript.reduce);
         $reduceContainer.show();
       } else {
         $reduceContainer.hide();
@@ -1286,6 +1293,11 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
             that.newView = false;
           }
 
+          if (that.reduceFunStr !== reduceVal) {
+            that.reduceFunStr = reduceVal;
+            that.advancedOptions.renderOnUpdatehasReduce(that.hasReduce()); 
+          }
+
           FauxtonAPI.triggerRouteEvent('updateAllDocs', {ddoc: ddocName, view: viewName});
 
         }, function(xhr) {
@@ -1350,8 +1362,6 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       reduceVal = this.reduceVal(),
       paramsArr = [];
 
-      console.log(mapVal);
-      
       if (paramsInfo && paramsInfo.params) {
         paramsArr = paramsInfo.params;
       }
@@ -1398,7 +1408,6 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
     },
 
     mapVal: function () {
-
       if (this.mapEditor) {
         return this.mapEditor.getValue();
       }
@@ -1419,6 +1428,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       return reduceVal;
     },
 
+
     hasValidCode: function() {
       return _.every(["mapEditor", "reduceEditor"], function(editorName) {
         var editor = this[editorName];
@@ -1456,7 +1466,6 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
         ddocName: this.model.id,
         viewName: this.viewName,
         reduceFunStr: this.reduceFunStr,
-        hasReduce: this.reduceFunStr,
         isCustomReduce: this.hasCustomReduce(),
         newView: this.newView,
         langTemplates: this.langTemplates.javascript
@@ -1467,6 +1476,10 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       return this.reduceFunStr && ! _.contains(this.builtinReduces, this.reduceFunStr);
     },
 
+    hasReduce: function () {
+      return this.reduceFunStr || false;
+    },
+
     createReduceEditor: function () {
       if (this.reduceEditor) {
         this.reduceEditor.remove();
@@ -1501,13 +1514,14 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
         ddocName: this.model.id,
         database: this.database
       }));
-
+      
       this.advancedOptions = this.insertView('#query', new Views.AdvancedOptions({
         updateViewFn: this.updateView,
         previewFn: this.previewView,
         database: this.database,
         viewName: this.viewName,
-        ddocName: this.model.id
+        ddocName: this.model.id,
+        hasReduce: this.hasReduce
       }));
     },
 


[08/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Include reason for replication failure in _replicator doc

closes COUCHDB-1647


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/08cac68b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/08cac68b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/08cac68b

Branch: refs/heads/1744-single-config-file
Commit: 08cac68b26d95b90dedadbb5d162d082226ec5ca
Parents: 352e731
Author: Robert Newson <rn...@apache.org>
Authored: Tue Dec 3 11:15:59 2013 +0000
Committer: Robert Newson <rn...@apache.org>
Committed: Tue Dec 3 13:10:49 2013 +0000

----------------------------------------------------------------------
 share/doc/src/replication/replicator.rst              |  8 ++++++--
 share/www/script/test/replicator_db_invalid_filter.js |  4 ++++
 src/couch_replicator/src/couch_replicator_manager.erl | 10 ++++++++--
 src/couchdb/couch_doc.erl                             |  3 +++
 4 files changed, 21 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/08cac68b/share/doc/src/replication/replicator.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/replication/replicator.rst b/share/doc/src/replication/replicator.rst
index b4427fa..05171db 100644
--- a/share/doc/src/replication/replicator.rst
+++ b/share/doc/src/replication/replicator.rst
@@ -86,6 +86,10 @@ Special fields set by the replicator start with the prefix
    when the current replication state (marked in ``_replication_state``)
    was set.
 
+-  ``_replication_state_reason``
+
+   If ``replication_state`` is ``error``, this field contains the reason.
+
 When the replication finishes, it will update the ``_replication_state``
 field (and ``_replication_state_time``) with the value ``completed``, so
 the document will look like:
@@ -103,8 +107,8 @@ the document will look like:
     }
 
 When an error happens during replication, the ``_replication_state``
-field is set to ``error`` (and ``_replication_state_time`` gets updated of
-course).
+field is set to ``error`` (and ``_replication_state_reason`` and
+``_replication_state_time`` are updated).
 
 When you PUT/POST a document to the ``_replicator`` database, CouchDB
 will attempt to start the replication up to 10 times (configurable under

http://git-wip-us.apache.org/repos/asf/couchdb/blob/08cac68b/share/www/script/test/replicator_db_invalid_filter.js
----------------------------------------------------------------------
diff --git a/share/www/script/test/replicator_db_invalid_filter.js b/share/www/script/test/replicator_db_invalid_filter.js
index 6438d43..7b6df82 100644
--- a/share/www/script/test/replicator_db_invalid_filter.js
+++ b/share/www/script/test/replicator_db_invalid_filter.js
@@ -41,6 +41,8 @@ couchTests.replicator_db_invalid_filter = function(debug) {
     repDoc1 = repDb.open(repDoc1._id);
     TEquals("undefined", typeof repDoc1._replication_id);
     TEquals("error", repDoc1._replication_state);
+    TEquals("Could not open source database `couch_foo_test_db`: {db_not_found,<<\"couch_foo_test_db\">>}",
+            repDoc1._replication_state_reason);
 
     populate_db(dbA, docs1);
     populate_db(dbB, []);
@@ -58,6 +60,8 @@ couchTests.replicator_db_invalid_filter = function(debug) {
     repDoc2 = repDb.open(repDoc2._id);
     TEquals("undefined", typeof repDoc2._replication_id);
     TEquals("error", repDoc2._replication_state);
+    TEquals("Couldn't open document `_design/test` from source database `test_suite_rep_db_a`: {error,<<\"not_found\">>}",
+            repDoc2._replication_state_reason);
 
     var ddoc = {
       _id: "_design/mydesign",

http://git-wip-us.apache.org/repos/asf/couchdb/blob/08cac68b/src/couch_replicator/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator/src/couch_replicator_manager.erl b/src/couch_replicator/src/couch_replicator_manager.erl
index bbb0e11..4891c4c 100644
--- a/src/couch_replicator/src/couch_replicator_manager.erl
+++ b/src/couch_replicator/src/couch_replicator_manager.erl
@@ -68,6 +68,7 @@ replication_started(#rep{id = {BaseId, _} = RepId}) ->
     #rep_state{rep = #rep{doc_id = DocId}} ->
         update_rep_doc(DocId, [
             {<<"_replication_state">>, <<"triggered">>},
+            {<<"_replication_state_reason">>, undefined},
             {<<"_replication_id">>, ?l2b(BaseId)},
             {<<"_replication_stats">>, undefined}]),
         ok = gen_server:call(?MODULE, {rep_started, RepId}, infinity),
@@ -83,6 +84,7 @@ replication_completed(#rep{id = RepId}, Stats) ->
     #rep_state{rep = #rep{doc_id = DocId}} ->
         update_rep_doc(DocId, [
             {<<"_replication_state">>, <<"completed">>},
+            {<<"_replication_state_reason">>, undefined},
             {<<"_replication_stats">>, {Stats}}]),
         ok = gen_server:call(?MODULE, {rep_complete, RepId}, infinity),
         ?LOG_INFO("Replication `~s` finished (triggered by document `~s`)",
@@ -95,9 +97,9 @@ replication_error(#rep{id = {BaseId, _} = RepId}, Error) ->
     nil ->
         ok;
     #rep_state{rep = #rep{doc_id = DocId}} ->
-        % TODO: maybe add error reason to replication document
         update_rep_doc(DocId, [
             {<<"_replication_state">>, <<"error">>},
+            {<<"_replication_state_reason">>, to_binary(error_reason(Error))},
             {<<"_replication_id">>, ?l2b(BaseId)}]),
         ok = gen_server:call(?MODULE, {rep_error, RepId, Error}, infinity)
     end.
@@ -344,7 +346,8 @@ rep_db_update_error(Error, DocId) ->
     end,
     ?LOG_ERROR("Replication manager, error processing document `~s`: ~s",
         [DocId, Reason]),
-    update_rep_doc(DocId, [{<<"_replication_state">>, <<"error">>}]).
+    update_rep_doc(DocId, [{<<"_replication_state">>, <<"error">>},
+                           {<<"_replication_state_reason">>, Reason}]).
 
 
 rep_user_ctx({RepDoc}) ->
@@ -619,6 +622,9 @@ rep_state(RepId) ->
     end.
 
 
+error_reason({error, {Error, Reason}})
+  when is_atom(Error), is_binary(Reason) ->
+    io_lib:format("~s: ~s", [Error, Reason]);
 error_reason({error, Reason}) ->
     Reason;
 error_reason(Reason) ->

http://git-wip-us.apache.org/repos/asf/couchdb/blob/08cac68b/src/couchdb/couch_doc.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_doc.erl b/src/couchdb/couch_doc.erl
index 39e2354..4047370 100644
--- a/src/couchdb/couch_doc.erl
+++ b/src/couchdb/couch_doc.erl
@@ -295,6 +295,9 @@ transfer_fields([{<<"_replication_state">>, _} = Field | Rest],
 transfer_fields([{<<"_replication_state_time">>, _} = Field | Rest],
     #doc{body=Fields} = Doc) ->
     transfer_fields(Rest, Doc#doc{body=[Field|Fields]});
+transfer_fields([{<<"_replication_state_reason">>, _} = Field | Rest],
+    #doc{body=Fields} = Doc) ->
+    transfer_fields(Rest, Doc#doc{body=[Field|Fields]});
 transfer_fields([{<<"_replication_id">>, _} = Field | Rest],
     #doc{body=Fields} = Doc) ->
     transfer_fields(Rest, Doc#doc{body=[Field|Fields]});


[09/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton: Add preview to edit index and fix preview bug


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/d2f1ec7a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/d2f1ec7a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/d2f1ec7a

Branch: refs/heads/1744-single-config-file
Commit: d2f1ec7af38d57fd248a49ebd64ba7b46b0828ff
Parents: 08cac68
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Dec 3 12:46:19 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Dec 3 17:26:11 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js      | 22 +++++++++++++++++---
 .../app/templates/documents/view_editor.html    |  1 +
 2 files changed, 20 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/d2f1ec7a/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index ffbc1d1..cf939e2 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1164,7 +1164,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       "click button.save": "saveView",
       "click button.delete": "deleteView",
       "change select#reduce-function-selector": "updateReduce",
-      
+      "click button.preview": "previewView",
       "click #db-views-tabs-nav": 'toggleIndexNav'
     },
 
@@ -1344,10 +1344,17 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
 
 
     previewView: function(event, paramsInfo) {
+      event.preventDefault();
       var that = this,
-      mapVal = this.mapEditor.getValue(),
+      mapVal = this.mapVal(),
       reduceVal = this.reduceVal(),
-      paramsArr = paramsInfo.params;
+      paramsArr = [];
+
+      console.log(mapVal);
+      
+      if (paramsInfo && paramsInfo.params) {
+        paramsArr = paramsInfo.params;
+      }
 
       var params = _.reduce(paramsArr, function (params, param) {
         params[param.name] = param.value;
@@ -1390,6 +1397,15 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       return $("#reduce-function-selector").val() == "CUSTOM";
     },
 
+    mapVal: function () {
+
+      if (this.mapEditor) {
+        return this.mapEditor.getValue();
+      }
+
+      return this.$('#map-function').text();
+    },
+
     reduceVal: function() {
       var reduceOption = this.$('#reduce-function-selector :selected').val(),
       reduceVal = "";

http://git-wip-us.apache.org/repos/asf/couchdb/blob/d2f1ec7a/src/fauxton/app/templates/documents/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index f35b8ab..bb6e0af 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -67,6 +67,7 @@ the License.
 
           <div class="control-group">
             <button class="button green save fonticon-circle-check">Save</button>
+            <button class="button btn-info preview">Preview</button>
             <% if (!this.newView) { %>
             <button class="button delete outlineGray fonticon-circle-x">Delete</button>
             <% } %>


[30/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton: Before unload event

Build custom beforeunload event for backbone route,
also add in check on editor to warn the user if they
have unsaved changes in their editor.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/14cb47e5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/14cb47e5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/14cb47e5

Branch: refs/heads/1744-single-config-file
Commit: 14cb47e54c46662849ca3d1d40e82f014eb7cce1
Parents: f28dd6f
Author: Garren Smith <ga...@gmail.com>
Authored: Thu Dec 5 17:51:39 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Dec 9 17:33:23 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/api.js                        |  8 +++++++
 src/fauxton/app/main.js                       |  6 ++----
 src/fauxton/app/modules/documents/views.js    | 13 ++++++++++-
 src/fauxton/app/modules/fauxton/components.js | 24 ++++++++++++++++++++-
 src/fauxton/app/router.js                     | 25 ++++++++++++++++++++++
 src/fauxton/tasks/fauxton.js                  |  2 +-
 6 files changed, 71 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/14cb47e5/src/fauxton/app/api.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/api.js b/src/fauxton/app/api.js
index a71c5f8..751cdd2 100644
--- a/src/fauxton/app/api.js
+++ b/src/fauxton/app/api.js
@@ -61,6 +61,14 @@ function(app, Fauxton) {
     app.router.navigate(url,options);
   };
 
+  FauxtonAPI.beforeUnload = function () {
+    app.router.beforeUnload.apply(app.router, arguments);
+  };
+
+  FauxtonAPI.removeBeforeUnload = function () {
+    app.router.removeBeforeUnload.apply(app.router, arguments);
+  };
+
   FauxtonAPI.addHeaderLink = function(link) {
     app.masterLayout.navBar.addLink(link);
   };

http://git-wip-us.apache.org/repos/asf/couchdb/blob/14cb47e5/src/fauxton/app/main.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/main.js b/src/fauxton/app/main.js
index 2182f2c..6fe9991 100644
--- a/src/fauxton/app/main.js
+++ b/src/fauxton/app/main.js
@@ -40,10 +40,8 @@ function(app, Router) {
       // refresh.
       evt.preventDefault();
 
-      // `Backbone.history.navigate` is sufficient for all Routers and will
-      // trigger the correct events. The Router's internal `navigate` method
-      // calls this anyways.  The fragment is sliced from the root.
-      Backbone.history.navigate(href.attr, true);
+      //User app navigate so that navigate goes through a central place
+      app.router.navigate(href.attr, true);
     }
 
   });

http://git-wip-us.apache.org/repos/asf/couchdb/blob/14cb47e5/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index af3c4c3..64e304c 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -715,7 +715,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
       _.bindAll(this);
     },
     goback: function(){
-      window.history.back();
+      FauxtonAPI.navigate(this.database.url("index") + "?limit=100");
     },
     destroy: function(event) {
       if (this.model.isNewDoc()) {
@@ -814,6 +814,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
     saveDoc: function(event) {
       var json, notification, 
       that = this,
+      editor = this.editor,
       validDoc = this.getDocFromEditor();
 
       if (validDoc) {
@@ -822,6 +823,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         notification = FauxtonAPI.addNotification({msg: "Saving document."});
 
         this.model.save().then(function () {
+          editor.editSaved();
           FauxtonAPI.navigate('/database/' + that.database.id + '/' + that.model.id);
         }).fail(function(xhr) {
           var responseText = JSON.parse(xhr.responseText).reason;
@@ -906,6 +908,10 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
       });
       this.editor.render();
       this.model.on("sync", this.updateValues, this);
+    },
+
+    cleanup: function () {
+      this.editor.remove();
     }
   });
 
@@ -1560,6 +1566,11 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         //this.reduceEditor.setValue(this.langTemplates[this.defaultLang].reduce);
       } 
 
+    },
+
+    cleanup: function () {
+      this.mapEditor && this.mapEditor.remove();
+      this.reduceEditor && this.reduceEditor.remove();
     }
   });
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/14cb47e5/src/fauxton/app/modules/fauxton/components.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/fauxton/components.js b/src/fauxton/app/modules/fauxton/components.js
index bcc9226..5255626 100644
--- a/src/fauxton/app/modules/fauxton/components.js
+++ b/src/fauxton/app/modules/fauxton/components.js
@@ -207,6 +207,7 @@ function(app, FauxtonAPI, ace) {
       this.commands = options.commands;
       this.theme = options.theme || 'crimson_editor';
       this.couchJSHINT = options.couchJSHINT;
+      this.edited = false;
     },
 
     afterRender: function () {
@@ -224,10 +225,27 @@ function(app, FauxtonAPI, ace) {
       }
 
       var that = this;
-
       this.editor.getSession().on('change', function () {
         that.setHeightToLineCount();
+        that.edited = true;
+      });
+
+      $(window).on('beforeunload.editor', function() {
+        if (that.edited) {
+          return 'Your changes have not been saved. Click cancel to return to the document.';
+        }
       });
+
+      FauxtonAPI.beforeUnload("editor", function (deferred) {
+        if (that.edited) {
+          return 'Your changes have not been saved. Click cancel to return to the document.';
+        }
+      });
+    },
+
+    cleanup: function () {
+      $(window).off('beforeunload.editor');
+      FauxtonAPI.removeBeforeUnload("editor");
     },
 
     setHeightToLineCount: function () {
@@ -264,6 +282,10 @@ function(app, FauxtonAPI, ace) {
       });
     },
 
+    editSaved: function () {
+      this.edited = false;
+    },
+
     setValue: function (data, lineNumber) {
       lineNumber = lineNumber ? lineNumber : -1;
       this.editor.setValue(data, lineNumber);

http://git-wip-us.apache.org/repos/asf/couchdb/blob/14cb47e5/src/fauxton/app/router.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/router.js b/src/fauxton/app/router.js
index 9dac80c..e3a1636 100644
--- a/src/fauxton/app/router.js
+++ b/src/fauxton/app/router.js
@@ -47,9 +47,34 @@ function(req, app, Initialize, FauxtonAPI, Fauxton, Layout, Databases, Documents
   // TODO: auto generate this list if possible
   var modules = [Databases, Documents];
 
+  var beforeUnloads = {};
+
   var Router = app.router = Backbone.Router.extend({
     routes: {},
 
+    beforeUnload: function (name, fn) {
+      beforeUnloads[name] = fn;
+    },
+
+    removeBeforeUnload: function (name) {
+      delete beforeUnloads[name];
+    },
+
+    navigate: function (fragment, trigger) {
+      var continueNav  = true,
+          msg = _.find(_.map(beforeUnloads, function (fn) { return fn(); }), function (beforeReturn) {
+            if (beforeReturn) { return true; }
+          });
+
+      if (msg) {
+        continueNav = window.confirm(msg);
+      }
+
+      if (continueNav) {
+        Backbone.Router.prototype.navigate(fragment, trigger);
+      }
+    },
+
     addModuleRouteObject: function(RouteObject) {
       var that = this;
       var masterLayout = this.masterLayout,

http://git-wip-us.apache.org/repos/asf/couchdb/blob/14cb47e5/src/fauxton/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/src/fauxton/tasks/fauxton.js b/src/fauxton/tasks/fauxton.js
index bb68ddb..e54bab8 100644
--- a/src/fauxton/tasks/fauxton.js
+++ b/src/fauxton/tasks/fauxton.js
@@ -102,7 +102,7 @@ module.exports = function(grunt) {
 
     _.defaults(app, settings.app, {
       root: '/',
-      host: '../../',
+      host: '../..',
       version: "0.0"
     });
 


[44/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Add documentation for use_checkpoints replicator option


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/7299e71f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/7299e71f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/7299e71f

Branch: refs/heads/1744-single-config-file
Commit: 7299e71f33d1d09de9707d7f5a46c82290537876
Parents: 03bc164
Author: Volker Mische <vo...@gmail.com>
Authored: Tue Jul 16 00:34:31 2013 +0200
Committer: Robert Newson <rn...@apache.org>
Committed: Sat Dec 14 11:34:09 2013 +0100

----------------------------------------------------------------------
 share/doc/src/json-structure.rst         | 3 +++
 share/doc/src/replication/replicator.rst | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7299e71f/share/doc/src/json-structure.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/json-structure.rst b/share/doc/src/json-structure.rst
index c124e44..042df59 100644
--- a/share/doc/src/json-structure.rst
+++ b/share/doc/src/json-structure.rst
@@ -271,6 +271,9 @@ Replication Settings
 |                                | filter function; value should be a document |
 |                                | containing parameters as members            |
 +--------------------------------+---------------------------------------------+
+| use_checkpoints (optional)     | Whether to use replication checkpoints      |
+|                                | or not                                      |
++--------------------------------+---------------------------------------------+
 
 .. _replication-status:
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7299e71f/share/doc/src/replication/replicator.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/replication/replicator.rst b/share/doc/src/replication/replicator.rst
index 0413bce..6700186 100644
--- a/share/doc/src/replication/replicator.rst
+++ b/share/doc/src/replication/replicator.rst
@@ -22,7 +22,8 @@ cancel an ongoing replication.
 
 These documents have exactly the same content as the JSON objects we use to
 ``POST`` to ``_replicate`` (fields ``source``, ``target``, ``create_target``,
-``continuous``, ``doc_ids``, ``filter``, ``query_params``).
+``continuous``, ``doc_ids``, ``filter``, ``query_params``,
+``use_checkpoints``).
 
 Replication documents can have a user defined ``_id`` (handy for finding a
 specific replication request later). Design Documents


[45/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
docs: various updates for release notes for 1.6.0

- closes COUCHDB-1795
- closes COUCHDB-1962


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5e2a4278
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5e2a4278
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5e2a4278

Branch: refs/heads/1744-single-config-file
Commit: 5e2a4278ea50d284c75469a4cf3c5a2d26ceb63d
Parents: 7299e71
Author: Dave Cottlehuber <dc...@apache.org>
Authored: Fri Dec 13 18:27:10 2013 +0100
Committer: Dave Cottlehuber <dc...@apache.org>
Committed: Sat Dec 14 11:39:04 2013 +0100

----------------------------------------------------------------------
 share/doc/src/replication/protocol.rst   |  4 ++--
 share/doc/src/replication/replicator.rst | 13 +++++++++++++
 share/doc/src/whatsnew/1.6.rst           |  5 +++++
 3 files changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5e2a4278/share/doc/src/replication/protocol.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/replication/protocol.rst b/share/doc/src/replication/protocol.rst
index 10ba243..c5a8181 100644
--- a/share/doc/src/replication/protocol.rst
+++ b/share/doc/src/replication/protocol.rst
@@ -107,7 +107,7 @@ Algorithm
 
 5. GET each revisions from the source Database by calling the URL
    `/<source>/<docid>?revs=true&open_revs`=<revision>` . This
-   will get the document with teh parent revisions. Also don't forget to
+   will get the document with its parent revisions. Also don't forget to
    get attachments that aren't already stored at the target. As an
    optimisation you can use the HTTP multipart api to get all.
 
@@ -190,7 +190,7 @@ Pull Only
 Reference
 ---------
 
-* `TouchDB Ios wiki <https://github.com/couchbaselabs/TouchDB-iOS/wiki/Replication-Algorithm>`_
+* `TouchDB iOS wiki <https://github.com/couchbaselabs/TouchDB-iOS/wiki/Replication-Algorithm>`_
 * `CouchDB documentation
   <http://wiki.apache.org/couchdb/Replication>`_
 * CouchDB `change notifications`_

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5e2a4278/share/doc/src/replication/replicator.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/replication/replicator.rst b/share/doc/src/replication/replicator.rst
index 6700186..e93c579 100644
--- a/share/doc/src/replication/replicator.rst
+++ b/share/doc/src/replication/replicator.rst
@@ -91,6 +91,19 @@ Special fields set by the replicator start with the prefix
 
    If ``replication_state`` is ``error``, this field contains the reason.
 
+.. code-block:: javascript
+
+    {
+    "_id": "my_rep",
+    "_rev": "2-9f2c0d9372f4ee4dc75652ab8f8e7c70",
+    "source": "foodb",
+    "target": "bardb",
+    "_replication_state": "error",
+    "_replication_state_time": "2013-12-13T18:48:00+01:00",
+    "_replication_state_reason": "db_not_found: could not open foodb",
+    "_replication_id": "fe965cdc47b4d5f6c02811d9d351ac3d"
+    }
+
 When the replication finishes, it will update the ``_replication_state``
 field (and ``_replication_state_time``) with the value ``completed``, so
 the document will look like:

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5e2a4278/share/doc/src/whatsnew/1.6.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/whatsnew/1.6.rst b/share/doc/src/whatsnew/1.6.rst
index df57320..2a0fc6e 100644
--- a/share/doc/src/whatsnew/1.6.rst
+++ b/share/doc/src/whatsnew/1.6.rst
@@ -46,3 +46,8 @@ Version 1.6.0
 * :issue:`1922`: Fix CORS exposed headers :commit:`4f619833`
 * Rename ``proxy_authentification_handler`` to ``proxy_authentication_handler``
   :commit:`c66ac4a8`
+* :issue:`1795`: Ensure startup script couchdb clears pid file on termination
+  :commit:`818ef4f9`
+* :issue:`1962`: Various replicator enhancements
+  :commit:`1d5fe2aa` write access for checkpoints is not required on source db
+  :commit:`0693f98e` make the replication checkpoint interval configurable


[39/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton: View fixes

On saving new view contiue to show edit index
Add new design doc to collection on save
Reload view list when bulk or single deleting design doc


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/936edf85
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/936edf85
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/936edf85

Branch: refs/heads/1744-single-config-file
Commit: 936edf85f362715f4fda5a3706799686b38cda68
Parents: 9c641f1
Author: Garren Smith <ga...@gmail.com>
Authored: Thu Dec 12 11:11:28 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Thu Dec 12 11:11:28 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js      | 30 ++++++++++++++++----
 .../app/templates/documents/view_editor.html    |  6 ++--
 2 files changed, 28 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/936edf85/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index de21010..49c443d 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -371,6 +371,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         });
 
         that.model.collection.remove(that.model.id);
+        if (!!that.model.id.match('_design')) {
+          FauxtonAPI.triggerRouteEvent('reloadDesignDocs');
+        }
       }, function(resp) {
         FauxtonAPI.addNotification({
           msg: "Failed to destroy your doc!",
@@ -639,6 +642,10 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
           });
 
           model.collection.remove(model.id);
+          console.log(model.id.match('_design'), !!model.id.match('_design'));
+          if (!!model.id.match('_design')) { 
+            FauxtonAPI.triggerRouteEvent('reloadDesignDocs');
+          }
           that.$('.bulk-delete').addClass('disabled');
         }, function(resp) {
           FauxtonAPI.addNotification({
@@ -1159,7 +1166,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
           views: {},
           language: "javascript"
         };
-        return new this.DocModel(doc, {database: this.database});
+        var ddoc = new this.DocModel(doc, {database: this.database});
+        this.collection.add(ddoc);
+        return ddoc;
       } else {
         var ddocName = this.$('#ddoc').val();
         return this.collection.find(function (ddoc) {
@@ -1201,8 +1210,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         this.ddocID = options.ddocInfo.id;
         this.viewName = options.viewName;
         this.ddocInfo = new Documents.DdocInfo({_id: this.ddocID},{database: this.database});
-      } 
+      }
 
+      this.showIndex = false;
       _.bindAll(this);
     },
 
@@ -1285,6 +1295,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         ddoc.setDdocView(viewName, mapVal, reduceVal);
 
         ddoc.save().then(function () {
+          that.mapEditor.editSaved();
+          that.reduceEditor && that.reduceEditor.editSaved();
+
           FauxtonAPI.addNotification({
             msg: "View has been saved.",
             type: "success",
@@ -1295,9 +1308,13 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
             var fragment = '/database/' + that.database.id +'/' + ddocName + '/_view/' + viewName; 
 
             FauxtonAPI.navigate(fragment, {trigger: false});
-            FauxtonAPI.triggerRouteEvent('reloadDesignDocs',{selectedTab: ddocName.replace('_design/','') + '_' + viewName});
-
             that.newView = false;
+            that.ddocID = ddoc.id;
+            that.viewName = viewName;
+            that.ddocInfo = ddoc;
+            that.showIndex = true;
+            that.render();
+            FauxtonAPI.triggerRouteEvent('reloadDesignDocs',{selectedTab: ddocName.replace('_design/','') + '_' + viewName});
           }
 
           if (that.reduceFunStr !== reduceVal) {
@@ -1538,8 +1555,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
       }
 
       this.designDocSelector.updateDesignDoc();
-      if (this.newView) {
+      if (this.newView || this.showIndex) {
         this.showEditors();
+        this.showIndex = false;
       } else {
         this.$('#index').hide();
         this.$('#index-nav').parent().removeClass('active');
@@ -1566,6 +1584,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         //this.reduceEditor.setValue(this.langTemplates[this.defaultLang].reduce);
       } 
 
+      this.mapEditor.editSaved();
+      this.reduceEditor && this.reduceEditor.editSaved();
     },
 
     cleanup: function () {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/936edf85/src/fauxton/app/templates/documents/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index 8865625..cf6aa26 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -13,10 +13,10 @@ the License.
 -->
 <div class="row">
   <ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">
-    <li class="active"> <a id="index-nav" class="fonticon-wrench fonticon" data-toggle="tab" href="#index"><% if (newView) { %>Create Index <% } else { %>Edit Index <% } %></a></li>
+    <li class="active"> <a data-bypass="true" id="index-nav" class="fonticon-wrench fonticon" data-toggle="tab" href="#index"><% if (newView) { %>Create Index <% } else { %>Edit Index <% } %></a></li>
     <% if (!newView) { %>
-    <li><a id="query-nav" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Query Options</a></li>
-    <li><a id="meta-nav" href="#metadata" data-toggle="tab">Design Doc Metadata</a></li>
+    <li><a data-bypass="true" id="query-nav" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Query Options</a></li>
+    <li><a data-bypass="true" id="meta-nav" href="#metadata" data-toggle="tab">Design Doc Metadata</a></li>
     <% } %>
   </ul>
   <div class="all-docs-list errors-container"></div>


[15/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
distcheck: update license.skip

fixes issue introduced in #d25d31c8


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/54adb631
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/54adb631
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/54adb631

Branch: refs/heads/1744-single-config-file
Commit: 54adb631efe0dcec789d4294d6d7ebb2cbb2658d
Parents: 5576644
Author: Dave Cottlehuber <dc...@apache.org>
Authored: Wed Dec 4 11:06:18 2013 +0100
Committer: Dave Cottlehuber <dc...@apache.org>
Committed: Wed Dec 4 11:08:07 2013 +0100

----------------------------------------------------------------------
 license.skip | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/54adb631/license.skip
----------------------------------------------------------------------
diff --git a/license.skip b/license.skip
index beb94e6..56f239d 100644
--- a/license.skip
+++ b/license.skip
@@ -118,6 +118,7 @@
 ^src/couch_dbupdates
 ^src/ejson/.*
 ^src/etap/.*
+^src/fauxton/app/addons/config/assets/less/config.less
 ^src/fauxton/app/modules/pouchdb/base.js
 ^src/fauxton/app/modules/pouchdb/pouch.collate.js
 ^src/fauxton/app/modules/pouchdb/pouchdb.mapreduce.js


[43/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Tests for replicator use_checkpoints option


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/03bc1641
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/03bc1641
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/03bc1641

Branch: refs/heads/1744-single-config-file
Commit: 03bc1641639667f26e219cc36885118448c24158
Parents: 7c23a6e
Author: Volker Mische <vo...@gmail.com>
Authored: Tue Jul 16 00:26:03 2013 +0200
Committer: Robert Newson <rn...@apache.org>
Committed: Sat Dec 14 11:31:32 2013 +0100

----------------------------------------------------------------------
 src/couch_replicator/Makefile.am               |   3 +-
 src/couch_replicator/test/07-use-checkpoints.t | 256 ++++++++++++++++++++
 2 files changed, 258 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/03bc1641/src/couch_replicator/Makefile.am
----------------------------------------------------------------------
diff --git a/src/couch_replicator/Makefile.am b/src/couch_replicator/Makefile.am
index 71d3702..2dcd47d 100644
--- a/src/couch_replicator/Makefile.am
+++ b/src/couch_replicator/Makefile.am
@@ -41,7 +41,8 @@ test_files = \
 	test/03-replication-compact.t \
 	test/04-replication-large-atts.t \
 	test/05-replication-many-leaves.t \
-	test/06-doc-missing-stubs.t
+	test/06-doc-missing-stubs.t \
+	test/07-use-checkpoints.t
 
 compiled_files = \
 	ebin/couch_replicator_api_wrap.beam \

http://git-wip-us.apache.org/repos/asf/couchdb/blob/03bc1641/src/couch_replicator/test/07-use-checkpoints.t
----------------------------------------------------------------------
diff --git a/src/couch_replicator/test/07-use-checkpoints.t b/src/couch_replicator/test/07-use-checkpoints.t
new file mode 100755
index 0000000..cefc1a7
--- /dev/null
+++ b/src/couch_replicator/test/07-use-checkpoints.t
@@ -0,0 +1,256 @@
+#!/usr/bin/env escript
+%% -*- erlang -*-
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+%   http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+% Verify that compacting databases that are being used as the source or
+% target of a replication doesn't affect the replication and that the
+% replication doesn't hold their reference counters forever.
+
+-define(b2l(B), binary_to_list(B)).
+
+-record(user_ctx, {
+    name = null,
+    roles = [],
+    handler
+}).
+
+-record(doc, {
+    id = <<"">>,
+    revs = {0, []},
+    body = {[]},
+    atts = [],
+    deleted = false,
+    meta = []
+}).
+
+-record(db, {
+    main_pid = nil,
+    update_pid = nil,
+    compactor_pid = nil,
+    instance_start_time, % number of microsecs since jan 1 1970 as a binary string
+    fd,
+    updater_fd,
+    fd_ref_counter,
+    header = nil,
+    committed_update_seq,
+    fulldocinfo_by_id_btree,
+    docinfo_by_seq_btree,
+    local_docs_btree,
+    update_seq,
+    name,
+    filepath,
+    validate_doc_funs = [],
+    security = [],
+    security_ptr = nil,
+    user_ctx = #user_ctx{},
+    waiting_delayed_commit = nil,
+    revs_limit = 1000,
+    fsync_options = [],
+    options = [],
+    compression,
+    before_doc_update,
+    after_doc_read
+}).
+
+-record(rep, {
+    id,
+    source,
+    target,
+    options,
+    user_ctx,
+    doc_id
+}).
+
+
+source_db_name() -> <<"couch_test_rep_db_a">>.
+target_db_name() -> <<"couch_test_rep_db_b">>.
+
+
+main(_) ->
+    test_util:init_code_path(),
+
+    etap:plan(16),
+    case (catch test()) of
+        ok ->
+            etap:end_tests();
+        Other ->
+            etap:diag(io_lib:format("Test died abnormally: ~p", [Other])),
+            etap:bail(Other)
+    end,
+    ok.
+
+
+test() ->
+    couch_server_sup:start_link(test_util:config_files()),
+    ibrowse:start(),
+
+    test_use_checkpoints(false),
+    test_use_checkpoints(true),
+
+    couch_server_sup:stop(),
+    ok.
+
+
+test_use_checkpoints(UseCheckpoints) ->
+    Pairs = [
+        {source_db_name(), target_db_name()},
+        {{remote, source_db_name()}, target_db_name()},
+        {source_db_name(), {remote, target_db_name()}},
+        {{remote, source_db_name()}, {remote, (target_db_name())}}
+    ],
+
+    ListenerFun = case UseCheckpoints of
+    false ->
+        fun({finished, _, {CheckpointHistory}}) ->
+            etap:is(CheckpointHistory,
+            [{<<"use_checkpoints">>,false}],
+            "No checkpoints found");
+        (_) ->
+            ok
+        end;
+    true ->
+        fun({finished, _, {CheckpointHistory}}) ->
+            SessionId = lists:keyfind(
+                <<"session_id">>, 1, CheckpointHistory),
+            etap:isnt(SessionId, false, "There's a checkpoint");
+        (_) ->
+            ok
+        end
+    end,
+    {ok, Listener} = couch_replicator_notifier:start_link(ListenerFun),
+
+    lists:foreach(
+        fun({Source, Target}) ->
+            {ok, SourceDb} = create_db(source_db_name()),
+            etap:diag("Populating source database"),
+            populate_db(SourceDb, 100),
+            ok = couch_db:close(SourceDb),
+
+            etap:diag("Creating target database"),
+            {ok, TargetDb} = create_db(target_db_name()),
+            ok = couch_db:close(TargetDb),
+
+            etap:diag("Setup replicator notifier listener"),
+
+            etap:diag("Triggering replication"),
+            replicate(Source, Target, UseCheckpoints),
+
+            etap:diag("Replication finished, comparing source and target databases"),
+            compare_dbs(SourceDb, TargetDb),
+
+            etap:diag("Deleting databases"),
+            delete_db(TargetDb),
+            delete_db(SourceDb),
+
+            ok = timer:sleep(1000)
+        end,
+        Pairs),
+
+    couch_replicator_notifier:stop(Listener).
+
+
+populate_db(Db, DocCount) ->
+    Docs = lists:foldl(
+        fun(DocIdCounter, Acc) ->
+            Id = iolist_to_binary(["doc", integer_to_list(DocIdCounter)]),
+            Value = iolist_to_binary(["val", integer_to_list(DocIdCounter)]),
+            Doc = #doc{
+                id = Id,
+                body = {[ {<<"value">>, Value} ]}
+            },
+            [Doc | Acc]
+        end,
+        [], lists:seq(1, DocCount)),
+    {ok, _} = couch_db:update_docs(Db, Docs, []).
+
+
+compare_dbs(#db{name = SourceName}, #db{name = TargetName}) ->
+    {ok, SourceDb} = couch_db:open_int(SourceName, []),
+    {ok, TargetDb} = couch_db:open_int(TargetName, []),
+    Fun = fun(FullDocInfo, _, Acc) ->
+        {ok, Doc} = couch_db:open_doc(SourceDb, FullDocInfo),
+        {Props} = DocJson = couch_doc:to_json_obj(Doc, [attachments]),
+        DocId = couch_util:get_value(<<"_id">>, Props),
+        DocTarget = case couch_db:open_doc(TargetDb, DocId) of
+        {ok, DocT} ->
+            DocT;
+        Error ->
+            etap:bail("Error opening document '" ++ ?b2l(DocId) ++
+                "' from target: " ++ couch_util:to_list(Error))
+        end,
+        DocTargetJson = couch_doc:to_json_obj(DocTarget, [attachments]),
+        case DocTargetJson of
+        DocJson ->
+            ok;
+        _ ->
+            etap:bail("Content from document '" ++ ?b2l(DocId) ++
+                "' differs in target database")
+        end,
+        {ok, Acc}
+    end,
+    {ok, _, _} = couch_db:enum_docs(SourceDb, Fun, [], []),
+    etap:diag("Target database has the same documents as the source database"),
+    ok = couch_db:close(SourceDb),
+    ok = couch_db:close(TargetDb).
+
+
+db_url(DbName) ->
+    iolist_to_binary([
+        "http://", couch_config:get("httpd", "bind_address", "127.0.0.1"),
+        ":", integer_to_list(mochiweb_socket_server:get(couch_httpd, port)),
+        "/", DbName
+    ]).
+
+
+create_db(DbName) ->
+    {ok, Db} = couch_db:create(
+        DbName,
+        [{user_ctx, #user_ctx{roles = [<<"_admin">>]}}, overwrite]),
+    couch_db:close(Db),
+    {ok, Db}.
+
+
+delete_db(#db{name = DbName, main_pid = Pid}) ->
+    ok = couch_server:delete(
+        DbName, [{user_ctx, #user_ctx{roles = [<<"_admin">>]}}]),
+    MonRef = erlang:monitor(process, Pid),
+    receive
+    {'DOWN', MonRef, process, Pid, _Reason} ->
+        ok
+    after 30000 ->
+        etap:bail("Timeout deleting database")
+    end.
+
+
+replicate({remote, Db}, Target, UseCheckpoints) ->
+    replicate(db_url(Db), Target, UseCheckpoints);
+
+replicate(Source, {remote, Db}, UseCheckpoints) ->
+    replicate(Source, db_url(Db), UseCheckpoints);
+
+replicate(Source, Target, UseCheckpoints) ->
+    RepObject = {[
+        {<<"source">>, Source},
+        {<<"target">>, Target},
+        {<<"use_checkpoints">>, UseCheckpoints}
+    ]},
+    {ok, Rep} = couch_replicator_utils:parse_rep_doc(
+        RepObject, #user_ctx{roles = [<<"_admin">>]}),
+    {ok, Pid} = couch_replicator:async_replicate(Rep),
+    MonRef = erlang:monitor(process, Pid),
+    receive
+    {'DOWN', MonRef, process, Pid, Reason} ->
+        etap:is(Reason, normal, "Replication finished successfully")
+    after 300000 ->
+        etap:bail("Timeout waiting for replication to finish")
+    end.


[03/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Extend support for attachment-related query params

Until now, the boolean query parameters `attachments` and
`att_encoding_info` have only been supported for the document API
endpoint (`/{db}/{docid}`).

This extends support for queries to the changes (`/{db}/_changes`) and
view (`/{db}/_design/{ddoc}/_view/{view}`) API endpoints:

* If `include_docs` and `attachments` equal `true`, the Base64-encoded
  contents of attachments are included with the documents in changes or
  view query results, respectively.

* If `include_docs` and `att_encoding_info` equal `true`, encoding
  information is included in attachment stubs if the particular
  attachment is compressed.

Closes COUCHDB-1923.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/ca41964b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/ca41964b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/ca41964b

Branch: refs/heads/1744-single-config-file
Commit: ca41964b70b96b5fa76504e4001523ed29c718b5
Parents: 2b80708
Author: Klaus Trainer <kl...@posteo.de>
Authored: Fri Nov 15 17:02:20 2013 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Nov 28 22:59:13 2013 +0000

----------------------------------------------------------------------
 share/doc/src/api/database/changes.rst     | 15 ++++++
 share/doc/src/api/ddoc/views.rst           | 20 +++++++-
 share/doc/src/api/document/common.rst      | 30 +++++++----
 share/www/script/test/attachment_views.js  | 54 +++++++++++++++++---
 share/www/script/test/changes.js           | 68 +++++++++++++++++++++++++
 src/couch_mrview/include/couch_mrview.hrl  |  1 +
 src/couch_mrview/src/couch_mrview_http.erl | 16 ++++++
 src/couch_mrview/src/couch_mrview_util.erl | 22 ++++----
 src/couchdb/couch_changes.erl              | 16 ++++--
 src/couchdb/couch_db.hrl                   |  2 +
 src/couchdb/couch_httpd_db.erl             |  6 +++
 test/etap/073-changes.t                    |  1 +
 12 files changed, 220 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/ca41964b/share/doc/src/api/database/changes.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/database/changes.rst b/share/doc/src/api/database/changes.rst
index 2036220..21d44ea 100644
--- a/share/doc/src/api/database/changes.rst
+++ b/share/doc/src/api/database/changes.rst
@@ -59,6 +59,13 @@
   :query boolean include_docs: Include the associated document with each result.
     If there are conflicts, only the winning revision is returned.
     Default is ``false``.
+  :query boolean attachments: Include the Base64-encoded content of
+    :ref:`attachments <api/doc/attachments>` in the documents that are included
+    if `include_docs` is ``true``. Ignored if `include_docs` isn't ``true``.
+    Default is ``false``.
+  :query boolean att_encoding_info: Include encoding information in attachment
+    stubs if `include_docs` is ``true`` and the particular attachment is
+    compressed. Ignored if `include_docs` isn't ``true``. Default is ``false``.
   :query number last-event-id: Alias of `Last-Event-ID` header.
   :query number limit: Limit number of result rows to the specified value
     (note that using ``0`` here has the same effect as ``1``).
@@ -162,6 +169,14 @@
    listen changes since current seq number.
 .. versionchanged:: 1.3.0 ``eventsource`` feed type added.
 .. versionchanged:: 1.4.0 Support ``Last-Event-ID`` header.
+.. versionchanged:: 1.6.0 added ``attachments`` and ``att_encoding_info``
+   parameters
+
+.. warning::
+   Using the ``attachments`` parameter to include attachments in the changes
+   feed is not recommended for large attachment sizes. Also note that the
+   Base64-encoding that is used leads to a 33% overhead (i.e. one third) in
+   transfer size for attachments.
 
 
 .. http:post:: /{db}/_changes

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ca41964b/share/doc/src/api/ddoc/views.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/ddoc/views.rst b/share/doc/src/api/ddoc/views.rst
index 5e56f9c..3d14396 100644
--- a/share/doc/src/api/ddoc/views.rst
+++ b/share/doc/src/api/ddoc/views.rst
@@ -41,8 +41,15 @@
   :query boolean group: Group the results using the reduce function to a group
     or single row. Default is ``false``
   :query number group_level: Specify the group level to be used. *Optional*
-  :query boolean include_docs: Include the full content of the documents in
-    the return. Default is ``false``
+  :query boolean include_docs: Include the associated document with each row.
+    Default is ``false``.
+  :query boolean attachments: Include the Base64-encoded content of
+    :ref:`attachments <api/doc/attachments>` in the documents that are included
+    if `include_docs` is ``true``. Ignored if `include_docs` isn't ``true``.
+    Default is ``false``.
+  :query boolean att_encoding_info: Include encoding information in attachment
+    stubs if `include_docs` is ``true`` and the particular attachment is
+    compressed. Ignored if `include_docs` isn't ``true``. Default is ``false``.
   :query boolean inclusive_end: Specifies whether the specified end key should
     be included in the result. Default is ``true``
   :query string key: Return only documents that match the specified key.
@@ -123,6 +130,15 @@
         "total_rows": 3
     }
 
+.. versionchanged:: 1.6.0 added ``attachments`` and ``att_encoding_info``
+   parameters
+
+.. warning::
+   Using the ``attachments`` parameter to include attachments in view results
+   is not recommended for large attachment sizes. Also note that the
+   Base64-encoding that is used leads to a 33% overhead (i.e. one third) in
+   transfer size for attachments.
+
 
 .. http:post:: /{db}/_design/{ddoc}/_view/{view}
   :synopsis: Returns certain rows for the specified stored view

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ca41964b/share/doc/src/api/document/common.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/document/common.rst b/share/doc/src/api/document/common.rst
index 62775cf..089d856 100644
--- a/share/doc/src/api/document/common.rst
+++ b/share/doc/src/api/document/common.rst
@@ -80,8 +80,8 @@
 
   :query boolean attachments: Includes attachments bodies in response.
     Default is ``false``
-  :query boolean att_encoding_info: Includes encoding information into
-    attachment's stubs for compressed ones. Default is ``false``
+  :query boolean att_encoding_info: Includes encoding information in attachment
+    stubs if the particular attachment is compressed. Default is ``false``.
   :query array atts_since: Includes attachments only since specified revisions.
     Doesn't includes attachments for specified revisions. *Optional*
   :query boolean conflicts: Includes information about conflicts in document.
@@ -396,16 +396,28 @@ information objects with next structure:
 
 - **content_type** (*string*): Attachment MIME type
 - **data** (*string*): Base64-encoded content. Available if attachment content
-  requested by using ``attachments=true`` or ``atts_since`` query parameters
+  is requested by using the following query parameters:
+    - ``attachments=true`` when querying a document
+    - ``attachments=true&include_docs=true`` when querying a
+      :ref:`changes feed <api/db/changes>` or a :ref:`view <api/ddoc/view>`
+    - ``atts_since``.
 - **digest** (*string*): Content hash digest.
   It starts with prefix which announce hash type (``md5-``) and continues with
   Base64-encoded hash digest
-- **encoded_length** (*number*): Compressed attachment size in bytes
-  Available when query parameter ``att_encoding_info=true`` was specified and
-  ``content_type`` is in :config:option:`list of compressiable types
-  <attachments/compressible_types>`
-- **encoding** (*string*): Compression codec. Available when query parameter
-  ``att_encoding_info=true`` was specified
+- **encoded_length** (*number*): Compressed attachment size in bytes.
+  Available if ``content_type`` is in :config:option:`list of compressible types
+  <attachments/compressible_types>` when the attachment was added and the
+  following query parameters are specified:
+    - ``att_encoding_info=true`` when querying a document
+    - ``att_encoding_info=true&include_docs=true`` when querying a
+      :ref:`changes feed <api/db/changes>` or a :ref:`view <api/ddoc/view>`
+- **encoding** (*string*): Compression codec. Available if ``content_type`` is
+  in :config:option:`list of compressible types
+  <attachments/compressible_types>` when the attachment was added and the
+  following query parameters are specified:
+    - ``att_encoding_info=true`` when querying a document
+    - ``att_encoding_info=true&include_docs=true`` when querying a
+      :ref:`changes feed <api/db/changes>` or a :ref:`view <api/ddoc/view>`
 - **length** (*number*): Real attachment size in bytes. Not available if attachment
   content requested
 - **revpos** (*number*): Revision *number* when attachment was added

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ca41964b/share/www/script/test/attachment_views.js
----------------------------------------------------------------------
diff --git a/share/www/script/test/attachment_views.js b/share/www/script/test/attachment_views.js
index a92a8ad..b55aabe 100644
--- a/share/www/script/test/attachment_views.js
+++ b/share/www/script/test/attachment_views.js
@@ -19,13 +19,15 @@ couchTests.attachment_views= function(debug) {
 
   // count attachments in a view
 
+  var attachmentData = "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=";
+
   db.bulkSave(makeDocs(0, 10));
 
   db.bulkSave(makeDocs(10, 20, {
     _attachments:{
       "foo.txt": {
         content_type:"text/plain",
-        data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
+        data: attachmentData
       }
     }
   }));
@@ -34,11 +36,11 @@ couchTests.attachment_views= function(debug) {
     _attachments:{
       "foo.txt": {
         content_type:"text/plain",
-        data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
+        data: attachmentData
       },
       "bar.txt": {
         content_type:"text/plain",
-        data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
+        data: attachmentData
       }
     }
   }));
@@ -47,15 +49,15 @@ couchTests.attachment_views= function(debug) {
     _attachments:{
       "foo.txt": {
         content_type:"text/plain",
-        data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
+        data: attachmentData
       },
       "bar.txt": {
         content_type:"text/plain",
-        data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
+        data: attachmentData
       },
       "baz.txt": {
         content_type:"text/plain",
-        data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
+        data: attachmentData
       }
     }
   }));
@@ -95,4 +97,44 @@ couchTests.attachment_views= function(debug) {
   T(result.rows.length == 1);
   T(result.rows[0].value == 20);
 
+  var result = db.query(mapFunction, null, {
+    startkey: 30,
+    endkey: 39,
+    include_docs: true
+  });
+
+  T(result.rows.length == 10);
+  T(result.rows[0].value == 3);
+  T(result.rows[0].doc._attachments['baz.txt'].stub === true);
+  T(result.rows[0].doc._attachments['baz.txt'].data === undefined);
+  T(result.rows[0].doc._attachments['baz.txt'].encoding === undefined);
+  T(result.rows[0].doc._attachments['baz.txt'].encoded_length === undefined);
+
+  var result = db.query(mapFunction, null, {
+    startkey: 30,
+    endkey: 39,
+    include_docs: true,
+    attachments: true
+  });
+
+  T(result.rows.length == 10);
+  T(result.rows[0].value == 3);
+  T(result.rows[0].doc._attachments['baz.txt'].data === attachmentData);
+  T(result.rows[0].doc._attachments['baz.txt'].stub === undefined);
+  T(result.rows[0].doc._attachments['baz.txt'].encoding === undefined);
+  T(result.rows[0].doc._attachments['baz.txt'].encoded_length === undefined);
+
+  var result = db.query(mapFunction, null, {
+    startkey: 30,
+    endkey: 39,
+    include_docs: true,
+    att_encoding_info: true
+  });
+
+  T(result.rows.length == 10);
+  T(result.rows[0].value == 3);
+  T(result.rows[0].doc._attachments['baz.txt'].data === undefined);
+  T(result.rows[0].doc._attachments['baz.txt'].stub === true);
+  T(result.rows[0].doc._attachments['baz.txt'].encoding === "gzip");
+  T(result.rows[0].doc._attachments['baz.txt'].encoded_length === 47);
 };

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ca41964b/share/www/script/test/changes.js
----------------------------------------------------------------------
diff --git a/share/www/script/test/changes.js b/share/www/script/test/changes.js
index fcd8306..0fba9f9 100644
--- a/share/www/script/test/changes.js
+++ b/share/www/script/test/changes.js
@@ -646,6 +646,74 @@ couchTests.changes = function(debug) {
   T(changes[0][1] === "3");
   T(changes[1][1] === "4");
 
+  // COUCHDB-1923
+  T(db.deleteDb());
+  T(db.createDb());
+
+  var attachmentData = "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=";
+
+  db.bulkSave(makeDocs(20, 30, {
+    _attachments:{
+      "foo.txt": {
+        content_type:"text/plain",
+        data: attachmentData
+      },
+      "bar.txt": {
+        content_type:"text/plain",
+        data: attachmentData
+      }
+    }
+  }));
+
+  var mapFunction = function(doc) {
+    var count = 0;
+
+    for(var idx in doc._attachments) {
+      count = count + 1;
+    }
+
+    emit(parseInt(doc._id), count);
+  };
+
+  var req = CouchDB.request("GET", "/test_suite_db/_changes?include_docs=true");
+  var resp = JSON.parse(req.responseText);
+
+  T(resp.results.length == 10);
+  T(resp.results[0].doc._attachments['foo.txt'].stub === true);
+  T(resp.results[0].doc._attachments['foo.txt'].data === undefined);
+  T(resp.results[0].doc._attachments['foo.txt'].encoding === undefined);
+  T(resp.results[0].doc._attachments['foo.txt'].encoded_length === undefined);
+  T(resp.results[0].doc._attachments['bar.txt'].stub === true);
+  T(resp.results[0].doc._attachments['bar.txt'].data === undefined);
+  T(resp.results[0].doc._attachments['bar.txt'].encoding === undefined);
+  T(resp.results[0].doc._attachments['bar.txt'].encoded_length === undefined);
+
+  var req = CouchDB.request("GET", "/test_suite_db/_changes?include_docs=true&attachments=true");
+  var resp = JSON.parse(req.responseText);
+
+  T(resp.results.length == 10);
+  T(resp.results[0].doc._attachments['foo.txt'].stub === undefined);
+  T(resp.results[0].doc._attachments['foo.txt'].data === attachmentData);
+  T(resp.results[0].doc._attachments['foo.txt'].encoding === undefined);
+  T(resp.results[0].doc._attachments['foo.txt'].encoded_length === undefined);
+  T(resp.results[0].doc._attachments['bar.txt'].stub === undefined);
+  T(resp.results[0].doc._attachments['bar.txt'].data == attachmentData);
+  T(resp.results[0].doc._attachments['bar.txt'].encoding === undefined);
+  T(resp.results[0].doc._attachments['bar.txt'].encoded_length === undefined);
+
+  var req = CouchDB.request("GET", "/test_suite_db/_changes?include_docs=true&att_encoding_info=true");
+  var resp = JSON.parse(req.responseText);
+
+  T(resp.results.length == 10);
+  T(resp.results[0].doc._attachments['foo.txt'].stub === true);
+  T(resp.results[0].doc._attachments['foo.txt'].data === undefined);
+  T(resp.results[0].doc._attachments['foo.txt'].encoding === "gzip");
+  T(resp.results[0].doc._attachments['foo.txt'].encoded_length === 47);
+  T(resp.results[0].doc._attachments['bar.txt'].stub === true);
+  T(resp.results[0].doc._attachments['bar.txt'].data === undefined);
+  T(resp.results[0].doc._attachments['bar.txt'].encoding === "gzip");
+  T(resp.results[0].doc._attachments['bar.txt'].encoded_length === 47);
+
   // cleanup
   db.deleteDb();
 };

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ca41964b/src/couch_mrview/include/couch_mrview.hrl
----------------------------------------------------------------------
diff --git a/src/couch_mrview/include/couch_mrview.hrl b/src/couch_mrview/include/couch_mrview.hrl
index bf3bcac..e4ec66d 100644
--- a/src/couch_mrview/include/couch_mrview.hrl
+++ b/src/couch_mrview/include/couch_mrview.hrl
@@ -72,6 +72,7 @@
     stale = false,
     inclusive_end = true,
     include_docs = false,
+    doc_options = [],
     update_seq=false,
     conflicts,
     callback,

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ca41964b/src/couch_mrview/src/couch_mrview_http.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview/src/couch_mrview_http.erl b/src/couch_mrview/src/couch_mrview_http.erl
index 8b914ef..7b92034 100644
--- a/src/couch_mrview/src/couch_mrview_http.erl
+++ b/src/couch_mrview/src/couch_mrview_http.erl
@@ -348,6 +348,22 @@ parse_qs(Key, Val, Args) ->
             Args#mrargs{inclusive_end=parse_boolean(Val)};
         "include_docs" ->
             Args#mrargs{include_docs=parse_boolean(Val)};
+        "attachments" ->
+            case parse_boolean(Val) of
+            true ->
+                Opts = Args#mrargs.doc_options,
+                Args#mrargs{doc_options=[attachments|Opts]};
+            false ->
+                Args
+            end;
+        "att_encoding_info" ->
+            case parse_boolean(Val) of
+            true ->
+                Opts = Args#mrargs.doc_options,
+                Args#mrargs{doc_options=[att_encoding_info|Opts]};
+            false ->
+                Args
+            end;
         "update_seq" ->
             Args#mrargs{update_seq=parse_boolean(Val)};
         "conflicts" ->

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ca41964b/src/couch_mrview/src/couch_mrview_util.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview/src/couch_mrview_util.erl b/src/couch_mrview/src/couch_mrview_util.erl
index 18185af..a3b0581 100644
--- a/src/couch_mrview/src/couch_mrview_util.erl
+++ b/src/couch_mrview/src/couch_mrview_util.erl
@@ -668,24 +668,24 @@ expand_dups([KV | Rest], Acc) ->
 
 maybe_load_doc(_Db, _DI, #mrargs{include_docs=false}) ->
     [];
-maybe_load_doc(Db, #doc_info{}=DI, #mrargs{conflicts=true}) ->
-    doc_row(couch_index_util:load_doc(Db, DI, [conflicts]));
-maybe_load_doc(Db, #doc_info{}=DI, _Args) ->
-    doc_row(couch_index_util:load_doc(Db, DI, [])).
+maybe_load_doc(Db, #doc_info{}=DI, #mrargs{conflicts=true, doc_options=Opts}) ->
+    doc_row(couch_index_util:load_doc(Db, DI, [conflicts]), Opts);
+maybe_load_doc(Db, #doc_info{}=DI, #mrargs{doc_options=Opts}) ->
+    doc_row(couch_index_util:load_doc(Db, DI, []), Opts).
 
 
 maybe_load_doc(_Db, _Id, _Val, #mrargs{include_docs=false}) ->
     [];
-maybe_load_doc(Db, Id, Val, #mrargs{conflicts=true}) ->
-    doc_row(couch_index_util:load_doc(Db, docid_rev(Id, Val), [conflicts]));
-maybe_load_doc(Db, Id, Val, _Args) ->
-    doc_row(couch_index_util:load_doc(Db, docid_rev(Id, Val), [])).
+maybe_load_doc(Db, Id, Val, #mrargs{conflicts=true, doc_options=Opts}) ->
+    doc_row(couch_index_util:load_doc(Db, docid_rev(Id, Val), [conflicts]), Opts);
+maybe_load_doc(Db, Id, Val, #mrargs{doc_options=Opts}) ->
+    doc_row(couch_index_util:load_doc(Db, docid_rev(Id, Val), []), Opts).
 
 
-doc_row(null) ->
+doc_row(null, _Opts) ->
     [{doc, null}];
-doc_row(Doc) ->
-    [{doc, couch_doc:to_json_obj(Doc, [])}].
+doc_row(Doc, Opts) ->
+    [{doc, couch_doc:to_json_obj(Doc, Opts)}].
 
 
 docid_rev(Id, {Props}) ->

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ca41964b/src/couchdb/couch_changes.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_changes.erl b/src/couchdb/couch_changes.erl
index 85c9e54..6edde32 100644
--- a/src/couchdb/couch_changes.erl
+++ b/src/couchdb/couch_changes.erl
@@ -29,6 +29,7 @@
     resp_type,
     limit,
     include_docs,
+    doc_options,
     conflicts,
     timeout,
     timeout_fun
@@ -272,6 +273,7 @@ start_sending_changes(Callback, UserAcc, ResponseType) ->
 build_acc(Args, Callback, UserAcc, Db, StartSeq, Prepend, Timeout, TimeoutFun) ->
     #changes_args{
         include_docs = IncludeDocs,
+        doc_options = DocOpts,
         conflicts = Conflicts,
         limit = Limit,
         feed = ResponseType,
@@ -287,6 +289,7 @@ build_acc(Args, Callback, UserAcc, Db, StartSeq, Prepend, Timeout, TimeoutFun) -
         resp_type = ResponseType,
         limit = Limit,
         include_docs = IncludeDocs,
+        doc_options = DocOpts,
         conflicts = Conflicts,
         timeout = Timeout,
         timeout_fun = TimeoutFun
@@ -498,7 +501,12 @@ changes_row(Results, DocInfo, Acc) ->
     #doc_info{
         id = Id, high_seq = Seq, revs = [#rev_info{deleted = Del} | _]
     } = DocInfo,
-    #changes_acc{db = Db, include_docs = IncDoc, conflicts = Conflicts} = Acc,
+    #changes_acc{
+        db = Db,
+        include_docs = IncDoc,
+        doc_options = DocOpts,
+        conflicts = Conflicts
+    } = Acc,
     {[{<<"seq">>, Seq}, {<<"id">>, Id}, {<<"changes">>, Results}] ++
         deleted_item(Del) ++ case IncDoc of
             true ->
@@ -508,8 +516,10 @@ changes_row(Results, DocInfo, Acc) ->
                 end,
                 Doc = couch_index_util:load_doc(Db, DocInfo, Opts),
                 case Doc of
-                    null -> [{doc, null}];
-                    _ ->  [{doc, couch_doc:to_json_obj(Doc, [])}]
+                    null ->
+                        [{doc, null}];
+                    _ ->
+                        [{doc, couch_doc:to_json_obj(Doc, DocOpts)}]
                 end;
             false ->
                 []

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ca41964b/src/couchdb/couch_db.hrl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_db.hrl b/src/couchdb/couch_db.hrl
index 4036934..6888f10 100644
--- a/src/couchdb/couch_db.hrl
+++ b/src/couchdb/couch_db.hrl
@@ -219,6 +219,7 @@
 
     view_type = nil,
     include_docs = false,
+    doc_options = [],
     conflicts = false,
     stale = false,
     multi_get = false,
@@ -269,6 +270,7 @@
     filter_fun,
     filter_args = [],
     include_docs = false,
+    doc_options = [],
     conflicts = false,
     db_open_options = []
 }).

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ca41964b/src/couchdb/couch_httpd_db.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl
index f5fe483..0a7c17c 100644
--- a/src/couchdb/couch_httpd_db.erl
+++ b/src/couchdb/couch_httpd_db.erl
@@ -1141,6 +1141,12 @@ parse_changes_query(Req, Db) ->
             Args#changes_args{timeout=list_to_integer(Value)};
         {"include_docs", "true"} ->
             Args#changes_args{include_docs=true};
+        {"attachments", "true"} ->
+            Opts = Args#changes_args.doc_options,
+            Args#changes_args{doc_options=[attachments|Opts]};
+        {"att_encoding_info", "true"} ->
+            Opts = Args#changes_args.doc_options,
+            Args#changes_args{doc_options=[att_encoding_info|Opts]};
         {"conflicts", "true"} ->
             Args#changes_args{conflicts=true};
         {"filter", _} ->

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ca41964b/test/etap/073-changes.t
----------------------------------------------------------------------
diff --git a/test/etap/073-changes.t b/test/etap/073-changes.t
index 845cd79..d632c2f 100755
--- a/test/etap/073-changes.t
+++ b/test/etap/073-changes.t
@@ -34,6 +34,7 @@
     filter_fun,
     filter_args = [],
     include_docs = false,
+    doc_options = [],
     conflicts = false,
     db_open_options = []
 }).


[12/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
taking changes from 1.2 to stop service


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/f75b8ab5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/f75b8ab5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/f75b8ab5

Branch: refs/heads/1744-single-config-file
Commit: f75b8ab53a1868ad2c87a314059226efab018ded
Parents: 862d8ae
Author: dileepbapat <di...@gmail.com>
Authored: Tue May 14 18:08:08 2013 +0530
Committer: Dave Cottlehuber <dc...@apache.org>
Committed: Tue Dec 3 20:35:19 2013 +0100

----------------------------------------------------------------------
 bin/couchdb.tpl.in | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f75b8ab5/bin/couchdb.tpl.in
----------------------------------------------------------------------
diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in
index 6ebacf4..538ebcb 100644
--- a/bin/couchdb.tpl.in
+++ b/bin/couchdb.tpl.in
@@ -304,6 +304,10 @@ stop_couchdb () {
     PID=`_get_pid`
     STOP_TIMEOUT=60
     if test -n "$PID"; then
+        if test "$1" = "false"; then
+            echo > $PID_FILE
+        fi
+
         if kill -0 $PID 2> /dev/null; then
             if kill -TERM $PID 2> /dev/null; then
                 count=0


[37/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton: Improvements and fixes


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/0f373588
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/0f373588
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/0f373588

Branch: refs/heads/1744-single-config-file
Commit: 0f3735887b80d6e057abade2703c99f81cd92ca5
Parents: 6f5580a
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Dec 10 17:41:20 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Dec 10 17:42:58 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/databases/views.js       | 1 -
 src/fauxton/app/modules/documents/views.js       | 4 ++--
 src/fauxton/app/templates/documents/sidebar.html | 1 +
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/0f373588/src/fauxton/app/modules/databases/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/views.js b/src/fauxton/app/modules/databases/views.js
index 5d46cd3..7d59ac4 100644
--- a/src/fauxton/app/modules/databases/views.js
+++ b/src/fauxton/app/modules/databases/views.js
@@ -111,7 +111,6 @@ function(app, Components, FauxtonAPI, Databases) {
         dbLimit: this.dbLimit,
         el: "input.search-query",
         onUpdate: function (item) {
-          console.log('boom', item);
           that.switchDatabase(null, item);
         }
       });

http://git-wip-us.apache.org/repos/asf/couchdb/blob/0f373588/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index b621e50..83f8e55 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -976,7 +976,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
 
       if (typeof(options.hasReduce) === 'undefined') {
         this.hasReduce = true;
-        console.log('set true');
       } else {
         this.hasReduce = options.hasReduce;
       }
@@ -1126,6 +1125,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
       this.ddocName = options.ddocName;
       this.database = options.database;
       this.listenTo(this.collection, 'add', this.ddocAdded);
+      this.DocModel = options.DocModel || Documents.Doc;
     },
 
     ddocAdded: function (ddoc) {
@@ -1159,7 +1159,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
           views: {},
           language: "javascript"
         };
-        return new Documents.Doc(doc, {database: this.database});
+        return new this.DocModel(doc, {database: this.database});
       } else {
         var ddocName = this.$('#ddoc').val();
         return this.collection.find(function (ddoc) {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/0f373588/src/fauxton/app/templates/documents/sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/sidebar.html b/src/fauxton/app/templates/documents/sidebar.html
index 4becf93..8fccc09 100644
--- a/src/fauxton/app/templates/documents/sidebar.html
+++ b/src/fauxton/app/templates/documents/sidebar.html
@@ -63,5 +63,6 @@ the License.
       <li><a id="new-view" href="#<%= database.url('app') %>/new_view" class="new"><i class="icon-plus"></i> New</a></li>
       <% } %>
     </ul>
+    <div id="extension-navs"></div>
   </nav>
 </div>


[32/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton copy tweaks
Fixed init caps on Add New Databases
Wwitched Add to New in Doc dropdown
Also (accordingly) switched "New doc" and
"New view" to "Document" and "Secondary Index"
accordingly.
tweaked Create/Edit Index labels
%s/Advanced Options/Query Options
empty tasks list just says No tasks
currentView was not being populated. Could come
back when it works.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/6c71f2c2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/6c71f2c2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/6c71f2c2

Branch: refs/heads/1744-single-config-file
Commit: 6c71f2c22891ecb80225d779a810f3dc14fb72e7
Parents: 4f557a2
Author: BigBlueHat <by...@bigbluehat.com>
Authored: Thu Dec 5 15:53:18 2013 -0500
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Dec 10 10:25:22 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/addons/activetasks/templates/table.html     | 2 +-
 src/fauxton/app/templates/databases/newdatabase.html        | 2 +-
 src/fauxton/app/templates/documents/all_docs_layout.html    | 2 +-
 .../app/templates/documents/design_doc_selector.html        | 2 +-
 src/fauxton/app/templates/documents/sidebar.html            | 6 +++---
 src/fauxton/app/templates/documents/view_editor.html        | 9 ++++-----
 6 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6c71f2c2/src/fauxton/app/addons/activetasks/templates/table.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/activetasks/templates/table.html b/src/fauxton/app/addons/activetasks/templates/table.html
index ee88e75..885cb47 100644
--- a/src/fauxton/app/addons/activetasks/templates/table.html
+++ b/src/fauxton/app/addons/activetasks/templates/table.html
@@ -29,7 +29,7 @@ the License.
 <% if (collection.length === 0){%>
    <tr> 
     <td>
-      <p>There are no active tasks for <%=currentView%> right now.</p>
+      <p>No tasks.</p>
     </td>
   </tr>
 <%}else{%>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6c71f2c2/src/fauxton/app/templates/databases/newdatabase.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/databases/newdatabase.html b/src/fauxton/app/templates/databases/newdatabase.html
index a39cd74..b357e0b 100644
--- a/src/fauxton/app/templates/databases/newdatabase.html
+++ b/src/fauxton/app/templates/databases/newdatabase.html
@@ -12,6 +12,6 @@ License for the specific language governing permissions and limitations under
 the License.
 -->
 
-<a class="button new" id="new"><i class="icon fonticon-new-database"></i>Add new database</a>
+<a class="button new" id="new"><i class="icon fonticon-new-database"></i>Add New Database</a>
 
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6c71f2c2/src/fauxton/app/templates/documents/all_docs_layout.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/all_docs_layout.html b/src/fauxton/app/templates/documents/all_docs_layout.html
index 785937e..526c200 100644
--- a/src/fauxton/app/templates/documents/all_docs_layout.html
+++ b/src/fauxton/app/templates/documents/all_docs_layout.html
@@ -12,7 +12,7 @@ License for the specific language governing permissions and limitations under
 the License.
 -->
 <ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">
-  <li><a id="toggle-query" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Index Options</a></li>
+  <li><a id="toggle-query" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Query Options</a></li>
 </ul>
 <div class="tab-content">
   <div class="tab-pane" id="query">

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6c71f2c2/src/fauxton/app/templates/documents/design_doc_selector.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/design_doc_selector.html b/src/fauxton/app/templates/documents/design_doc_selector.html
index 0cd6bdf..457b76c 100644
--- a/src/fauxton/app/templates/documents/design_doc_selector.html
+++ b/src/fauxton/app/templates/documents/design_doc_selector.html
@@ -12,7 +12,7 @@ License for the specific language governing permissions and limitations under
 the License.
 -->
 <div class="span3">
-  <label for="ddoc">Design document <a href="<%=getDocUrl('design_doc')%>" target="_blank"><i class="icon-question-sign"></i></a></label>
+  <label for="ddoc">Save to Design Document <a href="<%=getDocUrl('design_doc')%>" target="_blank"><i class="icon-question-sign"></i></a></label>
   <select id="ddoc">
     <optgroup label="Select a document">
       <option id="new-doc">New document</option>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6c71f2c2/src/fauxton/app/templates/documents/sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/sidebar.html b/src/fauxton/app/templates/documents/sidebar.html
index 336946d..4becf93 100644
--- a/src/fauxton/app/templates/documents/sidebar.html
+++ b/src/fauxton/app/templates/documents/sidebar.html
@@ -33,17 +33,17 @@ the License.
 
       <div class="btn-group">
         <button class="btn dropdown-toggle dropdown-toggle-btn" data-toggle="dropdown">
-          Add
+          New
           <span class="caret"></span>
         </button>
         <ul class="dropdown-menu">
           <!-- dropdown menu links -->
           <li>
-          <a id="doc" href="#<%= database.url('app') %>/new">New doc</a>
+          <a id="doc" href="#<%= database.url('app') %>/new">Document</a>
           </li>
           <% if (showNewView) { %>
           <li>
-          <a href="#<%= database.url('app') %>/new_view">New view</a>
+          <a href="#<%= database.url('app') %>/new_view">Secondary Index</a>
           </li>
           <% } %>
         </ul>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6c71f2c2/src/fauxton/app/templates/documents/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index cd53fc7..8865625 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -46,20 +46,19 @@ the License.
 
 
           <div class="control-group">
-            <label for="reduce-function-selector">Reduce function <a href="<%=getDocUrl('reduce_functions')%>" target="_blank"><i class="icon-question-sign"></i></a></label>
+            <label for="reduce-function-selector">Reduce (optional) <a href="<%=getDocUrl('reduce_functions')%>" target="_blank"><i class="icon-question-sign"></i></a></label>
 
             <select id="reduce-function-selector">
               <option value="" <%= !reduceFunStr ? 'selected="selected"' : '' %>>None</option>
               <% _.each(["_sum", "_count", "_stats"], function(reduce) { %>
               <option value="<%= reduce %>" <% if (reduce == reduceFunStr) { %>selected<% } %>><%= reduce %></option>
               <% }) %>
-              <option value="CUSTOM" <% if (isCustomReduce) { %>selected<% } %>>Custom reduce</option>
+              <option value="CUSTOM" <% if (isCustomReduce) { %>selected<% } %>>Custom Reduce function</option>
             </select>
-            <span class="help-block">Reduce functions are optional.</span>
           </div>
 
           <div class="control-group reduce-function">
-            <label for="reduce-function">Custom Reduce</label>
+            <label for="reduce-function">Custom Reduce function</label>
             <% if (newView) { %>
             <div class="js-editor" id="reduce-function"><%= langTemplates.reduce %></div>
             <% } else { %>
@@ -68,7 +67,7 @@ the License.
           </div>
 
           <div class="control-group">
-            <button class="button green save fonticon-circle-check">Save</button>
+            <button class="button green save fonticon-circle-check">Save &amp; Build Index</button>
             <button class="button btn-info preview">Preview</button>
             <% if (!newView) { %>
             <button class="button delete outlineGray fonticon-circle-x">Delete</button>


[36/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
remove initialize


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/204551c2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/204551c2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/204551c2

Branch: refs/heads/1744-single-config-file
Commit: 204551c220f7bfecd8a7c000ef22cfd94e4fe46b
Parents: 9eb2629
Author: suelockwood <de...@apache.org>
Authored: Thu Dec 5 15:06:17 2013 -0500
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Dec 10 17:42:58 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/initialize.js | 33 ---------------------------------
 1 file changed, 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/204551c2/src/fauxton/app/initialize.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/initialize.js b/src/fauxton/app/initialize.js
deleted file mode 100644
index ebba91c..0000000
--- a/src/fauxton/app/initialize.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-/*
- * ::WARNING::
- * THIS IS A GENERATED FILE. DO NOT EDIT.
- */
-
-
-define([],
-function() {
-  // Provide a global location to place configuration settings and module
-  // creation.
-  var app = {
-    // The root path to run the application.
-    root: "/",
-    version: "1.0.dev",
-    // Host is used as prefix for urls
-    host: "../.." ,
-  };
-
-  return app; 
-});
-


[26/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Update jquery.couch docstrings. Fix few typos.

References to CouchBase docs were broken anyway.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/3097e8cd
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/3097e8cd
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/3097e8cd

Branch: refs/heads/1744-single-config-file
Commit: 3097e8cdd53cff91c4401863a6197c5d4ce9dd86
Parents: fffc790
Author: Alexander Shorin <kx...@apache.org>
Authored: Sun Dec 8 18:36:59 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Sun Dec 8 18:36:59 2013 +0400

----------------------------------------------------------------------
 share/www/script/jquery.couch.js | 174 +++++++++++++++-------------------
 1 file changed, 78 insertions(+), 96 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/3097e8cd/share/www/script/jquery.couch.js
----------------------------------------------------------------------
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
index 6abac2c..b7e36f9 100644
--- a/share/www/script/jquery.couch.js
+++ b/share/www/script/jquery.couch.js
@@ -64,9 +64,8 @@
      * You can obtain a list of active tasks by using the /_active_tasks URL.
      * The result is a JSON array of the currently running tasks, with each task
      * being described with a single object.
-     * @see <a href="http://techzone.couchbase.com/sites/default/files/uploads/
-     * all/documentation/couchbase-api-misc.html#couchbase-api-misc_active-task
-     * s_get">docs for /_active_tasks</a>
+     * @see <a href="http://docs.couchdb.org/en/latest/api/server/common.html#
+     * active-tasks">docs for /_active_tasks</a>
      * @param {ajaxSettings} options <a href="http://api.jquery.com/jQuery.ajax
      * /#jQuery-ajax-settings">jQuery ajax settings</a>
      */
@@ -80,9 +79,8 @@
 
     /**
      * Returns a list of all the databases in the CouchDB instance
-     * @see <a href="http://techzone.couchbase.com/sites/default/files/uploads/
-     * all/documentation/couchbase-api-misc.html#couchbase-api-misc_active-task
-     * s_get">docs for /_all_dbs</a>
+     * @see <a href="http://docs.couchdb.org/en/latest/api/server/common.html
+     * #all-dbs">docs for /_all_dbs</a>
      * @param {ajaxSettings} options <a href="http://api.jquery.com/jQuery.ajax
      * /#jQuery-ajax-settings">jQuery ajax settings</a>
      */
@@ -99,9 +97,8 @@
      * parameter the entire config is returned, you can be more specific by
      * passing the section and option parameters, if you specify a value that
      * value will be stored in the configuration.
-     * @see <a href="http://techzone.couchbase.com/sites/default/files/uploads/
-     * all/documentation/couchbase-api-config.html#couchbase-api-config_config
-     * -section-key_put">docs for /_config</a>
+     * @see <a href="http://docs.couchdb.org/en/latest/api/server
+     * /configuration.html#config-section-key">docs for /_config</a>
      * @param {ajaxSettings} options
      * <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
      * jQuery ajax settings</a>
@@ -118,7 +115,7 @@
         }
       }
       if (value === null) {
-        req.type = "DELETE";        
+        req.type = "DELETE";
       } else if (value !== undefined) {
         req.type = "PUT";
         req.data = toJSON(value);
@@ -130,9 +127,11 @@
         "An error occurred retrieving/updating the server configuration"
       );
     },
-    
+
     /**
      * Returns the session information for the currently logged in user.
+     * @see <a href="http://docs.couchdb.org/en/latest/api/server/authn.html
+     * #get--_session">docs for GET /_session</a>
      * @param {ajaxSettings} options
      * <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
      * jQuery ajax settings</a>
@@ -180,7 +179,7 @@
      * <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
       * jQuery ajax settings</a>
      */
-    signup: function(user_doc, password, options) {      
+    signup: function(user_doc, password, options) {
       options = options || {};
       user_doc.password = password;
       user_doc.roles =  user_doc.roles || [];
@@ -196,6 +195,8 @@
     /**
      * Authenticate against CouchDB, the <code>options</code> parameter is
       *expected to have <code>name</code> and <code>password</code> fields.
+     * @see <a href="http://docs.couchdb.org/en/latest/api/server/authn.html
+     * #post--_session">docs for POST /_session</a>
      * @param {ajaxSettings} options
      * <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
      * jQuery ajax settings</a>
@@ -224,6 +225,8 @@
 
     /**
      * Delete your current CouchDB user session
+     * @see <a href="http://docs.couchdb.org/en/latest/api/server/authn.html
+     * #delete--_session">docs for DELETE /_session</a>
      * @param {ajaxSettings} options
      * <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
      * jQuery ajax settings</a>
@@ -278,16 +281,15 @@
             return true;
           }
         }
-      };
+      }
       return /** @lends $.couch.db */{
         name: name,
         uri: this.urlPrefix + "/" + encodeURIComponent(name) + "/",
 
         /**
          * Request compaction of the specified database.
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db_
-         * db-compact_post">docs for /db/_compact</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/database
+         * /compact.html#db-compact">docs for /db/_compact</a>
          * @param {ajaxSettings} options
          * <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
          * jQuery ajax settings</a>
@@ -305,9 +307,8 @@
 
         /**
          * Cleans up the cached view output on disk for a given view.
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db
-         * _db-view-cleanup_post">docs for /db/_compact</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/database
+         * /compact.html#db-view-cleanup">docs for /db/_view_cleanup</a>
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
          */
@@ -327,9 +328,9 @@
          * document. You can use this in place of the full database compaction
          * if you know a specific set of view indexes have been affected by a
          * recent database change.
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/upl
-         * oads/all/documentation/couchbase-api-db.html#couchbase-api-db_db-
-         * compact-design-doc_post">docs for /db/_compact/design-doc</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/database
+         * /compact.html#db-compact-design-doc">
+         * docs for /db/_compact/design-doc</a>
          * @param {String} groupname Name of design-doc to compact
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
@@ -347,9 +348,8 @@
 
         /**
          * Create a new database
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db_
-         * db_put">docs for PUT /db/</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/database
+         * /common.html#put--db">docs for PUT /db/</a>
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
          */
@@ -367,9 +367,8 @@
         /**
          * Deletes the specified database, and all the documents and
          * attachments contained within it.
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db_
-         * db_delete">docs for DELETE /db/</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/database
+         * /common.html#delete--db">docs for DELETE /db/</a>
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
          */
@@ -383,9 +382,8 @@
 
         /**
          * Gets information about the specified database.
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db
-         * _db_get">docs for GET /db/</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/database
+         * /common.html#get--db">docs for GET /db/</a>
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
          */
@@ -417,9 +415,8 @@
             promise = /** @lends $.couch.db.changes */ {
               /**
                * Add a listener callback
-               * @see <a href="http://techzone.couchbase.com/sites/default/
-               * files/uploads/all/documentation/couchbase-api-db.html#couch
-               * base-api-db_db-changes_get">docs for /db/_changes</a>
+               * @see <a href="http://docs.couchdb.org/en/latest/api/database
+               * /changes.html#db-changes">docs for /db/_changes</a>
                * @param {Function} fun Callback function to run when
                * notified of changes.
                */
@@ -438,7 +435,7 @@
             $.each(listeners, function() {
               this(resp);
             });
-          };
+          }
           // when there is a change, call any listeners, then check for
           // another change
           options.success = function(resp) {
@@ -447,7 +444,7 @@
               since = resp.last_seq;
               triggerListeners(resp);
               getChangesSince();
-            };
+            }
           };
           options.error = function() {
             if (active) {
@@ -486,9 +483,8 @@
          * fetch by passing the <code>keys</code> field in the
          * <code>options</code>
          * parameter.
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db_
-         * db-all-docs_get">docs for /db/all_docs/</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/database
+         * /bulk-api.html#db-all-docs">docs for /db/all_docs/</a>
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
          */
@@ -560,9 +556,8 @@
 
         /**
          * Returns the specified doc from the specified db.
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-dbdoc.html#couchbase-api-
-         * dbdoc_db-doc_get">docs for GET /db/doc</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/document
+         * /common.html#get--db-docid">docs for GET /db/doc</a>
          * @param {String} docId id of document to fetch
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
@@ -605,9 +600,8 @@
          * field, then the document will be created with the specified document
          * ID. If the _id field is not specified, a new unique ID will be
          * generated.
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-dbdoc.html#couchbase-api-
-         * dbdoc_db_post">docs for GET /db/doc</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/document
+         * /common.html#put--db-docid">docs for PUT /db/doc</a>
          * @param {String} doc document to save
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
@@ -656,9 +650,8 @@
 
         /**
          * Save a list of documents
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db_
-         * db-bulk-docs_post">docs for /db/_bulk_docs</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/database
+         * /bulk-api.html#db-bulk-docs">docs for /db/_bulk_docs</a>
          * @param {Object[]} docs List of documents to save
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
@@ -680,9 +673,8 @@
          * Deletes the specified document from the database. You must supply
          * the current (latest) revision and <code>id</code> of the document
          * to delete eg <code>removeDoc({_id:"mydoc", _rev: "1-2345"})</code>
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-dbdoc.html#couchbase-api
-         * -dbdoc_db-doc_delete">docs for DELETE /db/doc</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/document
+         * /common.html#delete--db-docid">docs for DELETE /db/doc</a>
          * @param {Object} doc Document to delete
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
@@ -701,9 +693,8 @@
 
         /**
          * Remove a set of documents
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db_
-         * db-bulk-docs_post">docs for /db/_bulk_docs</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/database
+         * /bulk-api.html#db-bulk-docs">docs for /db/_bulk_docs</a>
          * @param {String[]} docs List of document id's to remove
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
@@ -728,13 +719,12 @@
         /**
          * The COPY command (which is non-standard HTTP) copies an existing
          * document to a new or existing document.
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-dbdoc.html#couchbase-api-
-         * dbdoc_db-doc_copy">docs for COPY /db/doc</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/document
+         * /common.html#copy--db-docid">docs for COPY /db/doc</a>
          * @param {String[]} docId document id to copy
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
-         * @param {ajaxSettings} options <a href="http://api.jquery.com/
+         * @param {ajaxSettings} ajaxOptions <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
          */
         copyDoc: function(docId, options, ajaxOptions) {
@@ -763,12 +753,11 @@
         /**
          * Creates (and executes) a temporary view based on the view function
          * supplied in the JSON request.
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db
-         * _db-temp-view_post">docs for /db/_temp_view</a>
+         * @see <a href="http://docs.couchdb.org/en/latest/api/database
+         * /temp-views.html#db-temp-view">docs for /db/_temp_view</a>
          * @param {Function} mapFun Map function
          * @param {Function} reduceFun Reduce function
-         * @param {Function} language Language the map / reduce funs are
+         * @param {String} language Language the map / reduce funs are
          * implemented in
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
@@ -798,16 +787,16 @@
 
         /**
          * Fetch a _list view output, you can specify a list of
-         * <code>keys</code> in the options object to recieve only those keys.
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-design.html#couchbase-api
-         * -design_db-design-designdoc-list-listname-viewname_get">
-         * docs for /db/_design/design-doc/_list/l1/v1</a>
+         * <code>keys</code> in the options object to receive only those keys.
+         * @see <a href="http://docs.couchdb.org/en/latest/api/ddoc/render.html
+         * #db-design-design-doc-list-list-name-view-name">
+         * docs for /db/_design/design-doc/_list/list/view</a>
          * @param {String} list Listname in the form of ddoc/listname
          * @param {String} view View to run list against
-         * @param {options} CouchDB <a href="http://wiki.apache.org/couchdb/
-         * HTTP_view_API">View Options</a>
-         * @param {ajaxSettings} options <a href="http://api.jquery.com/
+         * @param {Object} options CouchDB <a href="http://docs.couchdb.org/en
+         * /latest/api/ddoc/views.html#get--db-_design-ddoc-_view-view">
+         * View Options</a>
+         * @param {ajaxSettings} ajaxOptions <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
          */
         list: function(list, view, options, ajaxOptions) {
@@ -827,19 +816,18 @@
               url: this.uri + '_design/' + list[0] +
                    '/_list/' + list[1] + '/' + view + encodeOptions(options)
               },
-              ajaxOptions, 'An error occured accessing the list'
+              ajaxOptions, 'An error occurred accessing the list'
           );
         },
 
         /**
          * Executes the specified view-name from the specified design-doc
          * design document, you can specify a list of <code>keys</code>
-         * in the options object to recieve only those keys.
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api-design.html#couchbase-api-
-         * design_db-design-designdoc-view-viewname_get">docs for /db/
-         * _design/design-doc/_list/l1/v1</a>
-         * @param {String} name View to run list against (string should have 
+         * in the options object to receive only those keys.
+         * @see <a href="http://docs.couchdb.org/en/latest/api/ddoc/views.html
+         * #db-design-design-doc-view-view-name">docs for /db/
+         * _design/design-doc/_view/name</a>
+         * @param {String} name View to run list against (string should have
          * the design-doc name followed by a slash and the view name)
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
@@ -867,9 +855,7 @@
 
         /**
          * Fetch an arbitrary CouchDB database property
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api.html">docs for /db/_prop</a>
-         * @param {String} propName Propery name to fetch
+         * @param {String} propName Property name to fetch
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
          * @param {ajaxSettings} ajaxOptions <a href="http://api.jquery.com/
@@ -885,10 +871,8 @@
 
         /**
          * Set an arbitrary CouchDB database property
-         * @see <a href="http://techzone.couchbase.com/sites/default/files/
-         * uploads/all/documentation/couchbase-api.html">docs for /db/_prop</a>
-         * @param {String} propName Propery name to fetch
-         * @param {String} propValue Propery value to set
+         * @param {String} propName Property name to fetch
+         * @param {String} propValue Property value to set
          * @param {ajaxSettings} options <a href="http://api.jquery.com/
          * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
          * @param {ajaxSettings} ajaxOptions <a href="http://api.jquery.com/
@@ -896,7 +880,7 @@
          */
         setDbProperty: function(propName, propValue, options, ajaxOptions) {
           ajax({
-            type: "PUT", 
+            type: "PUT",
             url: this.uri + propName + encodeOptions(options),
             data : JSON.stringify(propValue)
           },
@@ -908,15 +892,15 @@
       };
     },
 
-    encodeDocId: encodeDocId, 
+    encodeDocId: encodeDocId,
 
     /**
      * Accessing the root of a CouchDB instance returns meta information about
      * the instance. The response is a JSON structure containing information
      * about the server, including a welcome message and the version of the
      * server.
-     * @see <a href="http://techzone.couchbase.com/sites/default/files/uploads/
-     * all/documentation/couchbase-api-misc.html#couchbase-api-misc_root_get">
+     * @see <a href="http://docs.couchdb.org/en/latest/api/server/common.html
+     * #api-server-root">
      * docs for GET /</a>
      * @param {ajaxSettings} options <a href="http://api.jquery.com/
      * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
@@ -931,9 +915,8 @@
 
     /**
      * Request, configure, or stop, a replication operation.
-     * @see <a href="http://techzone.couchbase.com/sites/default/files/
-     * uploads/all/documentation/couchbase-api-misc.html#couchbase-api-
-     * misc_replicate_post">docs for POST /_replicate</a>
+     * @see <a href="http://docs.couchdb.org/en/latest/api/server/common.html
+     * #replicate">docs for POST /_replicate</a>
      * @param {String} source Path or url to source database
      * @param {String} target Path or url to target database
      * @param {ajaxSettings} ajaxOptions <a href="http://api.jquery.com/
@@ -957,10 +940,9 @@
 
     /**
      * Fetch a new UUID
-     * @see <a href="http://techzone.couchbase.com/sites/default/files/
-     * uploads/all/documentation/couchbase-api-misc.html#couchbase-api-
-     * misc_uuids_get">docs for /_uuids</a>
-     * @param {Int} cacheNum Number of uuids to keep cached for future use
+     * @see <a href="http://docs.couchdb.org/en/latest/api/server/common.html
+     * #uuids">docs for /_uuids</a>
+     * @param {Integer} cacheNum Number of uuids to keep cached for future use
      */
     newUUID: function(cacheNum) {
       if (cacheNum === undefined) {
@@ -1045,7 +1027,7 @@
         xhr.setRequestHeader("X-Couch-Full-Commit", commit.toString());
       };
     }
-  };
+  }
 
   /**
    * @private


[02/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fix whitespace


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/bae0b273
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/bae0b273
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/bae0b273

Branch: refs/heads/1744-single-config-file
Commit: bae0b2730c2155c5b5f2106da273e51b71d32280
Parents: ca41964
Author: Klaus Trainer <kl...@posteo.de>
Authored: Thu Nov 28 17:40:19 2013 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Nov 28 22:59:13 2013 +0000

----------------------------------------------------------------------
 src/couch_mrview/src/couch_mrview_util.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/bae0b273/src/couch_mrview/src/couch_mrview_util.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview/src/couch_mrview_util.erl b/src/couch_mrview/src/couch_mrview_util.erl
index a3b0581..c4272f8 100644
--- a/src/couch_mrview/src/couch_mrview_util.erl
+++ b/src/couch_mrview/src/couch_mrview_util.erl
@@ -540,7 +540,7 @@ delete_index_file(DbName, Sig) ->
 
 delete_compaction_file(DbName, Sig) ->
     delete_file(compaction_file(DbName, Sig)).
-    
+
 
 delete_file(FName) ->
     case filelib:is_file(FName) of


[40/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton: Add extension to new doc/index section


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/6bb810f4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/6bb810f4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/6bb810f4

Branch: refs/heads/1744-single-config-file
Commit: 6bb810f4a50ae8015b717d61c91073becde547dc
Parents: 936edf8
Author: Garren Smith <ga...@gmail.com>
Authored: Thu Dec 12 17:35:19 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Thu Dec 12 17:35:19 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js       | 2 ++
 src/fauxton/app/templates/documents/sidebar.html | 3 +++
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6bb810f4/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 49c443d..cac4f48 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1657,6 +1657,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
 
     serialize: function() {
       var docLinks = FauxtonAPI.getExtensions('docLinks'),
+          newLinks = FauxtonAPI.getExtensions('sidebar:newLinks'),
           addLinks = FauxtonAPI.getExtensions('sidebar:links'),
           extensionList = FauxtonAPI.getExtensions('sidebar:list');
       return {
@@ -1668,6 +1669,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         docLinks: docLinks,
         docLimit: Databases.DocLimit,
         addLinks: addLinks,
+        newLinks: newLinks,
         extensionList: extensionList > 0
       };
     },

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6bb810f4/src/fauxton/app/templates/documents/sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/sidebar.html b/src/fauxton/app/templates/documents/sidebar.html
index 156398d..8a73ae9 100644
--- a/src/fauxton/app/templates/documents/sidebar.html
+++ b/src/fauxton/app/templates/documents/sidebar.html
@@ -43,6 +43,9 @@ the License.
           </li>
           <li>
           <a href="#<%= database.url('app') %>/new_view">Secondary Index</a>
+           <% _.each(newLinks, function (item) { %>
+           <a href="#<%= database.url('app') %>/<%=item.url%>"> <%= item.name %></a>
+           <% }); %>
           </li>
         </ul>
       </div>


[41/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
add Fauxton release info


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/391bbe19
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/391bbe19
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/391bbe19

Branch: refs/heads/1744-single-config-file
Commit: 391bbe19fdd2d50ecb4f9006cf9c9fe988cacd56
Parents: 6bb810f
Author: Garren Smith <ga...@gmail.com>
Authored: Fri Dec 13 11:52:48 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Fri Dec 13 11:53:31 2013 +0200

----------------------------------------------------------------------
 src/fauxton/readme.md | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/391bbe19/src/fauxton/readme.md
----------------------------------------------------------------------
diff --git a/src/fauxton/readme.md b/src/fauxton/readme.md
index 2ee3293..1cc59ab 100644
--- a/src/fauxton/readme.md
+++ b/src/fauxton/readme.md
@@ -31,6 +31,11 @@ A recent of [node.js](http://nodejs.org/) and npm is required.
     # Install all dependencies
     npm install
 
+### Dev Server
+    Using the dev server is the easiest way to use fauxton, specially when developing for it.
+
+    grunt dev
+
 #### (Optional) To avoid a npm global install
     # Add node_modules/.bin to your path
     # export PATH=./node_modules/.bin:$PATH
@@ -42,10 +47,12 @@ A recent of [node.js](http://nodejs.org/) and npm is required.
     # Or fully compiled install
     # ./bin/grunt couchdb
 
-### Dev Server
-    Using the dev server is the easiest way to use fauxton, specially when developing for it.
+### Prepare Fauxton Release
+    Follow the "Fauxton Setup" section then:
 
-    grunt dev
+    ./bin/grunt couchdb
+
+    This will install the latest version of Fauxton into `/share/www/fauxton`
 
 ### Running Tests
     There are two ways to run the tests. `grunt test` will run the tests via the commandline. It is also possible to view them via the url


[21/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Clean up app settings gen


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/72c78107
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/72c78107
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/72c78107

Branch: refs/heads/1744-single-config-file
Commit: 72c781076216107bf7bb1de6d17853ae0e784efb
Parents: 1ab2408
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Nov 27 13:15:28 2013 +0200
Committer: suelockwood <de...@apache.org>
Committed: Wed Dec 4 14:55:47 2013 -0500

----------------------------------------------------------------------
 src/fauxton/Gruntfile.js                 | 13 ++---
 src/fauxton/app/app.js                   | 71 +++++++++++++++++++--------
 src/fauxton/app/initialize.js            | 61 +++++------------------
 src/fauxton/app/initialize.js.underscore | 61 +++++------------------
 src/fauxton/settings.json.default        | 10 ++++
 src/fauxton/tasks/fauxton.js             | 65 +++++++++++++-----------
 6 files changed, 127 insertions(+), 154 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/72c78107/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index 5e6c56e..75fcc5d 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -326,11 +326,12 @@ module.exports = function(grunt) {
         src: "settings.json"
       }
     },
-    gen_initialize: {
+    gen_initialize: templateSettings,
+    /*gen_initialize: {
       "default": {
         src: "settings.json"
       }
-    },
+    },*/
 
     mkcouchdb: couch_config,
     rmcouchdb: couch_config,
@@ -405,7 +406,7 @@ module.exports = function(grunt) {
   grunt.registerTask('lint', ['clean', 'jshint']);
   grunt.registerTask('test', ['lint', 'mochaSetup','jst', 'concat:test_config_js', 'mocha_phantomjs']);
   // Fetch dependencies (from git or local dir), lint them and make load_addons
-  grunt.registerTask('dependencies', ['get_deps', 'gen_load_addons:default', "gen_initialize:default"]);
+  grunt.registerTask('dependencies', ['get_deps', 'gen_load_addons:default']);
   // build templates, js and css
   grunt.registerTask('build', ['less', 'concat:index_css', 'jst', 'requirejs', 'concat:requirejs', 'template:release']);
   // minify code and css, ready for release.
@@ -417,12 +418,12 @@ module.exports = function(grunt) {
   // dev server
   grunt.registerTask('dev', ['debugDev', 'couchserver']);
   // build a debug release
-  grunt.registerTask('debug', ['lint', 'dependencies', 'concat:requirejs','less', 'concat:index_css', 'template:development', 'copy:debug']);
-  grunt.registerTask('debugDev', ['clean', 'dependencies','jshint','less', 'concat:index_css', 'template:development', 'copy:debug']);
+  grunt.registerTask('debug', ['lint', 'dependencies', "gen_initialize:development", 'concat:requirejs','less', 'concat:index_css', 'template:development', 'copy:debug']);
+  grunt.registerTask('debugDev', ['clean', 'dependencies', "gen_initialize:development",'jshint','less', 'concat:index_css', 'template:development', 'copy:debug']);
 
   grunt.registerTask('watchRun', ['clean:watch', 'dependencies', 'jshint']);
   // build a release
-  grunt.registerTask('release', ['clean' ,'dependencies','jshint', 'build', 'minify', 'copy:dist']);
+  grunt.registerTask('release', ['clean' ,'dependencies', "gen_initialize:release", 'jshint', 'build', 'minify', 'copy:dist']);
 
   /*
    * Install into CouchDB in either debug, release, or couchapp mode

http://git-wip-us.apache.org/repos/asf/couchdb/blob/72c78107/src/fauxton/app/app.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/app.js b/src/fauxton/app/app.js
index ac3c0c4..0a51410 100644
--- a/src/fauxton/app/app.js
+++ b/src/fauxton/app/app.js
@@ -11,22 +11,27 @@
 // the License.
 
 define([
-  // Libraries.
+  // Application.
+  "initialize",
+
+  // Libraries
   "jquery",
   "lodash",
   "backbone",
+  "bootstrap",
 
   "helpers",
   "mixins",
 
-  // Plugins.
+   // Plugins.
   "plugins/backbone.layoutmanager",
   "plugins/jquery.form"
+
 ],
 
-function($, _, Backbone, Helpers, Mixins) {
+function(app, $, _, Backbone, Bootstrap, Helpers, Mixins) {
 
-  // Make sure we have a console.log
+   // Make sure we have a console.log
   if (typeof console == "undefined") {
     console = {
       log: function(){}
@@ -34,17 +39,47 @@ function($, _, Backbone, Helpers, Mixins) {
   }
 
   // Provide a global location to place configuration settings and module
-  // creation.
-  var app = {
-    // The root path to run the application.
-    root: "/",
-    version: "0.0.1",
+  // creation also mix in Backbone.Events
+  _.extend(app, Backbone.Events, {
     mixins: Mixins,
-    // move this to here otherwise every once in a while,
-    // the footer fails to configure as the url for it is not configured.
-    // Having the host declared here fixes it
-    host: window.location.protocol + "//" + window.location.host,
-  };
+
+    renderView: function(baseView, selector, view, options, callback) {
+      baseView.setView(selector, new view(options)).render().then(callback);
+    },
+
+    // Create a custom object with a nested Views object.
+    module: function(additionalProps) {
+      return _.extend({ Views: {} }, additionalProps);
+    },
+
+    // Thanks to: http://stackoverflow.com/a/2880929
+    getParams: function(queryString) {
+      if (queryString) {
+        // I think this could be combined into one if
+        if (queryString.substring(0,1) === "?") {
+          queryString = queryString.substring(1);
+        } else if (queryString.indexOf('?') > -1) {
+          queryString = queryString.split('?')[1];
+        }
+      }
+      var hash = window.location.hash.split('?')[1];
+      queryString = queryString || hash || window.location.search.substring(1);
+      var match,
+      urlParams = {},
+      pl     = /\+/g,  // Regex for replacing addition symbol with a space
+      search = /([^&=]+)=?([^&]*)/g,
+      decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
+      query  = queryString;
+
+      if (queryString) {
+        while ((match = search.exec(query))) {
+          urlParams[decode(match[1])] = decode(match[2]);
+        }
+      }
+
+      return urlParams;
+    }
+  });
 
   // Localize or create a new JavaScript Template object.
   var JST = window.JST = window.JST || {};
@@ -82,12 +117,6 @@ function($, _, Backbone, Helpers, Mixins) {
     }
   });
 
-  // Mix Backbone.Events, and modules into the app object.
-  return _.extend(app, {
-    // Create a custom object with a nested Views object.
-    module: function(additionalProps) {
-      return _.extend({ Views: {} }, additionalProps);
-    }
-  }, Backbone.Events);
 
+  return app;
 });

http://git-wip-us.apache.org/repos/asf/couchdb/blob/72c78107/src/fauxton/app/initialize.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/initialize.js b/src/fauxton/app/initialize.js
index e374352..7a4a1c1 100644
--- a/src/fauxton/app/initialize.js
+++ b/src/fauxton/app/initialize.js
@@ -10,61 +10,24 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-
 /*
  * ::WARNING::
  * THIS IS A GENERATED FILE. DO NOT EDIT.
  */
 
-define([
-  // Application.
-  "app",
-
-  // Libraries
-  "lodash",
-  "bootstrap"
-],
-
-function(app, _, Bootstrap) {
 
+define([],
+function() {
   // Provide a global location to place configuration settings and module
   // creation.
-  _.extend(app, {
-    // The root path to run the application through.
-    // TODO: pick this up wither at build time or from the browser
-    root: "/dashboard.beta/dashboard.assets/",
-
-    renderView: function(baseView, selector, view, options, callback) {
-      baseView.setView(selector, new view(options)).render().then(callback);
-    },
-
-    // Thanks to: http://stackoverflow.com/a/2880929
-    getParams: function(queryString) {
-      if (queryString) {
-        // I think this could be combined into one if
-        if (queryString.substring(0,1) === "?") {
-          queryString = queryString.substring(1);
-        } else if (queryString.indexOf('?') > -1) {
-          queryString = queryString.split('?')[1];
-        }
-      }
-      var hash = window.location.hash.split('?')[1];
-      queryString = queryString || hash || window.location.search.substring(1);
-      var match,
-      urlParams = {},
-      pl     = /\+/g,  // Regex for replacing addition symbol with a space
-      search = /([^&=]+)=?([^&]*)/g,
-      decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
-      query  = queryString;
-
-      if (queryString) {
-        while ((match = search.exec(query))) {
-          urlParams[decode(match[1])] = decode(match[2]);
-        }
-      }
-
-      return urlParams;
-    }
-  });
-
+  var app = {
+    // The root path to run the application.
+    root: "/utils/fauxton/",
+    version: "1.0",
+    // Host is used as prefix for urls
+    host: "../.." ,
+  };
+
+  return app; 
 });
+

http://git-wip-us.apache.org/repos/asf/couchdb/blob/72c78107/src/fauxton/app/initialize.js.underscore
----------------------------------------------------------------------
diff --git a/src/fauxton/app/initialize.js.underscore b/src/fauxton/app/initialize.js.underscore
index cc0ea58..02689a1 100644
--- a/src/fauxton/app/initialize.js.underscore
+++ b/src/fauxton/app/initialize.js.underscore
@@ -10,61 +10,24 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-
 /*
  * ::WARNING::
  * THIS IS A GENERATED FILE. DO NOT EDIT.
  */
 
-define([
-  // Application.
-  "app",
-
-  // Libraries
-  "lodash",
-  "bootstrap"
-],
-
-function(app, _, Bootstrap) {
 
+define([],
+function() {
   // Provide a global location to place configuration settings and module
   // creation.
-  _.extend(app, {
-    // The root path to run the application through.
-    // TODO: pick this up wither at build time or from the browser
-    root: <%= '"' +root+ '"' %>,
-
-    renderView: function(baseView, selector, view, options, callback) {
-      baseView.setView(selector, new view(options)).render().then(callback);
-    },
-
-    // Thanks to: http://stackoverflow.com/a/2880929
-    getParams: function(queryString) {
-      if (queryString) {
-        // I think this could be combined into one if
-        if (queryString.substring(0,1) === "?") {
-          queryString = queryString.substring(1);
-        } else if (queryString.indexOf('?') > -1) {
-          queryString = queryString.split('?')[1];
-        }
-      }
-      var hash = window.location.hash.split('?')[1];
-      queryString = queryString || hash || window.location.search.substring(1);
-      var match,
-      urlParams = {},
-      pl     = /\+/g,  // Regex for replacing addition symbol with a space
-      search = /([^&=]+)=?([^&]*)/g,
-      decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
-      query  = queryString;
-
-      if (queryString) {
-        while ((match = search.exec(query))) {
-          urlParams[decode(match[1])] = decode(match[2]);
-        }
-      }
-
-      return urlParams;
-    }
-  });
-
+  var app = {
+    // The root path to run the application.
+    root: "<%= root %>",
+    version: "<%= version %>",
+    // Host is used as prefix for urls
+    host: "<%= host %>" ,
+  };
+
+  return app; 
 });
+

http://git-wip-us.apache.org/repos/asf/couchdb/blob/72c78107/src/fauxton/settings.json.default
----------------------------------------------------------------------
diff --git a/src/fauxton/settings.json.default b/src/fauxton/settings.json.default
index 1b68911..27cd38f 100644
--- a/src/fauxton/settings.json.default
+++ b/src/fauxton/settings.json.default
@@ -20,6 +20,11 @@
           "requirejs": "/assets/js/libs/require.js",
           "css": "./css/index.css",
           "base": null
+        },
+        "app": {
+          "root": "/",
+          "host": "../..",
+          "version": "1.0.dev"
         }
       },
       "release": {
@@ -29,6 +34,11 @@
           "requirejs": "./js/require.js",
           "css": "./css/index.css",
           "base": null
+        },
+        "app": {
+          "root": "/utils/fauxton/",
+          "host": "../..",
+          "version": "1.0"
         }
       }
     },

http://git-wip-us.apache.org/repos/asf/couchdb/blob/72c78107/src/fauxton/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/src/fauxton/tasks/fauxton.js b/src/fauxton/tasks/fauxton.js
index f43546c..bb68ddb 100644
--- a/src/fauxton/tasks/fauxton.js
+++ b/src/fauxton/tasks/fauxton.js
@@ -14,9 +14,10 @@ module.exports = function(grunt) {
   var _ = grunt.util._;
 
   grunt.registerMultiTask('template', 'generates an html file from a specified template', function(){
-    var data = this.data;
-    var _ = grunt.util._;
-    var tmpl = _.template(grunt.file.read(data.src), null, data.variables);
+    var data = this.data,
+        _ = grunt.util._,
+        tmpl = _.template(grunt.file.read(data.src), null, data.variables);
+
     grunt.file.write(data.dest, tmpl(data.variables));
   });
 
@@ -24,12 +25,12 @@ module.exports = function(grunt) {
     grunt.log.writeln("Fetching external dependencies");
 
     var path = require('path');
-    var done = this.async();
-    var data = this.data;
-    var target = data.target || "app/addons/";
-    var settingsFile = path.existsSync(data.src) ? data.src : "settings.json.default";
-    var settings = grunt.file.readJSON(settingsFile);
-    var _ = grunt.util._;
+        done = this.async(),
+        data = this.data,
+        target = data.target || "app/addons/",
+        settingsFile = path.existsSync(data.src) ? data.src : "settings.json.default",
+        settings = grunt.file.readJSON(settingsFile),
+        _ = grunt.util._;
 
     // This should probably be a helper, though they seem to have been removed
     var fetch = function(deps, command){
@@ -76,30 +77,36 @@ module.exports = function(grunt) {
 
   grunt.registerMultiTask('gen_load_addons', 'Generate the load_addons.js file', function() {
     var path = require('path');
-    var data = this.data;
-    var _ = grunt.util._;
-    var settingsFile = path.existsSync(data.src) ? data.src : "settings.json.default";
-    var settings = grunt.file.readJSON(settingsFile);
-    var template = "app/load_addons.js.underscore";
-    var dest = "app/load_addons.js";
-    var deps = _.map(settings.deps, function(dep) {
-      return "addons/" + dep.name + "/base";
-    });
+        data = this.data,
+        _ = grunt.util._,
+        settingsFile = path.existsSync(data.src) ? data.src : "settings.json.default",
+        settings = grunt.file.readJSON(settingsFile),
+        template = "app/load_addons.js.underscore",
+        dest = "app/load_addons.js",
+        deps = _.map(settings.deps, function(dep) {
+          return "addons/" + dep.name + "/base";
+        });
+
     var tmpl = _.template(grunt.file.read(template));
     grunt.file.write(dest, tmpl({deps: deps}));
   });
 
-  grunt.registerMultiTask('gen_initialize', 'Generate the initialize.js file', function() {
-    var path = require('path');
-    var data = this.data;
-    var _ = grunt.util._;
-    var settingsFile = path.existsSync(data.src) ? data.src : "settings.json.default";
-    var settings = grunt.file.readJSON(settingsFile);
-    var template = "app/initialize.js.underscore";
-    var dest = "app/initialize.js";
-    var root = settings.root || "/";
-    var tmpl = _.template(grunt.file.read(template));
-    grunt.file.write(dest, tmpl({root: root}));
+  grunt.registerMultiTask('gen_initialize', 'Generate the app.js file', function() {
+    var _ = grunt.util._,
+        settings = this.data,
+        template = "app/initialize.js.underscore",
+        dest = "app/initialize.js"
+        tmpl = _.template(grunt.file.read(template)),
+        app = {};
+      
+
+    _.defaults(app, settings.app, {
+      root: '/',
+      host: '../../',
+      version: "0.0"
+    });
+
+    grunt.file.write(dest, tmpl(app));
   });
 
   grunt.registerMultiTask('mochaSetup','Generate a config.js and runner.html for tests', function(){


[06/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton: edit document on double click

Fixes COUCHDB-1921


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/96d737fa
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/96d737fa
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/96d737fa

Branch: refs/heads/1744-single-config-file
Commit: 96d737fa207c75179c1ded493c6ab46e36b04eb9
Parents: 2824db1
Author: suelockwood <de...@gmail.com>
Authored: Mon Dec 2 13:12:46 2013 -0500
Committer: suelockwood <de...@gmail.com>
Committed: Mon Dec 2 13:12:46 2013 -0500

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/96d737fa/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index af08974..ffbc1d1 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -328,7 +328,8 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
     className: "all-docs-item",
 
     events: {
-      "click button.delete": "destroy"
+      "click button.delete": "destroy",
+      "dblclick pre.prettyprint": "edit"
     },
 
     attributes: function() {
@@ -347,6 +348,11 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       return [this.model.fetch()];
     },
 
+    edit: function(event) {
+      event.preventDefault();
+      FauxtonAPI.navigate("#" + this.model.url('app'));
+    },
+
     destroy: function(event) {
       event.preventDefault();
       var that = this;


[11/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton: Remove databases from breadcrumbs


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5825fe61
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5825fe61
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5825fe61

Branch: refs/heads/1744-single-config-file
Commit: 5825fe61a39c8beecc84e57bd7ef097e6e4cf1b4
Parents: d2f1ec7
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Dec 3 13:07:47 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Dec 3 17:26:12 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/addons/compaction/routes.js  | 1 -
 src/fauxton/app/addons/permissions/routes.js | 1 -
 src/fauxton/app/modules/documents/routes.js  | 8 --------
 3 files changed, 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5825fe61/src/fauxton/app/addons/compaction/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/routes.js b/src/fauxton/app/addons/compaction/routes.js
index b7a2ee3..2a33e07 100644
--- a/src/fauxton/app/addons/compaction/routes.js
+++ b/src/fauxton/app/addons/compaction/routes.js
@@ -27,7 +27,6 @@ function(app, FauxtonAPI, Compaction, Databases) {
 
     crumbs: function () {
       return [
-        {"name": "Databases", "link": "/_all_dbs"},
         {"name": this.database.id, "link": Databases.databaseUrl(this.database)},
         {"name": "Compact & Clean", "link": "compact"}
       ];

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5825fe61/src/fauxton/app/addons/permissions/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/permissions/routes.js b/src/fauxton/app/addons/permissions/routes.js
index f6c6587..89c2bd7 100644
--- a/src/fauxton/app/addons/permissions/routes.js
+++ b/src/fauxton/app/addons/permissions/routes.js
@@ -51,7 +51,6 @@ function (app, FauxtonAPI, Databases, Permissions) {
 
     crumbs: function () {
       return [
-        {"name": "Databases", "link": "/_all_dbs"},
         {"name": this.database.id, "link": Databases.databaseUrl(this.database)},
         {"name": "Permissions", "link": "/permissions"}
       ];

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5825fe61/src/fauxton/app/modules/documents/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/routes.js b/src/fauxton/app/modules/documents/routes.js
index fae5c5c..dc59f3f 100644
--- a/src/fauxton/app/modules/documents/routes.js
+++ b/src/fauxton/app/modules/documents/routes.js
@@ -59,7 +59,6 @@ function(app, FauxtonAPI, Documents, Databases) {
 
     crumbs: function() {
       return [
-        {"name": "Databases", "link": "/_all_dbs"},
         {"name": this.database.id, "link": Databases.databaseUrl(this.database)},
         {"name": this.docID, "link": "#"}
       ];
@@ -129,7 +128,6 @@ function(app, FauxtonAPI, Documents, Databases) {
     },
     crumbs: function() {
       return [
-        {"name": "Databases", "link": "/_all_dbs"},
         {"name": this.database.id, "link": Databases.databaseUrl(this.database)},
         {"name": "New", "link": "#"}
       ];
@@ -220,7 +218,6 @@ function(app, FauxtonAPI, Documents, Databases) {
       }));
 
       this.crumbs = [
-        {"name": "Databases", "link": "/_all_dbs"},
         {"name": this.data.database.id, "link": Databases.databaseUrl(this.data.database)}
       ];
 
@@ -269,9 +266,7 @@ function(app, FauxtonAPI, Documents, Databases) {
 
       this.crumbs = function () {
         return [
-          {"name": "Databases", "link": "/_all_dbs"},
           {"name": this.data.database.id, "link": Databases.databaseUrl(this.data.database)},
-          {"name": ddoc + "/" + view, "link": this.data.indexedDocs.url()}
         ];
       };
 
@@ -291,9 +286,7 @@ function(app, FauxtonAPI, Documents, Databases) {
       this.sidebar.setSelectedTab('new-view');
       this.crumbs = function () {
         return [
-          {"name": "Databases", "link": "/_all_dbs"},
           {"name": this.data.database.id, "link": Databases.databaseUrl(this.data.database)},
-          {"name": "new"}
         ];
       };
     },
@@ -377,7 +370,6 @@ function(app, FauxtonAPI, Documents, Databases) {
     selectedHeader: "Databases",
     crumbs: function () {
       return [
-        {"name": "Databases", "link": "/_all_dbs"},
         {"name": this.database.id, "link": Databases.databaseUrl(this.database)},
         {"name": "_changes", "link": "/_changes"}
       ];


[19/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Adding the initialize task to be able to set app.root


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/b153e6af
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/b153e6af
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/b153e6af

Branch: refs/heads/1744-single-config-file
Commit: b153e6af50421c61e08e4027f4ca842ed78d76c9
Parents: f5a5862
Author: suelockwood <de...@gmail.com>
Authored: Tue Nov 26 14:20:00 2013 -0500
Committer: suelockwood <de...@apache.org>
Committed: Wed Dec 4 14:55:46 2013 -0500

----------------------------------------------------------------------
 src/fauxton/Gruntfile.js                 |  7 ++-
 src/fauxton/app/initialize.js            |  9 +++-
 src/fauxton/app/initialize.js.underscore | 70 +++++++++++++++++++++++++++
 src/fauxton/tasks/fauxton.js             | 13 +++++
 4 files changed, 96 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/b153e6af/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index 6a8a73a..5e6c56e 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -326,6 +326,11 @@ module.exports = function(grunt) {
         src: "settings.json"
       }
     },
+    gen_initialize: {
+      "default": {
+        src: "settings.json"
+      }
+    },
 
     mkcouchdb: couch_config,
     rmcouchdb: couch_config,
@@ -400,7 +405,7 @@ module.exports = function(grunt) {
   grunt.registerTask('lint', ['clean', 'jshint']);
   grunt.registerTask('test', ['lint', 'mochaSetup','jst', 'concat:test_config_js', 'mocha_phantomjs']);
   // Fetch dependencies (from git or local dir), lint them and make load_addons
-  grunt.registerTask('dependencies', ['get_deps', 'gen_load_addons:default']);
+  grunt.registerTask('dependencies', ['get_deps', 'gen_load_addons:default', "gen_initialize:default"]);
   // build templates, js and css
   grunt.registerTask('build', ['less', 'concat:index_css', 'jst', 'requirejs', 'concat:requirejs', 'template:release']);
   // minify code and css, ready for release.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/b153e6af/src/fauxton/app/initialize.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/initialize.js b/src/fauxton/app/initialize.js
index c0cca44..e374352 100644
--- a/src/fauxton/app/initialize.js
+++ b/src/fauxton/app/initialize.js
@@ -10,6 +10,12 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
+
+/*
+ * ::WARNING::
+ * THIS IS A GENERATED FILE. DO NOT EDIT.
+ */
+
 define([
   // Application.
   "app",
@@ -26,8 +32,7 @@ function(app, _, Bootstrap) {
   _.extend(app, {
     // The root path to run the application through.
     // TODO: pick this up wither at build time or from the browser
-    root: "/_utils/fauxton/",
-
+    root: "/dashboard.beta/dashboard.assets/",
 
     renderView: function(baseView, selector, view, options, callback) {
       baseView.setView(selector, new view(options)).render().then(callback);

http://git-wip-us.apache.org/repos/asf/couchdb/blob/b153e6af/src/fauxton/app/initialize.js.underscore
----------------------------------------------------------------------
diff --git a/src/fauxton/app/initialize.js.underscore b/src/fauxton/app/initialize.js.underscore
new file mode 100644
index 0000000..cc0ea58
--- /dev/null
+++ b/src/fauxton/app/initialize.js.underscore
@@ -0,0 +1,70 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+
+/*
+ * ::WARNING::
+ * THIS IS A GENERATED FILE. DO NOT EDIT.
+ */
+
+define([
+  // Application.
+  "app",
+
+  // Libraries
+  "lodash",
+  "bootstrap"
+],
+
+function(app, _, Bootstrap) {
+
+  // Provide a global location to place configuration settings and module
+  // creation.
+  _.extend(app, {
+    // The root path to run the application through.
+    // TODO: pick this up wither at build time or from the browser
+    root: <%= '"' +root+ '"' %>,
+
+    renderView: function(baseView, selector, view, options, callback) {
+      baseView.setView(selector, new view(options)).render().then(callback);
+    },
+
+    // Thanks to: http://stackoverflow.com/a/2880929
+    getParams: function(queryString) {
+      if (queryString) {
+        // I think this could be combined into one if
+        if (queryString.substring(0,1) === "?") {
+          queryString = queryString.substring(1);
+        } else if (queryString.indexOf('?') > -1) {
+          queryString = queryString.split('?')[1];
+        }
+      }
+      var hash = window.location.hash.split('?')[1];
+      queryString = queryString || hash || window.location.search.substring(1);
+      var match,
+      urlParams = {},
+      pl     = /\+/g,  // Regex for replacing addition symbol with a space
+      search = /([^&=]+)=?([^&]*)/g,
+      decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
+      query  = queryString;
+
+      if (queryString) {
+        while ((match = search.exec(query))) {
+          urlParams[decode(match[1])] = decode(match[2]);
+        }
+      }
+
+      return urlParams;
+    }
+  });
+
+});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/b153e6af/src/fauxton/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/src/fauxton/tasks/fauxton.js b/src/fauxton/tasks/fauxton.js
index 833a86d..e466c9f 100644
--- a/src/fauxton/tasks/fauxton.js
+++ b/src/fauxton/tasks/fauxton.js
@@ -89,6 +89,19 @@ module.exports = function(grunt) {
     grunt.file.write(dest, tmpl({deps: deps}));
   });
 
+  grunt.registerMultiTask('gen_initialize', 'Generate the initialize.js file', function() {
+    var path = require('path');
+    var data = this.data;
+    var _ = grunt.util._;
+    var settingsFile = path.existsSync(data.src) ? data.src : "settings.json.default";
+    var settings = grunt.file.readJSON(settingsFile);
+    var template = "app/initialize.js.underscore";
+    var dest = "app/initialize.js";
+    var root = settings.root;
+    var tmpl = _.template(grunt.file.read(template));
+    grunt.file.write(dest, tmpl({root: root}));
+  });
+
   grunt.registerMultiTask('mochaSetup','Generate a config.js and runner.html for tests', function(){
     var data = this.data,
         configInfo,


[05/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton fixes

Remove white space in editor
Interior tabs on views now collapse
Reworded preview button
Change Advanced Options -> Query Options


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/2824db13
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/2824db13
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/2824db13

Branch: refs/heads/1744-single-config-file
Commit: 2824db1371d8349e2488fff41a580cf17e7a87a5
Parents: 6350e52
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Dec 2 17:30:42 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Dec 2 17:30:42 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js          | 13 +++++++++----
 src/fauxton/app/modules/fauxton/components.js       | 16 ++++++++++++++++
 .../app/templates/documents/advanced_options.html   |  2 +-
 .../app/templates/documents/view_editor.html        |  5 ++---
 src/fauxton/assets/less/fauxton.less                |  1 -
 5 files changed, 28 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/2824db13/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 39e210d..af08974 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1408,17 +1408,22 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
     },
 
     toggleIndexNav: function (event) {
-      var $index = this.$('#index'),
-          $targetId = this.$(event.target).attr('id');
+      var $targetId = this.$(event.target).attr('id'),
+          $previousTab = this.$(this.$('li.active a').attr('href')),
+          $targetTab = this.$(this.$(event.target).attr('href'));
+
+      if ($targetTab.attr('id') !== $previousTab.attr('id')) {
+        $previousTab.removeAttr('style');
+      }
 
       if ($targetId === 'index-nav') {
         if (this.newView) { return; }
         var that = this;
-        $index.toggle('slow', function(){
+        $targetTab.toggle('slow', function(){
            that.showEditors();
         });
       } else {
-        $index.removeAttr('style');
+        $targetTab.toggle('slow');
       }
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/2824db13/src/fauxton/app/modules/fauxton/components.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/fauxton/components.js b/src/fauxton/app/modules/fauxton/components.js
index 1263bd4..0443573 100644
--- a/src/fauxton/app/modules/fauxton/components.js
+++ b/src/fauxton/app/modules/fauxton/components.js
@@ -201,6 +201,7 @@ function(app, FauxtonAPI, ace) {
 
     afterRender: function () {
       this.editor = ace.edit(this.editorId);
+      this.setHeightToLineCount();
       this.editor.setTheme("ace/theme/" + this.theme);
       this.editor.getSession().setMode("ace/mode/" + this.mode);
       this.editor.getSession().setUseWrapMode(true);
@@ -211,6 +212,21 @@ function(app, FauxtonAPI, ace) {
       if (this.couchJSHINT) {
         this.removeIncorrectAnnotations();
       }
+
+      var that = this;
+
+      this.editor.getSession().on('change', function () {
+        that.setHeightToLineCount();
+      });
+    },
+
+    setHeightToLineCount: function () {
+      var lines = this.editor.getSession().getDocument().getLength();
+      this.editor.setOptions({
+        maxLines: lines
+      });
+
+      this.editor.resize();
     },
 
     addCommands: function () {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/2824db13/src/fauxton/app/templates/documents/advanced_options.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/advanced_options.html b/src/fauxton/app/templates/documents/advanced_options.html
index df28203..3562f7b 100644
--- a/src/fauxton/app/templates/documents/advanced_options.html
+++ b/src/fauxton/app/templates/documents/advanced_options.html
@@ -87,7 +87,7 @@ the License.
       <div id="button-options" class="controls controls-row">
         <button type="submit" class="button btn-primary btn-large">Query</button>
         <% if (showPreview) { %>
-        <button class="button btn-info btn-large preview">Preview</button>
+        <button class="button btn-info btn-large preview">Browser Preview</button>
         <% } %>
       </div>
     </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/2824db13/src/fauxton/app/templates/documents/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index 8fcd07a..f35b8ab 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -14,8 +14,8 @@ the License.
 <div class="row">
   <ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">
     <li class="active"> <a id="index-nav" class="fonticon-wrench fonticon" data-toggle="tab" href="#index"><% if (newView) { %>Create Index <% } else { %>Edit Index <% } %></a></li>
-    <li><a class="fonticon-plus fonticon" href="#query" data-toggle="tab">Advanced Options</a></li>
-    <li><a href="#metadata" data-toggle="tab">Design Doc Metadata</a></li>
+    <li><a id="query-nav" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Query Options</a></li>
+    <li><a id="meta-nav" href="#metadata" data-toggle="tab">Design Doc Metadata</a></li>
   </ul>
   <div class="all-docs-list errors-container"></div>
   <div class="tab-content">
@@ -56,7 +56,6 @@ the License.
             <span class="help-block">Reduce functions are optional.</span>
           </div>
 
-
           <div class="control-group reduce-function">
             <label for="reduce-function">Custom Reduce</label>
             <% if (newView) { %>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/2824db13/src/fauxton/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/fauxton.less b/src/fauxton/assets/less/fauxton.less
index 252391e..3d8d97a 100644
--- a/src/fauxton/assets/less/fauxton.less
+++ b/src/fauxton/assets/less/fauxton.less
@@ -991,7 +991,6 @@ div.spinner {
 
 #map-function, #reduce-function{
     width: 100%;
-    height: 300px;
     font-size: 16px;
 }
 


[42/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Run a directory full of tests

It's now possible to supply a directory to the JavaScript
test runner and it will run all the .js files in that
direcotry.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/7c23a6ed
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/7c23a6ed
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/7c23a6ed

Branch: refs/heads/1744-single-config-file
Commit: 7c23a6ed848ecec2518b352462a8c7f0c98369cf
Parents: 391bbe1
Author: Volker Mische <vo...@gmail.com>
Authored: Fri Dec 13 18:44:40 2013 +0100
Committer: Volker Mische <vo...@gmail.com>
Committed: Fri Dec 13 18:44:40 2013 +0100

----------------------------------------------------------------------
 test/javascript/run.tpl | 39 +++++++++++++++++++++++----------------
 1 file changed, 23 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7c23a6ed/test/javascript/run.tpl
----------------------------------------------------------------------
diff --git a/test/javascript/run.tpl b/test/javascript/run.tpl
index 5f19b36..75192da 100644
--- a/test/javascript/run.tpl
+++ b/test/javascript/run.tpl
@@ -88,6 +88,18 @@ run() {
 
 }
 
+run_files() {
+    COUNTER=1
+    FILE_COUNT=$(ls -l $1 | wc -l)
+    FILE_COUNT=$(expr $FILE_COUNT + 0)
+    for TEST_SRC in $1
+    do
+        /bin/echo -n "$COUNTER/$FILE_COUNT "
+        COUNTER=$(expr $COUNTER + 1)
+        run $TEST_SRC
+    done
+}
+
 # start CouchDB
 if [ -z $COUCHDB_NO_START ]; then
     $MAKE dev
@@ -98,25 +110,20 @@ echo "Running javascript tests ..."
 
 if [ "$#" -eq 0 ];
 then
-    COUNTER=1
-    FILES="$SCRIPT_DIR/test/*.js"
-    FILE_COUNT=$(ls -l $FILES | wc -l)
-    FILE_COUNT=$(expr $FILE_COUNT + 0)
-    for TEST_SRC in $FILES
-    do
-        /bin/echo -n "$COUNTER/$FILE_COUNT "
-        COUNTER=$(expr $COUNTER + 1)
-        run $TEST_SRC
-    done
+    run_files "$SCRIPT_DIR/test/*.js"
 else
-    TEST_SRC="$1"
-    if [ ! -f $TEST_SRC ]; then
-        TEST_SRC="$SCRIPT_DIR/test/$1"
+    if [ -d $1 ]; then
+        run_files "$1/*.js"
+    else
+        TEST_SRC="$1"
         if [ ! -f $TEST_SRC ]; then
-            TEST_SRC="$SCRIPT_DIR/test/$1.js"
+            TEST_SRC="$SCRIPT_DIR/test/$1"
             if [ ! -f $TEST_SRC ]; then
-                echo "file $1 does not exist"
-                exit 1
+                TEST_SRC="$SCRIPT_DIR/test/$1.js"
+                if [ ! -f $TEST_SRC ]; then
+                    echo "file $1 does not exist"
+                    exit 1
+                fi
             fi
         fi
     fi


[48/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Improve docs of use_checkpoints and checkpoint_interval config options.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/d5f09767
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/d5f09767
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/d5f09767

Branch: refs/heads/1744-single-config-file
Commit: d5f0976784ccd70883c8b7c17b1d4503af72f554
Parents: 74e0f08
Author: Alexander Shorin <kx...@apache.org>
Authored: Sat Dec 14 21:55:15 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Sat Dec 14 21:55:22 2013 +0400

----------------------------------------------------------------------
 share/doc/src/config/replicator.rst | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/d5f09767/share/doc/src/config/replicator.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/config/replicator.rst b/share/doc/src/config/replicator.rst
index 515c679..388491c 100644
--- a/share/doc/src/config/replicator.rst
+++ b/share/doc/src/config/replicator.rst
@@ -116,37 +116,33 @@ Replicator Database Configuration
     .. versionadded:: 1.6
 
     Defines replication checkpoint interval in milliseconds. :ref:`Replicator
-    <replication/replicator>` will :get:`requests </{db}>` Source database
-    each time after a specified amount of interval::
+    <replicator>` will :get:`requests </{db}>` from the Source database at
+    the specified interval::
 
       [replicator]
       checkpoint_interval = 5000
 
-    Keeping this value lower raises polling rate to Source database, which
-    may be useful for frequently changing data, while higher value saves
-    traffic usage that is important for mobile clients.
+    Lower intervals may be useful for frequently changing data, while higher
+    values will lower bandwidth and make fewer requests for infrequently
+    updated databases.
 
 
   .. config:option:: use_checkpoints
 
      .. versionadded:: 1.6
 
-     If set as ``true`` CouchDB makes intermediate checkpoints during
-     replication from those it may continue it in case of failure or restart::
+     If ``use_checkpoints`` is set to ``true``, CouchDB will make checkpoints
+     during replication and at the completion of replication. CouchDB can
+     efficiently resume replication from any of these checkpoints::
 
       [replicator]
       use_checkpoints = true
 
-     .. warning:: It's **not recommended** to switch this option off
-        (by setting value ``false`` to it) since without checkpoints there would
-        not be stored any replication history logs both on Source and Target,
-        forcing replication to start from the very beginning.
+     .. note:: Checkpoints are stored in :ref:`local documents <api/local>`
+        on both the source and target databases (which requires write access).
 
-     .. note:: Checkpoints (aka Replication Log) are stored as :ref:`local
-        documents <api/local>` both on Source and Target endpoints. In case,
-        when client has no write permission on Source database you may disable
-        them, but locally for specific replication process.
-        See :ref:`replication-settings` for more info.
+     .. warning:: Disabling checkpoints is **not recommended** as CouchDB
+        will scan the Source database's changes feed from the beginning.
 
 
   .. config:option:: cert_file


[38/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton: remove icon list and hiding new view


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/9c641f16
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/9c641f16
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/9c641f16

Branch: refs/heads/1744-single-config-file
Commit: 9c641f1677f9d9cf27f3c76af803636d980c0929
Parents: 0f37358
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Dec 11 09:51:05 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Dec 11 09:51:05 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/routes.js             | 11 -----------
 src/fauxton/app/modules/documents/views.js              | 12 +-----------
 .../app/templates/documents/index_menu_item.html        |  2 +-
 src/fauxton/app/templates/documents/sidebar.html        |  8 ++------
 4 files changed, 4 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/9c641f16/src/fauxton/app/modules/documents/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/routes.js b/src/fauxton/app/modules/documents/routes.js
index 56d2116..9a4c4ee 100644
--- a/src/fauxton/app/modules/documents/routes.js
+++ b/src/fauxton/app/modules/documents/routes.js
@@ -198,9 +198,6 @@ function(app, FauxtonAPI, Documents, Databases) {
       }
 
       if (this.viewEditor) { this.viewEditor.remove(); }
-      
-      this.listenTo(this.data.database.allDocs, 'reset', this.checkExistingDocs);
-      this.listenTo(this.data.database.allDocs, 'remove', this.checkExistingDocs);
 
       this.toolsView = this.setView("#dashboard-upper-menu", new Documents.Views.JumpToDoc({
         database: this.data.database,
@@ -357,14 +354,6 @@ function(app, FauxtonAPI, Documents, Databases) {
       if (event && event.selectedTab) {
         this.sidebar.setSelectedTab(event.selectedTab);
       }
-    },
-
-    checkExistingDocs: function () {
-      if (this.data.database.allDocs.length > 0) {
-        this.sidebar.toggleNewView(true);
-      } else {
-        this.sidebar.toggleNewView(false);
-      }
     }
 
   });

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9c641f16/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 83f8e55..de21010 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1608,7 +1608,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
 
     initialize: function(options) {
       this.database = options.database;
-      this.showNewView = true;
       if (options.ddocInfo) {
         this.ddocID = options.ddocInfo.id;
         this.currView = options.ddocInfo.currView;
@@ -1647,7 +1646,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         database: this.collection.database,
         database_url: '#' + this.database.url('app'), 
         docLinks: docLinks,
-        showNewView: this.showNewView,
         docLimit: Databases.DocLimit,
         addLinks: addLinks,
         extensionList: extensionList > 0
@@ -1696,15 +1694,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
       this.selectedTab = selectedTab;
       this.$('li').removeClass('active');
       this.$('#' + selectedTab).parent().addClass('active');
-    },
-
-    toggleNewView: function (show) {
-      // only render if there is a change
-      if (show !== this.showNewView) {
-        this.showNewView = show;
-        this.render();
-      }
-    },
+    }
   });
 
   Views.Indexed = FauxtonAPI.View.extend({});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9c641f16/src/fauxton/app/templates/documents/index_menu_item.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/index_menu_item.html b/src/fauxton/app/templates/documents/index_menu_item.html
index cb9aaf0..1b141b2 100644
--- a/src/fauxton/app/templates/documents/index_menu_item.html
+++ b/src/fauxton/app/templates/documents/index_menu_item.html
@@ -13,5 +13,5 @@ the License.
 -->
 
 <a id="<%= ddoc %>_<%= index %>" href="#database/<%= database %>/_design/<%= ddoc %>/_view/<%= index %>" class="toggle-view">
-  <i class="icon-list"></i> <%= ddoc %><span class="divider">/</span><%= index %>
+  <%= ddoc %><span class="divider">/</span><%= index %>
 </a>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9c641f16/src/fauxton/app/templates/documents/sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/sidebar.html b/src/fauxton/app/templates/documents/sidebar.html
index 8fccc09..156398d 100644
--- a/src/fauxton/app/templates/documents/sidebar.html
+++ b/src/fauxton/app/templates/documents/sidebar.html
@@ -41,11 +41,9 @@ the License.
           <li>
           <a id="doc" href="#<%= database.url('app') %>/new">Document</a>
           </li>
-          <% if (showNewView) { %>
           <li>
           <a href="#<%= database.url('app') %>/new_view">Secondary Index</a>
           </li>
-          <% } %>
         </ul>
       </div>
         <button id="delete-database" class="btn"><i class="icon-trash"></i> Database</button>
@@ -54,14 +52,12 @@ the License.
 
   <nav>
     <ul class="nav nav-list">
-      <li class="active"><a id="all-docs" href="#<%= database.url('index') %>?limit=<%= docLimit %>" class="toggle-view"><i class="icon-list"></i> All documents</a></li>
-      <li><a id="design-docs" href='#<%= database.url("index") %>?limit=<%= docLimit %>&startkey="_design"&endkey="_e"'  class="toggle-view"><i class="icon-list"></i> All design docs</a></li>
+      <li class="active"><a id="all-docs" href="#<%= database.url('index') %>?limit=<%= docLimit %>" class="toggle-view"> All documents</a></li>
+      <li><a id="design-docs" href='#<%= database.url("index") %>?limit=<%= docLimit %>&startkey="_design"&endkey="_e"'  class="toggle-view"> All design docs</a></li>
     </ul>
     <ul class="nav nav-list views">
       <li class="nav-header">Secondary Indexes</li>
-      <% if (showNewView) { %>
       <li><a id="new-view" href="#<%= database.url('app') %>/new_view" class="new"><i class="icon-plus"></i> New</a></li>
-      <% } %>
     </ul>
     <div id="extension-navs"></div>
   </nav>


[35/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
extensions added for sidebar


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/6f5580a6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/6f5580a6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/6f5580a6

Branch: refs/heads/1744-single-config-file
Commit: 6f5580a6811ee07bcb80124956c720a4bc735c4d
Parents: 204551c
Author: suelockwood <de...@apache.org>
Authored: Thu Dec 5 15:46:28 2013 -0500
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Dec 10 17:42:58 2013 +0200

----------------------------------------------------------------------
 .gitignore                                 |  1 +
 src/fauxton/app/modules/documents/views.js | 17 +++++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6f5580a6/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 2d6a17b..1f8c4a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -132,3 +132,4 @@ test/local.ini
 tmp
 utils/run
 src/fauxton/test/test.config.js
+src/fauxton/app/initialize.js

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6f5580a6/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 64e304c..b621e50 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1637,7 +1637,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
     },
 
     serialize: function() {
-      var docLinks = FauxtonAPI.getExtensions('docLinks');
+      var docLinks = FauxtonAPI.getExtensions('docLinks'),
+          addLinks = FauxtonAPI.getExtensions('sidebar:links'),
+          extensionList = FauxtonAPI.getExtensions('sidebar:list');
       return {
         changes_url: '#' + this.database.url('changes'),
         permissions_url: '#' + this.database.url('app') + '/permissions',
@@ -1646,7 +1648,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         database_url: '#' + this.database.url('app'), 
         docLinks: docLinks,
         showNewView: this.showNewView,
-        docLimit: Databases.DocLimit
+        docLimit: Databases.DocLimit,
+        addLinks: addLinks,
+        extensionList: extensionList > 0
       };
     },
 
@@ -1663,6 +1667,15 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
     },
 
     beforeRender: function(manage) {
+
+      var sidebarListViews = FauxtonAPI.getExtensions('sidebar:list');
+      _.each(sidebarListViews, function (view) {
+        var extension = this.insertView('#extension-navs', view);
+        extension.update(this.database, this.collection, this.viewName);
+        extension.render();
+      }, this);
+
+
       this.collection.each(function(design) {
         if (design.has('doc')){
           var ddoc = design.id.split('/')[1];


[31/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
fix typo in error message


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/05d2f298
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/05d2f298
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/05d2f298

Branch: refs/heads/1744-single-config-file
Commit: 05d2f2983bb01522c8d9d9fd7735d20cc4bdb1a0
Parents: 14cb47e
Author: Jan Lehnardt <ja...@apache.org>
Authored: Mon Dec 9 20:00:44 2013 +0100
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Mon Dec 9 20:01:00 2013 +0100

----------------------------------------------------------------------
 src/couchdb/couch_httpd_stats_handlers.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/05d2f298/src/couchdb/couch_httpd_stats_handlers.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_httpd_stats_handlers.erl b/src/couchdb/couch_httpd_stats_handlers.erl
index 41aeaed..d6973f6 100644
--- a/src/couchdb/couch_httpd_stats_handlers.erl
+++ b/src/couchdb/couch_httpd_stats_handlers.erl
@@ -25,7 +25,7 @@ handle_stats_req(#httpd{method='GET', path_parts=[_]}=Req) ->
     send_json(Req, couch_stats_aggregator:all(range(Req)));
 
 handle_stats_req(#httpd{method='GET', path_parts=[_, _Mod]}) ->
-    throw({bad_request, <<"Stat names must have exactly to parts.">>});
+    throw({bad_request, <<"Stat names must have exactly two parts.">>});
 
 handle_stats_req(#httpd{method='GET', path_parts=[_, Mod, Key]}=Req) ->
     flush(Req),


[28/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Faxuton: UI Fixes


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/555ad0ff
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/555ad0ff
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/555ad0ff

Branch: refs/heads/1744-single-config-file
Commit: 555ad0ff711ea271ef96a537cb9fa72c99edd765
Parents: 5310b40
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Dec 9 09:45:33 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Dec 9 09:46:36 2013 +0200

----------------------------------------------------------------------
 src/fauxton/Gruntfile.js                            |  4 ++--
 src/fauxton/app/initialize.js                       |  4 ++--
 src/fauxton/app/modules/databases/base.js           |  2 +-
 src/fauxton/app/modules/databases/resources.js      |  4 +++-
 src/fauxton/app/modules/databases/views.js          | 14 ++++++++------
 src/fauxton/app/modules/documents/routes.js         |  4 ++++
 src/fauxton/app/modules/documents/views.js          | 16 +++++++++-------
 src/fauxton/app/templates/databases/item.html       |  2 +-
 .../app/templates/documents/all_docs_layout.html    |  2 +-
 src/fauxton/app/templates/documents/sidebar.html    | 14 +++++++-------
 .../app/templates/documents/view_editor.html        |  2 +-
 11 files changed, 39 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/555ad0ff/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index e8a12be..5e046ff 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -220,7 +220,7 @@ module.exports = function(grunt) {
       proxy: {
         target: {
           host: 'localhost',
-          port: 5984,
+          port: 5684,
           https: false
         },
         // This sets the Host header in the proxy so that you can use external
@@ -358,7 +358,7 @@ module.exports = function(grunt) {
     }
 
     if (!!filepath.match(/[Ss]pec.js$/)) {
-      grunt.task.run(['mochaSetup','jst', 'concat:test_config_js', 'mocha_phantomjs']);
+      //grunt.task.run(['mochaSetup','jst', 'concat:test_config_js', 'mocha_phantomjs']);
     }
   });
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/555ad0ff/src/fauxton/app/initialize.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/initialize.js b/src/fauxton/app/initialize.js
index 7a4a1c1..ebba91c 100644
--- a/src/fauxton/app/initialize.js
+++ b/src/fauxton/app/initialize.js
@@ -22,8 +22,8 @@ function() {
   // creation.
   var app = {
     // The root path to run the application.
-    root: "/utils/fauxton/",
-    version: "1.0",
+    root: "/",
+    version: "1.0.dev",
     // Host is used as prefix for urls
     host: "../.." ,
   };

http://git-wip-us.apache.org/repos/asf/couchdb/blob/555ad0ff/src/fauxton/app/modules/databases/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/base.js b/src/fauxton/app/modules/databases/base.js
index a5b4542..2e768e9 100644
--- a/src/fauxton/app/modules/databases/base.js
+++ b/src/fauxton/app/modules/databases/base.js
@@ -29,7 +29,7 @@ function(app, FauxtonAPI, Databases, Views) {
   Databases.databaseUrl = function(database) {
     var name = _.isObject(database) ? database.id : database;
 
-    return ["/database/", name, "/_all_docs?limit=10"].join('');
+    return ["/database/", name, "/_all_docs?limit=" + Databases.DocLimit].join('');
   };
 
   return Databases;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/555ad0ff/src/fauxton/app/modules/databases/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/resources.js b/src/fauxton/app/modules/databases/resources.js
index 237c4ce..a577847 100644
--- a/src/fauxton/app/modules/databases/resources.js
+++ b/src/fauxton/app/modules/databases/resources.js
@@ -22,6 +22,8 @@ define([
 function(app, FauxtonAPI, Documents) {
   var Databases = FauxtonAPI.module();
 
+  Databases.DocLimit = 20;
+
   Databases.Model = Backbone.Model.extend({
     initialize: function(options) {
       this.status = new Databases.Status({
@@ -51,7 +53,7 @@ function(app, FauxtonAPI, Documents) {
       if (context === "index") {
         return "/database/" + this.id + "/_all_docs";
       } else if (context === "web-index") {
-        return "#/database/"+ encodeURIComponent(this.get("name"))  + "/_all_docs?limit=100";
+        return "#/database/"+ encodeURIComponent(this.get("name"))  + "/_all_docs?limit=" + Databases.DocLimit;
       } else if (context === "changes") {
         return "/database/" + this.id + "/_changes?descending=true&limit=100&include_docs=true";
       } else if (context === "app") {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/555ad0ff/src/fauxton/app/modules/databases/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/views.js b/src/fauxton/app/modules/databases/views.js
index 9a197a9..5d46cd3 100644
--- a/src/fauxton/app/modules/databases/views.js
+++ b/src/fauxton/app/modules/databases/views.js
@@ -12,12 +12,13 @@
 
 define([
   "app",
-
+  
   "modules/fauxton/components",
   "api",
+  "modules/databases/resources"
 ],
 
-function(app, Components, FauxtonAPI) {
+function(app, Components, FauxtonAPI, Databases) {
   var Views = {};
 
   Views.Item = FauxtonAPI.View.extend({
@@ -27,7 +28,8 @@ function(app, Components, FauxtonAPI) {
     serialize: function() {
       return {
         encoded: encodeURIComponent(this.model.get("name")),
-        database: this.model
+        database: this.model,
+        docLimit: Databases.DocLimit
       };
     }
   });
@@ -66,7 +68,7 @@ function(app, Components, FauxtonAPI) {
         // TODO: switch to using a model, or Databases.databaseUrl()
         // Neither of which are in scope right now
         // var db = new Database.Model({id: dbname});
-        var url = ["/database/", encodeURIComponent(dbname), "/_all_docs?limit=10"].join('');
+        var url = ["/database/", encodeURIComponent(dbname), "/_all_docs?limit=" + Databases.DocLimit].join('');
         FauxtonAPI.navigate(url);
       }
     },
@@ -154,7 +156,7 @@ function(app, Components, FauxtonAPI) {
           type: "success",
           clear: true
         });
-        var route = "#/database/" +  name + "/_all_docs?limit=100";
+        var route = "#/database/" +  name + "/_all_docs?limit=" + Databases.DocLimit;
         app.router.navigate(route, { trigger: true });
       }
       ).error(function(xhr) {
@@ -203,7 +205,7 @@ function(app, Components, FauxtonAPI) {
           type: "success",
           clear: true
         });
-        var route = "#/database/" +  name + "/_all_docs?limit=100";
+        var route = "#/database/" +  name + "/_all_docs?limit=" + Databases.DocLimit;
         app.router.navigate(route, { trigger: true });
       }
       ).error(function(xhr) {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/555ad0ff/src/fauxton/app/modules/documents/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/routes.js b/src/fauxton/app/modules/documents/routes.js
index dc59f3f..56d2116 100644
--- a/src/fauxton/app/modules/documents/routes.js
+++ b/src/fauxton/app/modules/documents/routes.js
@@ -276,6 +276,10 @@ function(app, FauxtonAPI, Documents, Databases) {
     newViewEditor: function () {
       var params = app.getParams();
 
+      if (this.toolsView) {
+        this.toolsView.remove();
+      }
+
       this.viewEditor = this.setView("#dashboard-upper-content", new Documents.Views.ViewEditor({
         ddocs: this.data.designDocs,
         params: params,

http://git-wip-us.apache.org/repos/asf/couchdb/blob/555ad0ff/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 1fe4cb7..af3c4c3 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -17,6 +17,7 @@ define([
        "modules/fauxton/components",
 
        "modules/documents/resources",
+       "modules/databases/resources",
        "modules/pouchdb/base",
 
        // Libs
@@ -27,7 +28,7 @@ define([
 
 ],
 
-function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
+function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColumns) {
   var Views = {};
 
   Views.Tabs = FauxtonAPI.View.extend({
@@ -46,7 +47,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       return {
         // TODO make this not hard coded here
         changes_url: '#' + this.database.url('changes'),
-        db_url: '#' + this.database.url('index') + '?limit=100',
+        db_url: '#' + this.database.url('index') + '?limit=' + Databases.DocLimit,
       };
     },
 
@@ -802,7 +803,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
             type: 'error',
             clear: true
           });
-          FauxtonAPI.navigate('/database/' + databaseId + '/_all_docs?limit=20');
+          FauxtonAPI.navigate('/database/' + databaseId + '/_all_docs?limit=' + Databases.DocLimit);
         }
         deferred.reject();
      });
@@ -1250,7 +1251,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       }
 
       promise.then(function () {
-        FauxtonAPI.navigate('/database/' + that.database.id + '/_all_docs?limit=100');
+        FauxtonAPI.navigate('/database/' + that.database.id + '/_all_docs?limit=' + Databases.DocLimit);
         FauxtonAPI.triggerRouteEvent('reloadDesignDocs');
       });
     },
@@ -1383,7 +1384,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       var promise = FauxtonAPI.Deferred();
 
       if (!this.database.allDocs) {
-        this.database.buildAllDocs({limit: "100", include_docs: true});
+        this.database.buildAllDocs({limit: Databases.DocLimit.toString(), include_docs: true});
         promise = this.database.allDocs.fetch();
       } else {
         promise.resolve();
@@ -1629,11 +1630,12 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
       return {
         changes_url: '#' + this.database.url('changes'),
         permissions_url: '#' + this.database.url('app') + '/permissions',
-        db_url: '#' + this.database.url('index') + '?limit=100',
+        db_url: '#' + this.database.url('index') + '?limit=' + Databases.DocLimit,
         database: this.collection.database,
         database_url: '#' + this.database.url('app'), 
         docLinks: docLinks,
-        showNewView: this.showNewView
+        showNewView: this.showNewView,
+        docLimit: Databases.DocLimit
       };
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/555ad0ff/src/fauxton/app/templates/databases/item.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/databases/item.html b/src/fauxton/app/templates/databases/item.html
index a8801b0..701e58e 100644
--- a/src/fauxton/app/templates/databases/item.html
+++ b/src/fauxton/app/templates/databases/item.html
@@ -13,7 +13,7 @@ the License.
 -->
 
 <td>
-  <a href="#/database/<%=encoded%>/_all_docs?limit=100"><%= database.get("name") %></a>
+  <a href="#/database/<%=encoded%>/_all_docs?limit=<%=docLimit%>"><%= database.get("name") %></a>
 </td>
 <td><%= database.status.humanSize() %></td>
 <td><%= database.status.numDocs() %></td>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/555ad0ff/src/fauxton/app/templates/documents/all_docs_layout.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/all_docs_layout.html b/src/fauxton/app/templates/documents/all_docs_layout.html
index cdbd161..785937e 100644
--- a/src/fauxton/app/templates/documents/all_docs_layout.html
+++ b/src/fauxton/app/templates/documents/all_docs_layout.html
@@ -12,7 +12,7 @@ License for the specific language governing permissions and limitations under
 the License.
 -->
 <ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">
-  <li><a id="toggle-query" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Advanced Options</a></li>
+  <li><a id="toggle-query" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Index Options</a></li>
 </ul>
 <div class="tab-content">
   <div class="tab-pane" id="query">

http://git-wip-us.apache.org/repos/asf/couchdb/blob/555ad0ff/src/fauxton/app/templates/documents/sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/sidebar.html b/src/fauxton/app/templates/documents/sidebar.html
index cd6dedc..4faae4c 100644
--- a/src/fauxton/app/templates/documents/sidebar.html
+++ b/src/fauxton/app/templates/documents/sidebar.html
@@ -16,8 +16,8 @@ the License.
   <header class="row-fluid">
     <div class="span5">
       <div class="btn-group">
-        <button class="btn">Docs</button>
-        <button class="btn dropdown-toggle" data-toggle="dropdown">
+        <button class="btn dropdown-toggle dropdown-toggle-btn" data-toggle="dropdown">
+          Docs
           <span class="caret"></span>
         </button>
         <ul class="dropdown-menu">
@@ -34,8 +34,8 @@ the License.
 
     <div class="span4 offset1">
       <div class="btn-group">
-        <button class="btn">Add</button>
-        <button class="btn dropdown-toggle" data-toggle="dropdown">
+        <button class="btn dropdown-toggle dropdown-toggle-btn" data-toggle="dropdown">
+          Add
           <span class="caret"></span>
         </button>
         <ul class="dropdown-menu">
@@ -58,11 +58,11 @@ the License.
 
   <nav>
     <ul class="nav nav-list">
-      <li class="active"><a id="all-docs" href="#<%= database.url('index') %>?limit=100" class="toggle-view"><i class="icon-list"></i> All documents</a></li>
-      <li><a id="design-docs" href='#<%= database.url("index") %>?limit=100&startkey="_design"&endkey="_e"'  class="toggle-view"><i class="icon-list"></i> All design docs</a></li>
+      <li class="active"><a id="all-docs" href="#<%= database.url('index') %>?limit=<%= docLimit %>" class="toggle-view"><i class="icon-list"></i> All documents</a></li>
+      <li><a id="design-docs" href='#<%= database.url("index") %>?limit=<%= docLimit %>&startkey="_design"&endkey="_e"'  class="toggle-view"><i class="icon-list"></i> All design docs</a></li>
     </ul>
     <ul class="nav nav-list views">
-      <li class="nav-header">Secondary Indices</li>
+      <li class="nav-header">Secondary Indexes</li>
       <% if (showNewView) { %>
         <li><a id="new-view" href="#<%= database.url('app') %>/new_view" class="new"><i class="icon-plus"></i> New</a></li>
         <% } %>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/555ad0ff/src/fauxton/app/templates/documents/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index bb6e0af..7f5d233 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -68,7 +68,7 @@ the License.
           <div class="control-group">
             <button class="button green save fonticon-circle-check">Save</button>
             <button class="button btn-info preview">Preview</button>
-            <% if (!this.newView) { %>
+            <% if (!newView) { %>
             <button class="button delete outlineGray fonticon-circle-x">Delete</button>
             <% } %>
           </div>


[18/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton: Add viewHasRendered route event

This is used to clean up any left over spinners if a view has previously
been rendered


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/f5a5862a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/f5a5862a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/f5a5862a

Branch: refs/heads/1744-single-config-file
Commit: f5a5862a72214d292ccf5b61159bd10dedf5faff
Parents: 844ddfa
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Dec 4 12:05:06 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Dec 4 16:31:27 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/api.js | 39 ++++++++++++++++++++++++---------------
 1 file changed, 24 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f5a5862a/src/fauxton/app/api.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/api.js b/src/fauxton/app/api.js
index 9d6ba08..a71c5f8 100644
--- a/src/fauxton/app/api.js
+++ b/src/fauxton/app/api.js
@@ -314,7 +314,10 @@ function(app, Fauxton) {
       FauxtonAPI.when(this.establish()).then(function(resp) {
         triggerBroadcast('afterEstablish');
         _.each(routeObject.getViews(), function(view, selector) {
-          if(view.hasRendered) { return; }
+          if(view.hasRendered) { 
+            triggerBroadcast('viewHasRendered', view, selector);
+            return;
+          }
 
           triggerBroadcast('beforeRender', view, selector);
           FauxtonAPI.when(view.establish()).then(function(resp) {
@@ -339,14 +342,6 @@ function(app, Fauxton) {
               masterLayout.renderView(selector);
           });
 
-          /*var hooks = masterLayout.hooks[selector];
-          var boundRoute = route;
-
-          _.each(hooks, function(hook){
-            if (_.any(hook.routes, function(route){return route == boundRoute;})){
-              hook.callback(view);
-            }
-          });*/
         });
       }.bind(this), function (resp) {
           if (!resp) { return; }
@@ -479,12 +474,23 @@ function(app, Fauxton) {
    }
   });
 
-  var viewSpinner;
-  FauxtonAPI.RouteObject.on('beforeRender', function (routeObject, view, selector) {
-    if (!routeObject.disableLoader) {
+  var removeRouteObjectSpinner = function () {
+    if (routeObjectSpinner) {
       routeObjectSpinner.stop();
       $('.spinner').remove();
     }
+  };
+
+  var removeViewSpinner = function () {
+    if (viewSpinner){
+      viewSpinner.stop();
+      $('.spinner').remove();
+    }
+  };
+
+  var viewSpinner;
+  FauxtonAPI.RouteObject.on('beforeRender', function (routeObject, view, selector) {
+    removeRouteObjectSpinner();
 
     if (!view.disableLoader){ 
       var opts = {
@@ -506,9 +512,12 @@ function(app, Fauxton) {
   });
 
   FauxtonAPI.RouteObject.on('afterRender', function (routeObject, view, selector) {
-    if (!view.disableLoader){
-      viewSpinner.stop();
-    }
+    removeViewSpinner();
+  });
+
+  FauxtonAPI.RouteObject.on('viewHasRendered', function () {
+    removeViewSpinner();
+    removeRouteObjectSpinner();
   });
 
   var extensions = _.extend({}, Backbone.Events);


[25/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
grammar


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/fffc7900
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/fffc7900
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/fffc7900

Branch: refs/heads/1744-single-config-file
Commit: fffc7900d3b1b67abc5521b6e5e06d217e59c603
Parents: 06472f8
Author: Robert Newson <rn...@apache.org>
Authored: Thu Dec 5 12:35:00 2013 +0000
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Dec 5 12:35:00 2013 +0000

----------------------------------------------------------------------
 share/doc/src/config/query-servers.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/fffc7900/share/doc/src/config/query-servers.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/config/query-servers.rst b/share/doc/src/config/query-servers.rst
index 19a5988..88fab82 100644
--- a/share/doc/src/config/query-servers.rst
+++ b/share/doc/src/config/query-servers.rst
@@ -41,7 +41,7 @@ Query Servers Definition
   - ``LANGUAGE``: is a programming language which code this query server may
     execute. For instance, there are `python`, `ruby`, `clojure` and other query
     servers in wild. This value is also used for `ddoc` field ``language``
-    to determine which query server process the functions.
+    to determine which query server processes the functions.
 
     Note, that you may setup multiple query servers for the same programming
     language, but you have to name them different (like `python-dev` etc.).


[20/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
set to "/" as default


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/1ab2408b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1ab2408b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1ab2408b

Branch: refs/heads/1744-single-config-file
Commit: 1ab2408bebb55c8e5792fc7f585624bc0b16f15f
Parents: b153e6a
Author: suelockwood <de...@gmail.com>
Authored: Tue Nov 26 14:29:41 2013 -0500
Committer: suelockwood <de...@apache.org>
Committed: Wed Dec 4 14:55:47 2013 -0500

----------------------------------------------------------------------
 src/fauxton/tasks/fauxton.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/1ab2408b/src/fauxton/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/src/fauxton/tasks/fauxton.js b/src/fauxton/tasks/fauxton.js
index e466c9f..f43546c 100644
--- a/src/fauxton/tasks/fauxton.js
+++ b/src/fauxton/tasks/fauxton.js
@@ -97,7 +97,7 @@ module.exports = function(grunt) {
     var settings = grunt.file.readJSON(settingsFile);
     var template = "app/initialize.js.underscore";
     var dest = "app/initialize.js";
-    var root = settings.root;
+    var root = settings.root || "/";
     var tmpl = _.template(grunt.file.read(template));
     grunt.file.write(dest, tmpl({root: root}));
   });


[29/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton: UI Improvements


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/f28dd6f6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/f28dd6f6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/f28dd6f6

Branch: refs/heads/1744-single-config-file
Commit: f28dd6f64df4781131f03eec01322e18c9d8377a
Parents: 555ad0f
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Dec 9 10:15:23 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Dec 9 10:15:23 2013 +0200

----------------------------------------------------------------------
 src/fauxton/Gruntfile.js                        |  2 +-
 .../app/templates/documents/sidebar.html        | 22 ++++++++------------
 .../app/templates/documents/view_editor.html    |  2 ++
 src/fauxton/assets/less/fauxton.less            |  4 +++-
 4 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f28dd6f6/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index 5e046ff..3afaa1f 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -220,7 +220,7 @@ module.exports = function(grunt) {
       proxy: {
         target: {
           host: 'localhost',
-          port: 5684,
+          port: 5984,
           https: false
         },
         // This sets the Host header in the proxy so that you can use external

http://git-wip-us.apache.org/repos/asf/couchdb/blob/f28dd6f6/src/fauxton/app/templates/documents/sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/sidebar.html b/src/fauxton/app/templates/documents/sidebar.html
index 4faae4c..336946d 100644
--- a/src/fauxton/app/templates/documents/sidebar.html
+++ b/src/fauxton/app/templates/documents/sidebar.html
@@ -14,7 +14,7 @@ the License.
 
 <div id="sidenav">
   <header class="row-fluid">
-    <div class="span5">
+    <div class="span12">
       <div class="btn-group">
         <button class="btn dropdown-toggle dropdown-toggle-btn" data-toggle="dropdown">
           Docs
@@ -30,9 +30,7 @@ the License.
           <% }); %>
         </ul>
       </div>
-    </div>
 
-    <div class="span4 offset1">
       <div class="btn-group">
         <button class="btn dropdown-toggle dropdown-toggle-btn" data-toggle="dropdown">
           Add
@@ -40,19 +38,17 @@ the License.
         </button>
         <ul class="dropdown-menu">
           <!-- dropdown menu links -->
-           <li>
-            <a id="doc" href="#<%= database.url('app') %>/new">New doc</a>
+          <li>
+          <a id="doc" href="#<%= database.url('app') %>/new">New doc</a>
           </li>
           <% if (showNewView) { %>
-            <li>
-              <a href="#<%= database.url('app') %>/new_view">New view</a>
-            </li>
+          <li>
+          <a href="#<%= database.url('app') %>/new_view">New view</a>
+          </li>
           <% } %>
         </ul>
       </div>
-    </div>
-    <div class="span1">
-    <button id="delete-database" class="btn"><i class="icon-trash"></i></button>
+        <button id="delete-database" class="btn"><i class="icon-trash"></i> Database</button>
     </div>
   </header>
 
@@ -64,8 +60,8 @@ the License.
     <ul class="nav nav-list views">
       <li class="nav-header">Secondary Indexes</li>
       <% if (showNewView) { %>
-        <li><a id="new-view" href="#<%= database.url('app') %>/new_view" class="new"><i class="icon-plus"></i> New</a></li>
-        <% } %>
+      <li><a id="new-view" href="#<%= database.url('app') %>/new_view" class="new"><i class="icon-plus"></i> New</a></li>
+      <% } %>
     </ul>
   </nav>
 </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/f28dd6f6/src/fauxton/app/templates/documents/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index 7f5d233..cd53fc7 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -14,8 +14,10 @@ the License.
 <div class="row">
   <ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">
     <li class="active"> <a id="index-nav" class="fonticon-wrench fonticon" data-toggle="tab" href="#index"><% if (newView) { %>Create Index <% } else { %>Edit Index <% } %></a></li>
+    <% if (!newView) { %>
     <li><a id="query-nav" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Query Options</a></li>
     <li><a id="meta-nav" href="#metadata" data-toggle="tab">Design Doc Metadata</a></li>
+    <% } %>
   </ul>
   <div class="all-docs-list errors-container"></div>
   <div class="tab-content">

http://git-wip-us.apache.org/repos/asf/couchdb/blob/f28dd6f6/src/fauxton/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/fauxton.less b/src/fauxton/assets/less/fauxton.less
index 3d8d97a..0efbba9 100644
--- a/src/fauxton/assets/less/fauxton.less
+++ b/src/fauxton/assets/less/fauxton.less
@@ -1000,4 +1000,6 @@ div.spinner {
     font-size: 16px;
 }
 
-
+#delete-database {
+  float: right;
+}


[23/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Remove pronouns

Most pronouns were awkwardly referring to COUCHDB as masculine. I left
in the ones clearly referring to a named person's gender.

I grepped for 'him', 'he' and 'his' and fixed all matches I found, if
there are more, everyone is encouraged to fix them.

I corrected some awkward sentence structures as I went because I just
couldn't resist.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c2da01d1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c2da01d1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c2da01d1

Branch: refs/heads/1744-single-config-file
Commit: c2da01d1f25a0d3ff34cd1d54624351ded9604d0
Parents: 1ba9aa3
Author: Robert Newson <rn...@apache.org>
Authored: Thu Dec 5 12:23:18 2013 +0000
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Dec 5 12:28:45 2013 +0000

----------------------------------------------------------------------
 share/doc/src/api/database/changes.rst   |  6 +++---
 share/doc/src/api/database/common.rst    |  2 +-
 share/doc/src/api/database/misc.rst      |  2 +-
 share/doc/src/api/document/common.rst    |  2 +-
 share/doc/src/config/intro.rst           |  2 +-
 share/doc/src/config/query-servers.rst   |  2 +-
 share/doc/src/install/mac.rst            |  2 +-
 share/doc/src/install/windows.rst        |  2 +-
 share/doc/src/intro/security.rst         | 14 +++++++-------
 share/doc/src/maintenance/compaction.rst |  4 ++--
 share/doc/src/query-server/protocol.rst  |  4 ++--
 share/doc/src/replication/replicator.rst |  4 ++--
 12 files changed, 23 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2da01d1/share/doc/src/api/database/changes.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/database/changes.rst b/share/doc/src/api/database/changes.rst
index 21d44ea..fc46412 100644
--- a/share/doc/src/api/database/changes.rst
+++ b/share/doc/src/api/database/changes.rst
@@ -513,9 +513,9 @@ _view
 
 .. versionadded:: 1.2
 
-The special filter ``_view`` allows to use existed :ref:`map function <mapfun>`
+The special filter ``_view`` allows to use existing :ref:`map function <mapfun>`
 as the :ref:`filter <filterfun>`. If the map function emits anything for the
-processed document he counts as accepted and the changes event emits to the
+processed document it counts as accepted and the changes event emits to the
 feed. For most use-practice cases `filter` functions are very similar to `map`
 ones, so this feature helps to reduce amount of duplicated code.
 
@@ -531,7 +531,7 @@ ones, so this feature helps to reduce amount of duplicated code.
    Using ``_view`` filter doesn't queries the view index files, so you cannot
    use common :ref:`view query parameters <api/ddoc/view>` to additionally
    filter the changes feed by index key. Also, CouchDB doesn't returns
-   the result instantly as he does for views - it really uses the specified
+   the result instantly as it does for views - it really uses the specified
    map function as filter.
 
    Moreover, you cannot make such filters dynamic e.g. process the request

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2da01d1/share/doc/src/api/database/common.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/database/common.rst b/share/doc/src/api/database/common.rst
index 30c99d0..29e523f 100644
--- a/share/doc/src/api/database/common.rst
+++ b/share/doc/src/api/database/common.rst
@@ -258,7 +258,7 @@
 
 
 .. http:post:: /{db}
-  :synopsis: Creates a new document with generic ID if he had not specified
+  :synopsis: Creates a new document with generated ID if _id is not specified
 
   Creates a new document in the specified database, using the supplied JSON
   document structure.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2da01d1/share/doc/src/api/database/misc.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/database/misc.rst b/share/doc/src/api/database/misc.rst
index 7f0b484..194dac3 100644
--- a/share/doc/src/api/database/misc.rst
+++ b/share/doc/src/api/database/misc.rst
@@ -220,7 +220,7 @@ database must be examined.
                          - :mimetype:`text/plain; charset=utf-8`
   :>json array missing: List of missed revisions for specified document
   :>json array possible_ancestors: List of revisions that *may be* ancestors
-    for specified document and his current revision in requested database
+    for specified document and its current revision in requested database
   :code 200: Request completed successfully
   :code 400: Invalid database name or JSON payload
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2da01d1/share/doc/src/api/document/common.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/document/common.rst b/share/doc/src/api/document/common.rst
index bf39c35..1a61682 100644
--- a/share/doc/src/api/document/common.rst
+++ b/share/doc/src/api/document/common.rst
@@ -346,7 +346,7 @@
   :code 202: Request was accepted, but changes are not yet stored on disk
   :code 400: Invalid request body or parameters
   :code 401: Read or write privileges required
-  :code 404: Specified database, document ID  or his revision doesn't exists
+  :code 404: Specified database, document ID  or revision doesn't exists
   :code 409: Document with the specified ID already exists or specified
     revision is not latest for target document
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2da01d1/share/doc/src/config/intro.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/config/intro.rst b/share/doc/src/config/intro.rst
index f662b8f..3a5c828 100644
--- a/share/doc/src/config/intro.rst
+++ b/share/doc/src/config/intro.rst
@@ -126,7 +126,7 @@ improve configuration readability.
 
 .. note::
    In case when you'd like to remove some parameter from the `default.ini`
-   without his modification, you may specify him within the `local.ini`, but
+   without modifiying that file, you may override in `local.ini`, but
    without any value::
 
      [httpd_global_handlers]

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2da01d1/share/doc/src/config/query-servers.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/config/query-servers.rst b/share/doc/src/config/query-servers.rst
index 36092bf..19a5988 100644
--- a/share/doc/src/config/query-servers.rst
+++ b/share/doc/src/config/query-servers.rst
@@ -41,7 +41,7 @@ Query Servers Definition
   - ``LANGUAGE``: is a programming language which code this query server may
     execute. For instance, there are `python`, `ruby`, `clojure` and other query
     servers in wild. This value is also used for `ddoc` field ``language``
-    to determine query server that will process his functions.
+    to determine which query server process the functions.
 
     Note, that you may setup multiple query servers for the same programming
     language, but you have to name them different (like `python-dev` etc.).

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2da01d1/share/doc/src/install/mac.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/install/mac.rst b/share/doc/src/install/mac.rst
index 81afa6b..3b0393b 100644
--- a/share/doc/src/install/mac.rst
+++ b/share/doc/src/install/mac.rst
@@ -23,7 +23,7 @@ Installation on Mac OS X
 Installation using the Apache CouchDB native application
 ========================================================
 
-The easiest way to run CouchDB on Mac OS X is through his native Mac OS X
+The easiest way to run CouchDB on Mac OS X is through the native Mac OS X
 application. Just follow the below instructions:
 
 #. `Download Apache CouchDB for Mac OS X`_.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2da01d1/share/doc/src/install/windows.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/install/windows.rst b/share/doc/src/install/windows.rst
index ad0bfeb..b7b66af 100644
--- a/share/doc/src/install/windows.rst
+++ b/share/doc/src/install/windows.rst
@@ -33,7 +33,7 @@ This is the simplest way to go.
    - Accept the License agreement
    - Select the installation directory
    - Specify "Start Menu" group name
-   - Approve that you'd like to install CouchDB as service and let him been
+   - Approve that you'd like to install CouchDB as service and let it be
      started automatically after installation (probably, you'd like so)
    - Verify installation settings
    - Install CouchDB

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2da01d1/share/doc/src/intro/security.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/intro/security.rst b/share/doc/src/intro/security.rst
index bc4a679..a57b1b7 100644
--- a/share/doc/src/intro/security.rst
+++ b/share/doc/src/intro/security.rst
@@ -281,7 +281,7 @@ structure. So how `authentication database` is different from others?
   any document (to be honest, that they always can do)
 - There is special design document ``_auth`` that cannot be modified
 - Every document (of course, except `design documents`) represents registered
-  CouchDB users and belong to him
+  CouchDB users and belong to them
 - Users may only access (:get:`GET /_users/org.couchdb.user:Jan
   </{db}/{docid}>`) or modify (:put:`PUT /_users/org.couchdb.user:Jan
   </{db}/{docid}>`) documents that they owns
@@ -318,8 +318,8 @@ process:
 - **type** (*string*): Document type. Constantly have value ``user``
 
 Additionally, you may specify any custom fields that are relates to the target
-user. This is good place to store user's private information because only he and
-CouchDB administrators may browse it.
+user. This is good place to store user's private information because only the
+target user and CouchDB administrators may browse it.
 
 .. _org.couchdb.user:
 
@@ -396,7 +396,7 @@ the next error message:
 Password Changing
 =================
 
-This is quite common situation: user had forgot his password, it was leaked
+This is quite common situation: user had forgot their password, it was leaked
 somehow (via copy-paste, screenshot, or by typing in wrong chat window) or
 something else. Let's change password for our user `jan`.
 
@@ -466,7 +466,7 @@ CouchDB should respond with:
   {"ok":true,"name":"jan","roles":[]}
 
 Hooray! You may wonder why so complex: need to retrieve user's document, add
-special field to him, post it back - where is one big button that changes the
+special field to it, post it back - where is one big button that changes the
 password without worry about document's content? Actually, :ref:`Futon
 <intro/futon>` has such at the right bottom corner if you have logged in -
 all implementation details are hidden from your sight.
@@ -483,7 +483,7 @@ Users Public Information
 .. versionadded:: 1.4
 
 Sometimes users *wants* to share some information with the World. For instance,
-their contact email to let other users get in touch with him. To solve this
+their contact email to let other users get in touch with them. To solve this
 problem, but still keep sensitive and private information secured there is
 special :ref:`configuration <config>` option :config:option:`public_fields
 <couch_httpd_auth/public_fields>`. In this options you may define comma
@@ -503,7 +503,7 @@ security reasons.
 
 Now let's share field ``name``. First, setup the ``public_fields`` configuration
 option. Remember, that this action requires administrator's privileges and
-the next command will ask for password for user `admin`, assuming that he is
+the next command will ask for password for user `admin`, assuming that they are
 the server administrator::
 
   curl -X PUT http://localhost:5984/_config/couch_http_auth/public_fields \

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2da01d1/share/doc/src/maintenance/compaction.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/maintenance/compaction.rst b/share/doc/src/maintenance/compaction.rst
index dd99ec2..f6d0240 100644
--- a/share/doc/src/maintenance/compaction.rst
+++ b/share/doc/src/maintenance/compaction.rst
@@ -27,8 +27,8 @@ extension and transfers only actual data into. Because of this, CouchDB checks
 first for the available disk space - it should be *twice greater* than the
 compacted file's data.
 
-When all actual data successful transferred to the `compacted` file CouchDB
-*removes* the `target` replacing him with it.
+When all actual data is successfully transferred to the `compacted` file CouchDB
+replaces the `target` with the `compacted` file.
 
 
 .. _compact/db:

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2da01d1/share/doc/src/query-server/protocol.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/query-server/protocol.rst b/share/doc/src/query-server/protocol.rst
index c34a35c..c1f0b49 100644
--- a/share/doc/src/query-server/protocol.rst
+++ b/share/doc/src/query-server/protocol.rst
@@ -515,7 +515,7 @@ on three parts:
      ]
 
    When there is no more view rows to process, CouchDB sends special message,
-   that signs about that there is no more data to send from his side::
+   that signs about that there is no more data to send from its side::
 
      ["list_end"]
 
@@ -573,7 +573,7 @@ string chunks, but let's take a look on logs::
 Note, that now the Query Server sends response by lightweight chunks and if
 our communication process was extremely slow, the client will see how response
 data appears on their screen. Chunk by chunk, without waiting for the complete
-result, like he have for our previous list function.
+result, like they have for our previous list function.
 
 .. _qs/ddoc/updates:
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c2da01d1/share/doc/src/replication/replicator.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/replication/replicator.rst b/share/doc/src/replication/replicator.rst
index 05171db..0413bce 100644
--- a/share/doc/src/replication/replicator.rst
+++ b/share/doc/src/replication/replicator.rst
@@ -351,11 +351,11 @@ replicator database implementation is like a ``_changes`` feed consumer
 replicator database - in fact this feature could be implemented with an
 external script/program. This implementation detail implies that for non
 admin users, a ``user_ctx`` property, containing the user's name and a
-subset of his/her roles, must be defined in the replication document.
+subset of their roles, must be defined in the replication document.
 This is ensured by the document update validation function present in
 the default design document of the replicator database. This validation
 function also ensure that a non admin user can set a user name property
-in the ``user_ctx`` property that doesn't match his/her own name (same
+in the ``user_ctx`` property that doesn't match their own name (same
 principle applies for the roles).
 
 For admins, the ``user_ctx`` property is optional, and if it's missing


[27/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fix compatibility with jQuery 1.9+

$.browser is gone there, but still we have to disable cache for MSIE.

COUCHDB-1668


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5310b408
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5310b408
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5310b408

Branch: refs/heads/1744-single-config-file
Commit: 5310b4087b69ae4df496d00bc77a3e258888c71a
Parents: 3097e8c
Author: Alexander Shorin <kx...@apache.org>
Authored: Sun Dec 8 20:32:53 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Sun Dec 8 20:32:53 2013 +0400

----------------------------------------------------------------------
 share/www/script/jquery.couch.js | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5310b408/share/www/script/jquery.couch.js
----------------------------------------------------------------------
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
index b7e36f9..db4e8ef 100644
--- a/share/www/script/jquery.couch.js
+++ b/share/www/script/jquery.couch.js
@@ -977,7 +977,7 @@
     errorMessage = errorMessage || "Unknown error";
     timeStart = (new Date()).getTime();
     $.ajax($.extend($.extend({
-      type: "GET", dataType: "json", cache : !$.browser.msie,
+      type: "GET", dataType: "json", cache : maybeUseCache(),
       beforeSend: function(xhr){
         if(ajaxOptions && ajaxOptions.headers){
           for (var header in ajaxOptions.headers){
@@ -1058,4 +1058,17 @@
     return obj !== null ? JSON.stringify(obj) : null;
   }
 
+  /**
+   * @private
+   */
+  function maybeUseCache() {
+    if (!navigator){
+      return true;
+    }
+    else if (/(MSIE|Trident)/.test(navigator.userAgent)){
+      return false;
+    }
+    return true;
+  }
+
 })(jQuery);


[17/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fauxton: Fix search button


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/844ddfa3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/844ddfa3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/844ddfa3

Branch: refs/heads/1744-single-config-file
Commit: 844ddfa3c4ae1695327de17f9816b28d19fdceb7
Parents: 9c942b5
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Dec 4 10:33:57 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Dec 4 16:31:26 2013 +0200

----------------------------------------------------------------------
 src/fauxton/Gruntfile.js                      |  5 +++--
 src/fauxton/app/modules/databases/views.js    | 20 +++++++++++++++-----
 src/fauxton/app/modules/fauxton/components.js | 12 +++++++++++-
 3 files changed, 29 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/844ddfa3/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index 42e5e17..6a8a73a 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -142,12 +142,13 @@ module.exports = function(grunt) {
 
     // The jshint option for scripturl is set to lax, because the anchor
     // override inside main.js needs to test for them so as to not accidentally
-    // route.
+    // route. Settings expr true so we can do `migtBeNullObject && mightBeNullObject.coolFunction()`
     jshint: {
       all: ['app/**/*.js', 'Gruntfile.js', "test/core/*.js"],
       options: {
         scripturl: true,
-        evil: true
+        evil: true,
+        expr: true
       }
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/844ddfa3/src/fauxton/app/modules/databases/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/views.js b/src/fauxton/app/modules/databases/views.js
index 0f67d36..9a197a9 100644
--- a/src/fauxton/app/modules/databases/views.js
+++ b/src/fauxton/app/modules/databases/views.js
@@ -38,7 +38,8 @@ function(app, Components, FauxtonAPI) {
     template: "templates/databases/list",
     events: {
       "click button.all": "selectAll",
-      "submit form.database-search": "switchDatabase"
+      "submit form.database-search": "switchDatabase",
+      "click label.fonticon-search": "switchDatabase"
     },
 
     initialize: function(options) {
@@ -52,10 +53,15 @@ function(app, Components, FauxtonAPI) {
       };
     },
 
-    switchDatabase: function(event) {
-      event.preventDefault();
+    switchDatabase: function(event, selectedName) {
+      event && event.preventDefault();
+
       var dbname = this.$el.find("input.search-query").val();
 
+      if (selectedName) {
+        dbname = selectedName;
+      }
+
       if (dbname) {
         // TODO: switch to using a model, or Databases.databaseUrl()
         // Neither of which are in scope right now
@@ -77,7 +83,6 @@ function(app, Components, FauxtonAPI) {
         collection: this.collection
       }));
 
-
       _.each(this.paginated(), function(database) {
         this.insertView("table.databases tbody", new Views.Item({
           model: database
@@ -99,9 +104,14 @@ function(app, Components, FauxtonAPI) {
     },
 
     afterRender: function() {
+      var that = this;
       this.dbSearchTypeahead = new Components.DbSearchTypeahead({
         dbLimit: this.dbLimit,
-        el: "input.search-query"
+        el: "input.search-query",
+        onUpdate: function (item) {
+          console.log('boom', item);
+          that.switchDatabase(null, item);
+        }
       });
 
       this.dbSearchTypeahead.render();

http://git-wip-us.apache.org/repos/asf/couchdb/blob/844ddfa3/src/fauxton/app/modules/fauxton/components.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/fauxton/components.js b/src/fauxton/app/modules/fauxton/components.js
index 0443573..bcc9226 100644
--- a/src/fauxton/app/modules/fauxton/components.js
+++ b/src/fauxton/app/modules/fauxton/components.js
@@ -116,8 +116,17 @@ function(app, FauxtonAPI, ace) {
     },
 
     afterRender: function () {
+      var onUpdate = this.onUpdate;
+
       this.$el.typeahead({
-        source: this.source
+        source: this.source,
+        updater: function (item) {
+          if (onUpdate) {
+            onUpdate(item);
+          }
+
+          return item;
+        }
       });
     }
 
@@ -127,6 +136,7 @@ function(app, FauxtonAPI, ace) {
   Components.DbSearchTypeahead = Components.Typeahead.extend({
     initialize: function (options) {
       this.dbLimit = options.dbLimit || 30;
+      this.onUpdate = options.onUpdate;
       _.bindAll(this);
     },
     source: function(query, process) {


[33/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
hid code editor tab when editing a doc

The single tab was sad and lonely. Left all
the JS around, though, for when Feild Editor
decides to rejoin Code Editor.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/4f557a20
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/4f557a20
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/4f557a20

Branch: refs/heads/1744-single-config-file
Commit: 4f557a2029e495c8d1dc59ea435d1952f5cd19db
Parents: 05d2f29
Author: BigBlueHat <by...@bigbluehat.com>
Authored: Fri Dec 6 15:13:43 2013 -0500
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Dec 10 10:25:22 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/templates/documents/doc_field_editor_tabs.html | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/4f557a20/src/fauxton/app/templates/documents/doc_field_editor_tabs.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/doc_field_editor_tabs.html b/src/fauxton/app/templates/documents/doc_field_editor_tabs.html
index af34b71..766647c 100644
--- a/src/fauxton/app/templates/documents/doc_field_editor_tabs.html
+++ b/src/fauxton/app/templates/documents/doc_field_editor_tabs.html
@@ -12,8 +12,8 @@ License for the specific language governing permissions and limitations under
 the License.
 -->
 
-<ul class="nav nav-tabs">
-  <!--<li id="field_editor" class="<%= isSelectedClass('field_editor') %>"><a href="#<%= doc.url('app') %>/field_editor">Doc fields</a></li>-->
+<!--<ul class="nav nav-tabs">
+  <li id="field_editor" class="<%= isSelectedClass('field_editor') %>"><a href="#<%= doc.url('app') %>/field_editor">Doc fields</a></li>
   <li id="code_editor" class="<%= isSelectedClass('code_editor') %>"><a href="#<%= doc.url('app') %>/code_editor"><i class="icon-pencil"> </i> Code editor</a>
   </li>
-</ul>
+</ul>-->


[14/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Docs: fix indention issues.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5576644f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5576644f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5576644f

Branch: refs/heads/1744-single-config-file
Commit: 5576644f50fcf485ab4e3518badba3c02b607dbe
Parents: 818ef4f
Author: Alexander Shorin <kx...@apache.org>
Authored: Wed Dec 4 02:11:53 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Wed Dec 4 02:11:53 2013 +0400

----------------------------------------------------------------------
 share/doc/src/api/document/common.rst | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5576644f/share/doc/src/api/document/common.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/document/common.rst b/share/doc/src/api/document/common.rst
index 089d856..bf39c35 100644
--- a/share/doc/src/api/document/common.rst
+++ b/share/doc/src/api/document/common.rst
@@ -397,10 +397,12 @@ information objects with next structure:
 - **content_type** (*string*): Attachment MIME type
 - **data** (*string*): Base64-encoded content. Available if attachment content
   is requested by using the following query parameters:
+
     - ``attachments=true`` when querying a document
     - ``attachments=true&include_docs=true`` when querying a
       :ref:`changes feed <api/db/changes>` or a :ref:`view <api/ddoc/view>`
     - ``atts_since``.
+
 - **digest** (*string*): Content hash digest.
   It starts with prefix which announce hash type (``md5-``) and continues with
   Base64-encoded hash digest
@@ -408,16 +410,20 @@ information objects with next structure:
   Available if ``content_type`` is in :config:option:`list of compressible types
   <attachments/compressible_types>` when the attachment was added and the
   following query parameters are specified:
+
     - ``att_encoding_info=true`` when querying a document
     - ``att_encoding_info=true&include_docs=true`` when querying a
       :ref:`changes feed <api/db/changes>` or a :ref:`view <api/ddoc/view>`
+
 - **encoding** (*string*): Compression codec. Available if ``content_type`` is
   in :config:option:`list of compressible types
   <attachments/compressible_types>` when the attachment was added and the
   following query parameters are specified:
+
     - ``att_encoding_info=true`` when querying a document
     - ``att_encoding_info=true&include_docs=true`` when querying a
       :ref:`changes feed <api/db/changes>` or a :ref:`view <api/ddoc/view>`
+
 - **length** (*number*): Real attachment size in bytes. Not available if attachment
   content requested
 - **revpos** (*number*): Revision *number* when attachment was added


[16/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
distcheck: remove softlink in build-aux

- fixes issue introduced in COUCHDB-1911


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/9c942b50
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/9c942b50
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/9c942b50

Branch: refs/heads/1744-single-config-file
Commit: 9c942b509037c94bd88d6d6ff43fe877afd3365c
Parents: 54adb63
Author: Dave Cottlehuber <dc...@apache.org>
Authored: Wed Dec 4 11:09:00 2013 +0100
Committer: Dave Cottlehuber <dc...@apache.org>
Committed: Wed Dec 4 11:09:03 2013 +0100

----------------------------------------------------------------------
 build-aux/compile | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/9c942b50/build-aux/compile
----------------------------------------------------------------------
diff --git a/build-aux/compile b/build-aux/compile
deleted file mode 120000
index e0ab062..0000000
--- a/build-aux/compile
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/Cellar/automake/1.14/share/automake-1.14/compile
\ No newline at end of file


[46/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Document use_checkpoints and checkpoint_interval config options.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/cb909505
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/cb909505
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/cb909505

Branch: refs/heads/1744-single-config-file
Commit: cb9095053b3f5bddaae9dae9721d4d29a01734f9
Parents: 5e2a427
Author: Alexander Shorin <kx...@apache.org>
Authored: Sat Dec 14 15:37:13 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Sat Dec 14 15:38:19 2013 +0400

----------------------------------------------------------------------
 share/doc/src/config/replicator.rst      | 37 +++++++++++++++++++++++++++
 share/doc/src/json-structure.rst         |  2 ++
 share/doc/src/replication/replicator.rst |  4 +--
 3 files changed, 41 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/cb909505/share/doc/src/config/replicator.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/config/replicator.rst b/share/doc/src/config/replicator.rst
index 45451c1..515c679 100644
--- a/share/doc/src/config/replicator.rst
+++ b/share/doc/src/config/replicator.rst
@@ -111,6 +111,43 @@ Replicator Database Configuration
     .. _inet: http://www.erlang.org/doc/man/inet.html#setopts-2
 
 
+  .. config:option:: checkpoint_interval
+
+    .. versionadded:: 1.6
+
+    Defines replication checkpoint interval in milliseconds. :ref:`Replicator
+    <replication/replicator>` will :get:`requests </{db}>` Source database
+    each time after a specified amount of interval::
+
+      [replicator]
+      checkpoint_interval = 5000
+
+    Keeping this value lower raises polling rate to Source database, which
+    may be useful for frequently changing data, while higher value saves
+    traffic usage that is important for mobile clients.
+
+
+  .. config:option:: use_checkpoints
+
+     .. versionadded:: 1.6
+
+     If set as ``true`` CouchDB makes intermediate checkpoints during
+     replication from those it may continue it in case of failure or restart::
+
+      [replicator]
+      use_checkpoints = true
+
+     .. warning:: It's **not recommended** to switch this option off
+        (by setting value ``false`` to it) since without checkpoints there would
+        not be stored any replication history logs both on Source and Target,
+        forcing replication to start from the very beginning.
+
+     .. note:: Checkpoints (aka Replication Log) are stored as :ref:`local
+        documents <api/local>` both on Source and Target endpoints. In case,
+        when client has no write permission on Source database you may disable
+        them, but locally for specific replication process.
+        See :ref:`replication-settings` for more info.
+
 
   .. config:option:: cert_file
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/cb909505/share/doc/src/json-structure.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/json-structure.rst b/share/doc/src/json-structure.rst
index 042df59..7d22f1e 100644
--- a/share/doc/src/json-structure.rst
+++ b/share/doc/src/json-structure.rst
@@ -274,6 +274,8 @@ Replication Settings
 | use_checkpoints (optional)     | Whether to use replication checkpoints      |
 |                                | or not                                      |
 +--------------------------------+---------------------------------------------+
+| checkpoint_interval (optional) | Specifies checkpoint interval in ms.        |
++--------------------------------+---------------------------------------------+
 
 .. _replication-status:
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/cb909505/share/doc/src/replication/replicator.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/replication/replicator.rst b/share/doc/src/replication/replicator.rst
index e93c579..5117752 100644
--- a/share/doc/src/replication/replicator.rst
+++ b/share/doc/src/replication/replicator.rst
@@ -22,8 +22,8 @@ cancel an ongoing replication.
 
 These documents have exactly the same content as the JSON objects we use to
 ``POST`` to ``_replicate`` (fields ``source``, ``target``, ``create_target``,
-``continuous``, ``doc_ids``, ``filter``, ``query_params``,
-``use_checkpoints``).
+``continuous``, ``doc_ids``, ``filter``, ``query_params``, ``use_checkpoints``,
+``checkpoint_interval``).
 
 Replication documents can have a user defined ``_id`` (handy for finding a
 specific replication request later). Design Documents


[49/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
Fix make distcheck


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/d734db08
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/d734db08
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/d734db08

Branch: refs/heads/1744-single-config-file
Commit: d734db08e2298941b67913e55874aa2b45d7a6bc
Parents: d5f0976
Author: Alexander Shorin <kx...@apache.org>
Authored: Mon Dec 16 21:58:04 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Mon Dec 16 21:58:04 2013 +0400

----------------------------------------------------------------------
 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/d734db08/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index dea9287..378f82b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -109,7 +109,7 @@ FAUXTON_FILES = \
     fauxton/app/app.js \
     fauxton/app/config.js \
     fauxton/app/helpers.js \
-    fauxton/app/initialize.js \
+    fauxton/app/initialize.js.underscore \
     fauxton/app/load_addons.js.underscore \
     fauxton/app/main.js \
     fauxton/app/mixins.js \


[47/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
don't crash if ibrowse is already started

fix #COUCHDB-1986


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/74e0f08f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/74e0f08f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/74e0f08f

Branch: refs/heads/1744-single-config-file
Commit: 74e0f08f72f8c002674159a4f765991f101abddc
Parents: cb90950
Author: Benoit Chesneau <bc...@gmail.com>
Authored: Sat Dec 14 17:21:26 2013 +0100
Committer: Benoit Chesneau <bc...@gmail.com>
Committed: Sat Dec 14 17:21:26 2013 +0100

----------------------------------------------------------------------
 src/couch_replicator/test/04-replication-large-atts.t | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/74e0f08f/src/couch_replicator/test/04-replication-large-atts.t
----------------------------------------------------------------------
diff --git a/src/couch_replicator/test/04-replication-large-atts.t b/src/couch_replicator/test/04-replication-large-atts.t
index 5386179..a7063c7 100755
--- a/src/couch_replicator/test/04-replication-large-atts.t
+++ b/src/couch_replicator/test/04-replication-large-atts.t
@@ -64,8 +64,8 @@ main(_) ->
 
 test() ->
     couch_server_sup:start_link(test_util:config_files()),
-    ibrowse:start(),
-    crypto:start(),
+    application:start(ibrowse),
+    application:start(crypto),
     couch_config:set("attachments", "compressible_types", "text/*", false),
 
     Pairs = [


[04/50] git commit: updated refs/heads/1744-single-config-file to 1c344a9

Posted by kx...@apache.org.
docs: fix naming of figure

Fixing A “hello world” document in Futon document in Futon”.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/6350e528
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/6350e528
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/6350e528

Branch: refs/heads/1744-single-config-file
Commit: 6350e528c72d6b032247d65fee0057f4df4af24a
Parents: bae0b27
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sat Nov 30 23:01:15 2013 +0100
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Sat Nov 30 23:05:46 2013 +0100

----------------------------------------------------------------------
 share/doc/src/intro/tour.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6350e528/share/doc/src/intro/tour.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/intro/tour.rst b/share/doc/src/intro/tour.rst
index 061f79f..3e2de8c 100644
--- a/share/doc/src/intro/tour.rst
+++ b/share/doc/src/intro/tour.rst
@@ -260,7 +260,7 @@ finalize creating the hello field. Double-click the hello field's value
 You can experiment with other JSON values; e.g., ``[1, 2, "c"]`` or
 ``{"foo": "bar"}``. Once you've entered your values into the document,
 make a note of its ``_rev`` attribute and click "Save Document." The result
-should look like :ref:`intro/tour-04` document in Futon".
+should look like :ref:`intro/tour-04`.
 
 
 .. _intro/tour-03: