Commit Graph

1164 Commits

Author SHA1 Message Date
Edward Lee
8f5372e6b1 Update lastSync to the lastModified time from info/collections instead of updating times on each record. This is to prepare for fetching a list of GUIDs and processing a list of GUIDs. 2009-09-10 12:41:38 -07:00
Edward Lee
b0c3b9005e Bug 515676 - Allow giving objects to PUT/POST without Filters to avoid stringify([parse(stringify(stringify(obj)))])
Get rid of Filters and automatically JSON.stringify PUT/POST data that aren't strings, so plain Records can be passed in to PUT and POST. This leverages toJSON of Records to provide an object that can be serialized. Fix up client record serialize/deserialize to still escape/unescape non-ASCII.
2009-09-10 11:05:13 -07:00
Edward Lee
e8d9f12442 Bug 515678 - Provide a smart getter to get the object representation of a JSON Resource response
Always allow getting an object representation of potentially JSON response for any Resource instead of explicitly on filterDownload. Update existing Resource GETs that manually parse the response. This prevents the String response from accidentally toString()ing a filteredDownload that converted to a different type.
2009-09-10 11:04:36 -07:00
Edward Lee
0dc7cf0d81 Merge weave to weave-partial-view. 2009-09-08 23:35:21 -07:00
Edward Lee
87de5afcd8 Detect dupe separators by identifying them by their position and generate the lookup lazily with the folder/title mapping for now. 2009-09-08 23:33:58 -07:00
Edward Lee
258a985cee Expose a _handleDupe on engines and provide a custom one for bookmarks that tracks GUID changes so that it can keep an alias mapping to fix incoming item properties (id, parent, predecessor). Move out _reparentOrphans so that it is triggered on update and not just create because folders can change ids to the right parent. 2009-09-08 23:33:15 -07:00
Edward Lee
c021c5dcf6 Remove the brief log now that we only show verbose. 2009-09-07 18:24:21 -07:00
Edward Lee
19443b737b Bug 514323 - Use info/collections to check if there's new data. r=thunder
Fetch info/collections before syncing engines and set the lastModified property on the engine so that they can check if they need to process incoming.
2009-09-03 21:30:40 -07:00
Edward Lee
ec0c49c88c Bug 513191 - cloud -> client sync wipes auth cache, including weave credentials. r=thunder
Bug 506790 - Utils.setPassword unnecessarily removes logins and add them when the realm/user/pass are the same
Bug 506792 - Utils.setPassword gets called multiple times for both password and passphrase on login
Bug 514499 - Passphrase not verified with auto-login
Don't aggressively persist the password with smart (dumb?) setters that clear out the temp password; and provide a separate function to persist the login. This effectively makes setting password/passphrase always temporary until persisted, which will check if the value is different from the one already stored on disk. A number of verify/cluster functions are privitized to not need to take user/pass/passph as arguments so that the default authenticator will work, and verifyPassphrase will use the stored passphrase to correctly handle auto-login.
2009-09-03 21:11:32 -07:00
Edward Lee
9ec91eed07 Bug 514600 - Track how long various parts of sync take
Instrument all functions that are part of the sync engine (except some constructors, etc.) and generate statistics (min/max/sum/num/avg) for processing. For now with the default appender, implement toString to report just the total time.
2009-09-03 20:11:36 -07:00
Edward Lee
afeb89b845 Remove unimplemented engines so they do not initialize. 2009-09-03 19:57:02 -07:00
Edward Lee
0fa22bedac Switch to 0.5 server API for deleting multiple ids from a collection. 2009-08-31 18:30:44 -07:00
Edward Lee
0e889ae8fb Resolve bookmarks.js merge conflicts switching to batchSync (with trailing comma). 2009-08-31 18:04:40 -07:00
Edward Lee
5a3c53fd6a Merge weave to weave-partial-view w/ conflicts. 2009-08-31 18:03:35 -07:00
Edward Lee
678f177443 Detect dupe folders by title for now. Might need to update the hash during sync if titles are added. 2009-08-31 17:54:21 -07:00
Edward Lee
f8541ddf2f Pick a canonical guid to keep in a way that all machines can agree without having all data -- "smaller" guid. 2009-08-31 17:51:26 -07:00
Edward Lee
994b05a7d1 Implement multiple ids deletion for use with 0.3 APIs. 2009-08-31 17:50:23 -07:00
Edward Lee
97e3f746cb Switch end-of-sync deletes to something SyncEngine is aware of and runs at _syncFinish. 2009-08-31 17:30:34 -07:00
Edward Lee
5e9d07e643 Use places utils to find an existing bookmark dupe for an incoming record. 2009-08-31 17:29:47 -07:00
Edward Lee
5468320159 Convert uses of recordLike/findLikeId to findDupe except Bookmarks is unimplemented. 2009-08-31 17:27:30 -07:00
Edward Lee
e633a4dcea Remove mostly unused FaultTolerance service and fix up remaining references. 2009-08-31 17:17:20 -07:00
Edward Lee
c70241b5ce Bug 512457 - Report errors before they get eaten up by runInBatchMode
Save the exception from inside runBatched and not have runInBatchMode return failure, so we can then expose the exception.
2009-08-31 16:28:00 -07:00
Dan Mills
db5d4e1bd6 remove 'GPrefs' from Svc, Preferences will do fine; don't make the username in the center status a link, since the whole area is a click target; open 'generic dialogs' for change password & passphrase 2009-08-26 21:20:08 -07:00
Edward Lee
fae3856f53 Remove Firefox Weave pref pane and point Preferences... to about:weave.
--HG--
extra : rebase_source : c8e47a770d342dc52aa49d8912be66cd2fa1bfa2
2009-08-26 19:50:39 -07:00
Dan Mills
b039c047b4 about:weave polish: add localized help drawer & other small fixes
--HG--
extra : rebase_source : e82da40950dd20d6f418c90cb9b02ba896cd5693
2009-08-26 18:48:22 -07:00
Edward Lee
b8e1f6aad3 Bug 512637 - Use newlines instead of JSON collection for incremental parsing. r=thunder
Switch to newline mode when using a collection record handler, and look for newlines! Easy! Update test to provide newline-separated strings instead of JSON.
2009-08-26 18:09:41 -07:00
Edward Lee
ab865b703e Land weave-0.5-api on weave. r=thunder. 2009-08-26 18:03:52 -07:00
Edward Lee
f33e9b23f3 New User API returns server code 2 instead of http 417. 2009-08-26 17:59:50 -07:00
Edward Lee
cb743d3b33 Remove old modified arg for collections. 2009-08-26 17:52:46 -07:00
Edward Lee
76cc6cfde5 Save an exception/catch when failing to import a record. 2009-08-26 17:49:23 -07:00
Edward Lee
943386f42d Server expects catcha-challenge not captcha_challenge for new users. 2009-08-26 16:45:24 -07:00
Dan Mills
e24dbcf68f Parse new 0.5 error codes. 2009-08-26 16:44:30 -07:00
Edward Lee
4175f5ee7e Resolve lastChannel removal and 0.5 api changes. r=thunder 2009-08-26 16:09:48 -07:00
Edward Lee
9fd47b7f98 Merge weave to weave-0.5-api w/ conflicts. 2009-08-26 15:42:05 -07:00
Edward Lee
009411f482 Bug 511746 - Resource.foo shouldn't throw except in exceptional cases. r=thunder
Get rid of lastChannel and return a String object from _request with additional properties of status, succeeded, headers -- even if the response was handled by cache. Update engines to check for non-success and throw the failure. Update tests to use these additional properties instead of lastChannel, etc.
2009-08-26 15:32:46 -07:00
Dan Mills
e4ea37a013 Adds another pref for the "misc" api, makes base/misc url prefs default to auth.smc/{user,misc}/, fixes about:weave captcha path. r=Mardak 2009-08-26 15:01:28 -07:00
Edward Lee
4d055dc574 Bug 506297 - Livemarks with null site/feed uris cause sync to fail
It's possible for livemarks to not have a siteURI, so don't assume it to be there.

--HG--
extra : rebase_source : 870bb41c980834ef3e5f302739d20adfed6f7f8d
2009-08-26 14:22:11 -07:00
Edward Lee
ca6fe1108c Backed out changeset 129ca9a54aed due to burning
test_auth_manager:      FAIL
test_resource:  FAIL
2009-08-26 01:50:36 -07:00
Anant Narayanan
371e639357 Change Resource.get() semantics and support X-Weave-Alert (bug #478330)
--HG--
extra : rebase_source : e0eb1e34f85ddd041005d780590640005dc0b434
2009-08-26 00:05:57 -07:00
Edward Lee
8431f6ff7f Read out the timestamp of the POST response header because the modified time is not part of the response data. 2009-08-25 18:04:46 -07:00
Edward Lee
8c87f37ff7 Fix wipeServer to use the new 0.5 API: get list at info/collections, a hash; delete storage/<engine>. 2009-08-25 17:43:40 -07:00
Edward Lee
a2e27b0d93 Just strip out " from cluster response because Spidermonkey JSON.parse does not allow literals. 2009-08-25 17:42:25 -07:00
Edward Lee
f20a2b4143 Make an alias to the clusterURL + username as userURL. Fix whitespace problems. 2009-08-25 17:15:36 -07:00
Anant Narayanan
e7097f319f Bug 507433 - Update client to use the weave 0.5 server. r-Mardak
Initial 0.5 server API switch not quite working.
2009-08-25 17:06:13 -07:00
Edward Lee
dfe8e7e513 Don't include changes to special places Library "exclude from backup" items. 2009-08-25 16:15:05 -07:00
Edward Lee
9560da1d43 Remove unused alias for wbo/identity. 2009-08-25 08:52:52 -07:00
Mike Connor
a99aaee6d7 bug 512393 - l10n cleanup for 0.6, includes fix for bug 511548 as well 2009-08-25 00:47:35 -04:00
Edward Lee
ca002d3239 Create records with the correct parent/pred if it's still waiting for them to sync. 2009-08-24 16:17:59 -07:00
Edward Lee
e6e554073c Bug 512001 - Kill the Wizard! (and Account Pane + Login)
Remove the Wizard Dialog, Account Pane, Login Dialog, Add-ons Pane, Advanced Dialog and their related xul/js/css/strings/images. Clean up some unused functions, xul:preferences, css, strings. Orphaned functionality: autoconnect preference, reset/forgot password/passphrase.
2009-08-21 17:32:41 -07:00
Edward Lee
94e6abd74c Extend Utils.anno to handle pages and clean up GUID code for history engine. Also fix a bug where changeItemID would set annotations to expire on session. 2009-08-21 14:29:37 -07:00
Edward Lee
a4b22bc213 Remove old dumping code for debugging bug 476903. 2009-08-21 14:29:35 -07:00
Edward Lee
381bdb6576 Bug 511794 - Always use _view instead of _temp + table or just table
Also use subqueries instead of multiple queries and drop the query count down to 2.
2009-08-21 14:29:30 -07:00
Edward Lee
2906267e0c Use the plain get/set for wbo.modified because it's not needed anymore and was causing JS strict warnings: reference undefined property. 2009-08-20 17:10:14 -07:00
Edward Lee
e6732d5263 Conditionally log trace records to avoid always doing record.toString().
--HG--
extra : rebase_source : 65d8025324ed95eac29d530e2699a2f29c8a2cb7
2009-08-20 17:00:15 -07:00
Edward Lee
19f12428d3 Remove unused cancelRequested code that causes JS strict warnings. 2009-08-20 16:26:22 -07:00
Anant Narayanan
e77295f6f7 Correct network handling in findCluster
--HG--
extra : rebase_source : 7e5d2eee8927d95d17d8449bc6789619a1ac8af8
2009-08-20 12:14:34 -07:00
Edward Lee
5dfda076bb Try/catch in checkUsername if resource throws and default to generic-server-error. 2009-08-20 10:20:01 -07:00
Edward Lee
83920494dc Handle createAccount resource exceptions correctly (null ret, throw fail) and cleanup. Check for non-failure in the UI instead of only success 200. 2009-08-20 10:14:19 -07:00
Edward Lee
c29ee791ce Resolve commit conflicts from merging in weave. 2009-08-19 22:53:04 -07:00
Edward Lee
144a9195b9 Merge weave to about-weave. 2009-08-19 22:46:50 -07:00
Edward Lee
c9b2732fbe Merge weave to weave-relative. 2009-08-19 22:16:10 -07:00
Mike Connor
1f94c8885f bug 481733 - provide better error messages, handle errors better, make autoconnect more robust, r=edilee
--HG--
extra : rebase_source : 3eb68a7b4be88c7bd7b9c2b02c96218298cce2f9
2009-08-19 23:27:22 -04:00
Mike Connor
f600de80bc bug 481733 - provide better error messages, handle errors better, make autoconnect more robust, r=edilee 2009-08-19 23:27:22 -04:00
Dan Mills
b475610101 merge upstream changes 2009-08-19 20:13:53 -07:00
Edward Lee
c4393b5e3b Handle holes in bookmark folders and fix up bookmarks to be at an earlier position if a hole was detected. 2009-08-19 19:32:05 -07:00
Anant Narayanan
096dd8c74d Handle 401s from the server correctly. (bug #509552) 2009-08-19 18:22:22 -07:00
Dan Mills
bd35370bb3 initial commit of new about:weave 2009-08-18 20:03:11 -07:00
Edward Lee
87f47c35a6 Attach followers for both created items and updated items (call from applyIncoming) when it's under the right parent. Share logic for attaching followers when creating a folder then fixing the reparented children and when creating/updating an item in the right parent. 2009-08-18 18:42:15 -07:00
Edward Lee
fae8b93210 Add the successor ids when adding/removing items as well as both old and new successors when moving. 2009-08-18 18:39:10 -07:00
Edward Lee
b264174b42 When updating the position of an item, move all of its followers with it. Share chain moving logic used for fixing followers on create and updating positions. 2009-08-18 18:36:31 -07:00
Edward Lee
0435aca087 For items that have the correct parent, see if there's an item following it and reposition the chain of items to after the correct parented item. A chain of followers starts at the item with the predecessor annotation and goes until the end of the folder, an item that is looking for a predecessor, or ends up at where we started (the predecessor). 2009-08-17 02:34:03 -07:00
Edward Lee
7a297f3b5f Simplify the debug output when creating bookmarks and include the parent and position. 2009-08-16 12:39:30 -07:00
Edward Lee
014c01848d Print out the stack when failing to apply an incoming record. 2009-08-16 12:39:23 -07:00
Edward Lee
7c3bc745a0 Use the predecessorid to figure out where to put the item or save the predecessor as an annotation. 2009-08-16 12:39:15 -07:00
Edward Lee
96a4461af4 Set the predecessorid when creating records for upload. 2009-08-16 12:39:00 -07:00
Edward Lee
4cb51d9bde Remove the missing parent annotation after reparenting an orphan. 2009-08-15 14:43:10 -07:00
Edward Lee
306fc8507b Reparent orphans when creating the parent folder. 2009-08-15 01:07:40 -07:00
Edward Lee
7cc5c17773 Use a shared setGUID for new items and changing guids so that the item always ends up with the GUID (because conflicts shouldn't have been Weave generated). 2009-08-15 01:04:06 -07:00
Edward Lee
004fdf436d Store the parent GUID as an annotation if the item is missing a parent and share some parent lookup code. 2009-08-15 01:00:46 -07:00
Edward Lee
31270d064c Move _preprocess to before applyIncoming to share code for create/update/remove. 2009-08-15 01:00:32 -07:00
Edward Lee
cbba430108 Rename weaveId to just GUID and share a id<->guid function across store and tracker. 2009-08-15 00:59:49 -07:00
Edward Lee
fae7aaa071 Temporarily append everything and don't use sortindex for ordering within a folder. 2009-08-15 00:57:09 -07:00
Edward Lee
2335b057db Get rid of depth and sort on index instead. 2009-08-15 00:56:27 -07:00
Edward Lee
3ca750f464 Remove meta/mini records. Bye! 2009-08-13 18:50:54 -07:00
Edward Lee
39895d48b2 Put Annotations in Svc and expose a get/set Utils.anno call to use from bookmarks. 2009-08-13 17:59:26 -07:00
Edward Lee
983afb76a9 Remove unused bookmark annotations/constants. 2009-08-13 17:43:20 -07:00
Edward Lee
11ce9c4f76 Bug 510152 - Check for failure onStopRequest and throw the error for extra debugging
Wrap the error code with a JS Error to track the stack, and re-wrap it to get the full stack trace. Also, remove args for __request for the stack because it's sometimes the whole record..
2009-08-12 20:28:46 -07:00
Edward Lee
8a14a4dfd4 Bug 507691 - Server responds with json decode failure for fat unicode characters
Make sure we generate ASCII data for upload by escaping on serialize and unescaping on deserialize. Test to make sure serialized data is ASCII and the original records aren't modified by serialize.
2009-08-06 11:28:33 -07:00
Edward Lee
bc5f3d3be8 Bug 507296 - Sync bookmarks and history in batched mode. r=thunder
Wrap the original SyncEngine._sync function with a call to runInBatchMode, so SQL disk writes happen at the end of batch mode instead of on every change.
2009-07-30 11:52:26 -07:00
Anant Narayanan
e299866ead Re-structure window utils 2009-07-28 14:30:32 -07:00
Edward Lee
1a4c241fc9 Change client engine to override findLikeId instead of recordLike to save on some work (iterating over changed ids). 2009-07-28 10:07:07 -07:00
Edward Lee
6ddbaa9a8e Bug 506795 - Handle adding duplicate logins. r=thunder
Refactor reconcile to call findLikeId that by default will look for recordLike in the outgoing queue as it does now. Override findLikeId for password engine to search local logins.
2009-07-28 10:06:02 -07:00
Edward Lee
d02b8efc49 Bug 506302 - Shorten stack traces
Trim the full path from JS stacks and just show the file and convert nsIException traces to look like js stacks: func()@file:line. Only difference is js stacks show arguments while nsIException always shows just (). Fix up some places where we print the exception instead of the fixed up string.
2009-07-24 15:28:42 -07:00
Anant Narayanan
7b33ae1109 Remove useless check for crypto methods 2009-07-23 17:12:32 -07:00
Anant Narayanan
77050fe32c Fix verifyPassphrase for cases when the key actually exits :-/ 2009-07-23 17:01:58 -07:00
Anant Narayanan
0a5e02179f Fix verifyPassphrase returning false on first login 2009-07-23 16:52:28 -07:00
Edward Lee
39607ef7b9 Bug 505940 - Unnecessarily uploading records on first sync
Remove short-circuit logic of comparing number of keys for deepEquals and iterate through each key on both objects to make sure both have the same value.
2009-07-22 23:49:15 -07:00
Edward Lee
551f097468 Convert various debug messages to trace. 2009-07-22 21:40:18 -07:00
Mike Connor
dd7f0c31ad bug 497938 - Client should back off server when it is busy, r=edilee
--HG--
extra : rebase_source : 347137310b0ff0bba8b5267632259645c516e56b
2009-07-22 23:48:41 -04:00
Edward Lee
5860298b5a Bug 504788 - Handle different weave versions by wiping, upgrading, updating. r=thunder
Store the most newest Weave version on the server and update it if necessary on each remoteSetup. Make a concept of a compatible version where this version of Weave can read but might change records with its full sync.

--HG--
extra : rebase_source : c11cada1e3ba07e00113fca439610d0b6fd78190
2009-07-22 18:49:07 -07:00