You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Felix Hummel (JIRA)" <ji...@apache.org> on 2011/01/08 20:24:50 UTC

[jira] Created: (COUCHDB-1016) $.couch.replicate throws error when cancelling continous replication

$.couch.replicate throws error when cancelling continous replication
--------------------------------------------------------------------

                 Key: COUCHDB-1016
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1016
             Project: CouchDB
          Issue Type: Bug
          Components: Replication
            Reporter: Felix Hummel
            Priority: Trivial


Calling $.couch.replicate with
     {
       continous: true,
      cancel: true
    }
results in an alert error message. Should be quiet and call success handler.

Patch:

diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
index 114e580..14d2506 100644
--- a/share/www/script/jquery.couch.js
+++ b/share/www/script/jquery.couch.js
@@ -563,7 +563,7 @@
 
     replicate: function(source, target, ajaxOptions, repOpts) {
       repOpts = $.extend({source: source, target: target}, repOpts);
-      if (repOpts.continuous) {
+      if (repOpts.continuous && !repOpts.cancel) {
         ajaxOptions.successStatus = 202;
       }
       ajax({


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Resolved] (COUCHDB-1016) $.couch.replicate throws error when cancelling continous replication

Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Lehnardt resolved COUCHDB-1016.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2
                   1.1
                   1.0.3

Committed, thanks.

> $.couch.replicate throws error when cancelling continous replication
> --------------------------------------------------------------------
>
>                 Key: COUCHDB-1016
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1016
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>            Reporter: Felix Hummel
>            Priority: Trivial
>             Fix For: 1.0.3, 1.1, 1.2
>
>
> Calling $.couch.replicate with
>      {
>        continous: true,
>       cancel: true
>     }
> results in an alert error message. Should be quiet and call success handler.
> Patch:
> diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
> index 114e580..14d2506 100644
> --- a/share/www/script/jquery.couch.js
> +++ b/share/www/script/jquery.couch.js
> @@ -563,7 +563,7 @@
>  
>      replicate: function(source, target, ajaxOptions, repOpts) {
>        repOpts = $.extend({source: source, target: target}, repOpts);
> -      if (repOpts.continuous) {
> +      if (repOpts.continuous && !repOpts.cancel) {
>          ajaxOptions.successStatus = 202;
>        }
>        ajax({

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira