jonathandicarlo@jonathan-dicarlos-macbook-pro.local
9e6d103089
Merged changes.
2008-06-12 14:30:46 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
a16e4f22e2
Fixed the server URL for xmpp connections.
2008-06-12 14:30:39 -07:00
Myk Melez
8194366c43
bug 410550: stop running scheduled sync when the user is not logged into weave
2008-06-12 12:36:58 -07:00
Atul Varma
b60c082c90
Changed some of the debug() logging statements I added a few commits ago into trace() statemetns b/c they were drowning the log.
2008-06-12 12:00:19 -07:00
Myk Melez
3087d30c1b
only retrieve score once per engine when doing a scheduled sync, since retrieving the score can be a non-negligible cost for trackers that calculate the score on-demand (like the tab tracker)
2008-06-11 20:07:35 -07:00
Myk Melez
ca47e27d9b
Automated merge with ssh://hg.mozilla.org/labs/weave/
2008-06-11 20:00:59 -07:00
Myk Melez
7233ee2c14
don't sync tab entry IDs, which change with every session, to avoid generating edit commands for every tab on restart even when the tabs haven't actually changed
2008-06-11 20:00:48 -07:00
Atul Varma
56acc2b13b
async.js now keeps track of how many outstanding callbacks it has and uses this information to log warnings about coroutines that may have yielded without an outstanding callback, and coroutines that may have finished while a callback is still outstanding. These are merely 'warnings' rather than certainties because this code assumes that there is a 1:1 correspondence between accesses to self.cb and yields, and also that self.cb's are actually passed to asynchronous functions. It'd be really cool if we could actually keep track of whether a callback got garbage collected before it was called or something, though I don't know how much it'd help in the end.
2008-06-11 19:19:16 -07:00
Atul Varma
be8fa61e49
Added a few log messages to hopefully make the debugging of generators easier. Also added an id component to generators, which is part of their name, to help distinguish between concurrent instances of the same generator function. The following debug output represents the new logging infomation:
...
--
Async.Generator DEBUG runTestGenerator-0: self.cb generated at test_async_missing_yield.js:28
Async.Generator DEBUG secondGen-1: self.cb generated at test_async_missing_yield.js:20
Async.Generator DEBUG secondGen-1: done() called.
Async.Generator DEBUG runTestGenerator-0: self.cb() called, resuming coroutine.
Async.Generator DEBUG runTestGenerator-0: done() called.
Async.Generator DEBUG secondGen-1: self.cb() called, resuming coroutine.
Async.Generator DEBUG secondGen-1: done() called.
Async.Generator ERROR Async method 'secondGen-1' is missing a 'yield' call (or called done() after being finalized)
--
As you can see, I've added log messages whenever the Generator's 'cb' property is accessed--this is almost guaranteed to be very close to a 'yield' statement, and therefore provides us with a decently accurate idea of where the generator 'stopped'. We also log a message when the generator continues, and by doing so we get an idea of how the coroutines interleave.
Another idea I had was to actually match calls to self.cb with calls to 'yield' to automatically detect e.g. two yields in a row (which will ordinarily result in a generator 'hanging'), a generator exiting while a self.cb still hasn't been called, but I'm not sure what kinds of reprecussions it may have.
2008-06-11 18:58:30 -07:00
Myk Melez
b9bfc1ea31
numChanged should be the number of shared items whose data is different, not the same
2008-06-11 18:47:56 -07:00
Atul Varma
8de2595745
Merged changes.
2008-06-11 18:03:11 -07:00
Atul Varma
ed2bdb9dcc
Added test_async_missing_yield. It's very messy right now and duplicates code from other tests, but I've got some ideas about how to write better tests for async ops that I'll commit soon.
2008-06-11 18:02:46 -07:00
Maria Emerson
4af7d05d92
bug 438033: implement a better first-run wizard process; r=myk
2008-06-11 17:56:02 -07:00
Myk Melez
f096f65f19
Automated merge with ssh://hg.mozilla.org/labs/weave/
2008-06-11 17:45:54 -07:00
Myk Melez
5e916d02f2
bug 437529: yield after starting to put the status file to the server so we don't finalize the sync until the PUT request completes
2008-06-11 17:44:08 -07:00
Atul Varma
c5c9fbdf16
Modified test_async_exceptions to use a fake nsiTimer.
2008-06-11 17:10:39 -07:00
Atul Varma
1a2855c05b
Added a unit test for async exceptions.
2008-06-11 16:38:22 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
b047be1d6c
Fixed Utils.prefs.getStringPref (should be getCharPref)
2008-06-11 15:43:12 -07:00
Myk Melez
2d0e404b20
resetting the score is not an asynchronous operation, so Service::_syncEngine shouldn't yield after calling it
2008-06-11 15:23:54 -07:00
Myk Melez
05138ca62c
clarify wording in scheduled sync threshold debug statements
2008-06-11 14:16:03 -07:00
Myk Melez
b9cbb59a9e
fix typo in recent checkin that broke appending deltas to the deltas file on the server
2008-06-11 14:14:04 -07:00
Myk Melez
4d6ca43c38
once sync thresholds reach 1 (the lowest possible value), leave them there until something changes and we sync
2008-06-11 13:50:47 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
9672201b26
Resolved merging conflicts to service.js.
2008-06-11 11:54:44 -07:00
jonathandicarlo@localhost
b308c467e5
Created preferences for xmpp connection info (server url, realm, username, password), and a preference to turn xmpp messaging on or off, and made BookmarkEngine._init() call startXmppClient when this preference is true.
2008-06-11 11:13:35 -07:00
jonathandicarlo@localhost
52089ca901
Expanded bookmarkEngine.share and added some more todos for the next round of functions to implement
2008-06-11 11:01:45 -07:00
Myk Melez
8239794199
merge
2008-06-11 10:41:57 -07:00
Myk Melez
995b8141d8
bug 430363: ignore remove commands when generating deltas for history so the deltas file on the server doesn't grow too large; r=thunder
2008-06-11 10:40:24 -07:00
Myk Melez
b8067a3a48
bug 434816: use a decreasing threshold algorithm for the periodic scheduled sync to make sure we eventually sync even small changes to data; r=thunder
2008-06-11 10:38:25 -07:00
Dan Mills
505b2aa8de
merge upstream changes
2008-06-11 23:31:28 +09:00
Myk Melez
292cc1dc84
give Engine a public getter for its snapshot that TabTracker can access when generating a sync urgency score
2008-06-11 00:03:28 -07:00
Dan Mills
b3442a6e9e
Various changes:
...
Engine/RemoteStore:
* Move code to make the engine remote directory into RemoteStore.
* Fix initSession call in Engine to properly use callback / call yield.
* Do not check '_getServerData' return status in _sync, we will use exceptions from RemoteStore instead.
* Move code to push a new delta into RemoteStore (appendDelta()). Currently comments out code that forces a re-upload in cases where the server (engine) format version was different. We may add this back later into RemoteStore (?).
* Note that this patch also removes the 'this._encryptionChanged' conditional, which I believe is currently useless (we never set it).
Service:
* When wiping the server (due to a server version mismatch), skip .htaccess files, since they are usually not user-modifiable.
2008-06-11 11:12:04 +09:00
Anant Narayanan
d9354ae9de
Make sync service check score before syncing: bug #434816 (r=thunder)
2008-06-10 13:45:37 -07:00
Atul Varma
98e7589518
Factored out all the logging+async setup code from test_sharing.js into a new global function, makeAsyncTestRunner(), which turns an async.js-style generator into a unit test.
2008-06-09 20:51:23 -07:00
Atul Varma
c040b0cc2f
Refactoring: made a new function, Utils.makeTimerForCall(), which is used by test suites and async.js.
2008-06-09 19:30:11 -07:00
Atul Varma
d55da707d9
Refactorings to test_sharing.js to make it use the async do_test_pending()/do_test_finished() calls.
2008-06-09 19:18:14 -07:00
Atul Varma
fc4056ba01
Added modules/sharing.js, which provides access to the RESTful sharing API, and a unit test suite. The unit test suite is pretty heinous right now and should get a bit of refactoring.
2008-06-09 18:55:26 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
ff96529b7e
Merged
2008-06-09 18:44:21 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
be8d8ca4df
Fixed a couple of minor bugs that were preventing bookmark share from starting (like, i was skipping enabled engines instead of disabled engines... duhh)
2008-06-09 18:44:13 -07:00
Atul Varma
e578772f0b
Fixed a bug that was causing failing unit tests using async.js to not properly report error conditions.
2008-06-09 18:40:30 -07:00
Atul Varma
9a50d3a029
Added a POST method to dav.js.
2008-06-09 17:36:54 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
f0b2f120ea
Moved the writing of the outgoing-share annotation on the bookmark folder to BookmarkEngine._share, where it makes a lot more sense than it does in the share.js dialog-box code where it used to be.
2008-06-09 16:49:04 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
09185ac26b
Fixed a couple minor bugs that were preventing bookmark engine from starting up properly
2008-06-09 16:19:58 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
def99000e2
Renamed bookmarkeEngine methods so they make more sense with the new sharing model, e.g. updateAllIncomingShares instead of syncMounts.
2008-06-09 15:27:09 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
b35a6930b7
Merged
2008-06-09 12:13:03 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
512d95591b
The folder annotation for outgoing shared folders is now a string containing the username of the person the folder is being shared with. Also moved to using const strings in bookmark-menu-overlay.js.
2008-06-09 12:12:51 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
8829030b84
Merged
2008-06-09 11:49:04 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
ea75f4df3a
Fixed my code so that BookmarkEngine._sync() now works correctly to call Engine._sync() and BookmarkEngine.syncMounts(), asynchronously. Added in some TODO comments about what's going to happen in the next round of refactoring.
2008-06-09 11:48:52 -07:00
Atul Varma
e63f4ac16e
Just added a few semicolons that js2-mode warned me about.
2008-06-09 09:45:55 -07:00
Atul Varma
49aee667f5
Added more tests to test_async.js and documented them a bit.
2008-06-07 00:34:33 -07:00
Atul Varma
948613950d
Fixed an inaccuracy in the async.js test suite.
2008-06-07 00:22:57 -07:00