Merge lp:~jderose/ubuntu/natty/couchdb/fix-716237 into lp:ubuntu/natty/couchdb

Proposed by Jason Gerard DeRose
Status: Superseded
Proposed branch: lp:~jderose/ubuntu/natty/couchdb/fix-716237
Merge into: lp:ubuntu/natty/couchdb
Diff against target: 143 lines (+131/-0)
2 files modified
debian/changelog (+7/-0)
debian/patches/jquery15-fix.patch (+124/-0)
To merge this branch: bzr merge lp:~jderose/ubuntu/natty/couchdb/fix-716237
Reviewer Review Type Date Requested Status
Martin Pitt Needs Fixing
Review via email: mp+51592@code.launchpad.net

This proposal has been superseded by a proposal from 2011-03-04.

Description of the change

Just copied the updated jquery.couch.js from:

https://github.com/apache/couchdb/commit/064a1d9483cfa33bd0fcc97cb1d97e8e342fdeaf

Have confirmed that this makes things all worky again in Futon and in dmedia-gtk (which also uses jquery.couch.js).

To post a comment you must log in.
50. By Jason Gerard DeRose

Make Futon work with jQuery 1.5 (LP: #716237)

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks! Can you please fix that to be a broken out debian/patches/ quilt patch, instead of applying it inline?

review: Needs Fixing
Revision history for this message
Jason Gerard DeRose (jderose) wrote :

Martin,

Okay, gotcha. Is there a way to generate the quilt patch from the bzr branch? Maybe I misunderstood how the distributed development stuff works... isn't the idea to be able to just work from bzr directly? That sure seems like awesome thing to be able to do :)

Will update accordingly, thanks for review!

Revision history for this message
Martin Pitt (pitti) wrote :

You could try something like "bzr diff > debian/patches/patchname" and remove the debian/ parts from it (plus add it to series).

> isn't the idea to be able to just work from bzr directly?

That'd require machinery to automatically turn debian/patches/foo*.patch into bzr pipelines or looms, which we don't have yet :/ But yes, it'd be the right thing to do with revision control.

51. By Jason Gerard DeRose

Okay, back to drawing board, will use quilt properly

52. By Jason Gerard DeRose

Merged from natty

53. By Jason Gerard DeRose

debian/patches/jquery15-fix.patch: Make Futon work with jQuery 1.5 via
git commit 064a1d9483cfa33bd0fcc97cb1d97e8e342fdeaf (LP: #716237)

54. By Jason Gerard DeRose

Added info in patch comment

Revision history for this message
Jason Gerard DeRose (jderose) wrote :

Martin,

Okay, I think I setup the patch correctly, although I'm not all that patch system savvy, so please let me know if there is anything I should change/improve.

Thanks for taking the time to look at this!

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-02-28 10:48:58 +0000
3+++ debian/changelog 2011-03-04 04:25:11 +0000
4@@ -1,3 +1,10 @@
5+couchdb (1.0.1-0ubuntu12) natty; urgency=low
6+
7+ * debian/patches/jquery15-fix.patch: Make Futon work with jQuery 1.5 via
8+ git commit 064a1d9483cfa33bd0fcc97cb1d97e8e342fdeaf (LP: #716237)
9+
10+ -- Jason Gerard DeRose <jderose@novacut.com> Thu, 03 Mar 2011 21:14:34 -0700
11+
12 couchdb (1.0.1-0ubuntu11) natty; urgency=low
13
14 * Fix LP: #725064 - Rebuild for libmozjs ABI breakage, again :(
15
16=== added file 'debian/patches/jquery15-fix.patch'
17--- debian/patches/jquery15-fix.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/jquery15-fix.patch 2011-03-04 04:25:11 +0000
19@@ -0,0 +1,124 @@
20+## Description: Make Futon work with jQuery 1.5
21+## Origin/Author: https://github.com/apache/couchdb/commit/064a1d9483cfa33bd0fcc97cb1d97e8e342fdeaf
22+## Bug: https://bugs.launchpad.net/couchdb/+bug/716237
23+diff -Nur -x '*.orig' -x '*~' fix-716237//share/www/script/jquery.couch.js fix-716237.new//share/www/script/jquery.couch.js
24+--- fix-716237//share/www/script/jquery.couch.js 2011-03-03 21:08:06.625297000 -0700
25++++ fix-716237.new//share/www/script/jquery.couch.js 2011-03-03 21:13:47.548923366 -0700
26+@@ -36,7 +36,7 @@
27+ }
28+ user_doc.type = "user";
29+ if (!user_doc.roles) {
30+- user_doc.roles = []
31++ user_doc.roles = [];
32+ }
33+ return user_doc;
34+ };
35+@@ -88,7 +88,7 @@
36+ $.ajax({
37+ type: "GET", url: this.urlPrefix + "/_session",
38+ complete: function(req) {
39+- var resp = $.httpData(req, "json");
40++ var resp = httpData(req, "json");
41+ if (req.status == 200) {
42+ if (options.success) options.success(resp);
43+ } else if (options.error) {
44+@@ -115,7 +115,7 @@
45+ user_doc = prepareUserDoc(user_doc, password);
46+ $.couch.userDb(function(db) {
47+ db.saveDoc(user_doc, options);
48+- })
49++ });
50+ },
51+
52+ login: function(options) {
53+@@ -124,7 +124,7 @@
54+ type: "POST", url: this.urlPrefix + "/_session", dataType: "json",
55+ data: {name: options.name, password: options.password},
56+ complete: function(req) {
57+- var resp = $.httpData(req, "json");
58++ var resp = httpData(req, "json");
59+ if (req.status == 200) {
60+ if (options.success) options.success(resp);
61+ } else if (options.error) {
62+@@ -141,7 +141,7 @@
63+ type: "DELETE", url: this.urlPrefix + "/_session", dataType: "json",
64+ username : "_", password : "_",
65+ complete: function(req) {
66+- var resp = $.httpData(req, "json");
67++ var resp = httpData(req, "json");
68+ if (req.status == 200) {
69+ if (options.success) options.success(resp);
70+ } else if (options.error) {
71+@@ -167,7 +167,7 @@
72+ doc._attachments["rev-"+doc._rev.split("-")[0]] = {
73+ content_type :"application/json",
74+ data : Base64.encode(rawDocs[doc._id].raw)
75+- }
76++ };
77+ return true;
78+ }
79+ }
80+@@ -385,7 +385,7 @@
81+ dataType: "json", data: toJSON(doc),
82+ beforeSend : beforeSend,
83+ complete: function(req) {
84+- var resp = $.httpData(req, "json");
85++ var resp = httpData(req, "json");
86+ if (req.status == 200 || req.status == 201 || req.status == 202) {
87+ doc._id = resp.id;
88+ doc._rev = resp.rev;
89+@@ -450,7 +450,7 @@
90+ copyDoc: function(docId, options, ajaxOptions) {
91+ ajaxOptions = $.extend(ajaxOptions, {
92+ complete: function(req) {
93+- var resp = $.httpData(req, "json");
94++ var resp = httpData(req, "json");
95+ if (req.status == 201) {
96+ if (options.success) options.success(resp);
97+ } else if (options.error) {
98+@@ -583,7 +583,7 @@
99+ if (!uuidCache.length) {
100+ ajax({url: this.urlPrefix + "/_uuids", data: {count: cacheNum}, async: false}, {
101+ success: function(resp) {
102+- uuidCache = resp.uuids
103++ uuidCache = resp.uuids;
104+ }
105+ },
106+ "Failed to retrieve UUID batch."
107+@@ -593,6 +593,27 @@
108+ }
109+ });
110+
111++ var httpData = $.httpData || function( xhr, type, s ) { // lifted from jq1.4.4
112++ var ct = xhr.getResponseHeader("content-type") || "",
113++ xml = type === "xml" || !type && ct.indexOf("xml") >= 0,
114++ data = xml ? xhr.responseXML : xhr.responseText;
115++
116++ if ( xml && data.documentElement.nodeName === "parsererror" ) {
117++ $.error( "parsererror" );
118++ }
119++ if ( s && s.dataFilter ) {
120++ data = s.dataFilter( data, type );
121++ }
122++ if ( typeof data === "string" ) {
123++ if ( type === "json" || !type && ct.indexOf("json") >= 0 ) {
124++ data = $.parseJSON( data );
125++ } else if ( type === "script" || !type && ct.indexOf("javascript") >= 0 ) {
126++ $.globalEval( data );
127++ }
128++ }
129++ return data;
130++ };
131++
132+ function ajax(obj, options, errorMessage, ajaxOptions) {
133+ options = $.extend({successStatus: 200}, options);
134+ ajaxOptions = $.extend({contentType: "application/json"}, ajaxOptions);
135+@@ -608,7 +629,7 @@
136+ },
137+ complete: function(req) {
138+ try {
139+- var resp = $.httpData(req, "json");
140++ var resp = httpData(req, "json");
141+ } catch(e) {
142+ if (options.error) {
143+ options.error(req.status, req, e);

Subscribers

People subscribed via source and target branches