Commit Graph

1764 Commits

Author SHA1 Message Date
Keegan McAllister 9b9373d2ba Make callbacks_table class data rather than global
(imported from commit 39699304255b475ccab8a4760b155f3307cfe5d9)
2012-11-08 10:47:09 -05:00
Keegan McAllister f89366f5dd Use a new-style class for Callbacks
For consistency with the rest of our Python code.

(imported from commit 02659914f50b488039fe8c65bd1de796e2a16e65)
2012-11-08 10:47:09 -05:00
Keegan McAllister 3b8dbbc7d7 Use django.utils.timezone.now consistently
(imported from commit f223d9c1f6c77012db342b8be7aaed964b9f18c6)
2012-11-07 18:51:33 -05:00
Keegan McAllister bc2e7d77eb confirmation: Use timezone-aware datetime object
django.utils.timezone.now returns an aware datetime object because USE_TZ =
True.

Fixes #80.

(imported from commit c60f491fe00a98626ecced94fc3ea1f71f939a38)
2012-11-07 18:50:26 -05:00
Tim Abbott 218588ead0 models: Comment the IntegrityError code in get_client (#326).
(imported from commit 85c3580084dcd4c28f319a19d684e5a5af7069c7)
2012-11-07 18:22:32 -05:00
Keegan McAllister 205d839a58 context_processors: Rename misleadingly named unused parameter
(imported from commit 45fcb3e349747f430372767c21a50660cbb19228)
2012-11-07 17:46:46 -05:00
Keegan McAllister 0d538d91ac test: Fail if generate-fixtures fails
(imported from commit b13167ad04837cfeb64989ff43fec2e6ae890a33)
2012-11-07 17:46:46 -05:00
Keegan McAllister 35171b9d3e Tweak gitit config
The "signup code" was left over from a very early era.  We now use HTTP auth
and there's no way to register an account within Gitit at all.

(imported from commit 20f1e10de1fd978d0045c2fed2254e37ab6f7b6c)
2012-11-07 17:46:46 -05:00
Keegan McAllister b9452b5644 apache/ports.conf: Document which part is custom
(imported from commit b25c4ce8847509ce07d98e1caee402aa33369c4d)
2012-11-07 17:46:46 -05:00
Keegan McAllister 513d19cc67 urls: Line things up
Whitespace-only change.

(imported from commit 2616e9e208d77a1a2c0b9973bcc19dbbf607b134)
2012-11-07 17:46:46 -05:00
Keegan McAllister 0c9122e3f9 urls: Remove name=...
Per Django docs, these are used to set an alias for use by reverse().  We
mostly don't use these, and they clutter up the file.  We do use
reverse('send_confirm') so it stays.

(imported from commit 7789e588e187fae71638bd77a553801c48fa8818)
2012-11-07 17:46:46 -05:00
Tim Abbott 573cc4db33 models: Add unique_together restrictions for various tables.
(imported from commit 30957d465d5e7bc728e854b8b99f6ad99b98dba6)
2012-11-07 17:31:16 -05:00
Tim Abbott ff369373bf populate_db: Strip whitespace from stream names.
(imported from commit a33b4983994040060f8d7631238250297f4d152e)
2012-11-07 17:30:50 -05:00
Tim Abbott 71e2e1cb1b zephyr_mirror: Support subscribing to non-ascii Zephyr classes.
(imported from commit 85437f09c4738df11208e623db566a9409e501a3)
2012-11-07 16:42:06 -05:00
Keegan McAllister e54e93dccb zephyr_mirror: Don't open /dev/null to disable logging
(imported from commit 804e627d6d70bbf2ae1ee2f467b79ed0582ced0f)
2012-11-07 16:36:40 -05:00
Keegan McAllister d7a2b0930e zephyr_mirror: Always pass a tuple to string %
(imported from commit 64a59e23c3aa3fceb350ed348812258c90ff09da)
2012-11-07 16:36:36 -05:00
Tim Abbott 02b7bcf1a4 populate_db: Make double-unsubscribes not a fatal error.
(imported from commit 4dadb28f9c310659ddd780e98da70da55ace7187)
2012-11-07 15:49:45 -05:00
Tim Abbott 95c39cbc76 bulk_create: Use a (large) batch_size with MySQL.
(imported from commit 529fef7dd55bb8a5f4e286f7c896f4b14b0d1b8d)
2012-11-07 15:49:45 -05:00
Tim Abbott e7abe13cd6 The empty string shouldn't be a valid stream name.
(imported from commit 1fa878d7d51d3c3444ac75edf08b32f886683964)
2012-11-07 15:42:32 -05:00
Tim Abbott 935632428b zephyr_mirror: Use zephyr's bulk subscription functionality.
Previously we were spending 15 seconds on linerva (and more like 2.5
minutes on the not-yet-operational zmirror.humbughq.com) to subscribe
to all of our streams.

(imported from commit c36cb1c26868f142683d9c92d4875fcd4931886e)
2012-11-07 15:37:55 -05:00
Tim Abbott 7aaa08d9b2 zephyr_mirror: Eliminate the confusing "subs" global.
zephyr.Subscriptions() is a singleton class, intended to be accessed
as it is used.

(imported from commit f76c1b1129adb19ba96ed17f441492edf859a748)
2012-11-07 15:37:55 -05:00
Tim Abbott a87ac2dec9 zephyr_mirror: Fix missing api key file error message.
(imported from commit 3efe7fb8b2d593418c37dbab9389a8df9c27d003)
2012-11-07 15:37:55 -05:00
Tim Abbott 90439bbd9e zephyr_mirror: Make the logging options require the log path as an argument.
This is for supporting running the mirroring bot on a server without
AFS.

(imported from commit 400bf32f17aca984fa40c3b1222893214497eaa0)
2012-11-07 15:37:55 -05:00
Tim Abbott 36d5fabf29 zephyr_mirror: Use os.path.join for constructing the root_path.
(imported from commit d894ab68430e42233a7aa6b289f01e790f8c8586)
2012-11-07 15:37:46 -05:00
Tim Abbott 97aaa20b8c zephyr_mirror: Add option to change the root path.
This is relevant for running not out of AFS on Linerva.

(imported from commit 28549830c99ad5a52349fbcc9e53dcb3c5ef25a1)
2012-11-07 15:35:26 -05:00
Keegan McAllister a0232811b2 check-mirroring: Get the max_message_id from get_profile()
(imported from commit 95f457b91563a92eee24c4487c00abe7132b4ff8)
2012-11-07 15:34:44 -05:00
Keegan McAllister 05c6089c40 Add get_profile to Python API bindings
(imported from commit 8f39764f4dce95e30a355cfb4ef9bf63db097160)
2012-11-07 15:34:44 -05:00
Keegan McAllister a815a253f7 get_profile: Return max_message_id
(imported from commit 5b5c853e667e47ff46ff14558f1e27f619f77cd7)
2012-11-07 15:34:44 -05:00
Keegan McAllister d461453250 Remove max_message_id from updates response
(imported from commit 1d8ce12a4d32dfb761617b4c2aa8e9fbe3ad2994)
2012-11-07 15:34:44 -05:00
Jessica McKellar 9077d51d54 For now, allow all characters in stream names.
We've had multiple requests from MIT zephyr users to allow
non-alphanumeric stream names, and we haven't decided what we want to
allow, so for now allow everything.

Note that the web client and mirror script limit stream names to 30
characters, which is our database limit.

(imported from commit 2acb5ee04e5ee7c40031ac831e12d09d04bbb2e6)
2012-11-07 15:12:03 -05:00
Jessica McKellar 1801292320 Update autocomplete lists only on case-insensitive new additions.
That way your autocomplete isn't polluted by multiple casings of the
same subject.

(imported from commit 0f28029be45bb48981f2e29ccb9f1490c1a56c94)
2012-11-07 14:51:51 -05:00
Jessica McKellar a2c6975ca2 Be case-insensitive about subjects when collapsing and narrowing.
(imported from commit 0baf20179c037c3eac82d8db20c6ec8062bb136a)
2012-11-07 14:51:51 -05:00
Tim Abbott 8752b3bf18 zephyr_mirror: don't crash when the zephyr server returns SERVNAK errors.
Zephyr has this great property where a small fraction of the time, the
Zephyr server rejects your attempt to subscribe to something for no
particular reason, returning a "SERVNAK" error.

(imported from commit 6d5ed033d46d77a5b02539a816453724740f8fb0)
2012-11-07 13:56:21 -05:00
Keegan McAllister 3b78280786 search_button_handler: Remove unnecessary id lookup
(imported from commit e6da0cfa0b39e48c63464eaf91673c3133ad4cd4)
2012-11-07 11:51:03 -05:00
Keegan McAllister 3de0a0d1dd Use rows.id consistently
(imported from commit 58098986b90609484e4a7c10688eeb27f2c126b2)
2012-11-07 11:51:03 -05:00
Keegan McAllister 644702892b Return an int from rows.id
I believe this is more correct for our one existing user,
update_selected_message.

(imported from commit a2f1a20c0d885a4e6de49c69d930844177549cbe)
2012-11-07 11:51:03 -05:00
Jessica McKellar ed50c17582 check-all: add missing message mouseover globals.
(imported from commit c04770de18940bfff24598392c08f0ed1cec76d7)
2012-11-07 11:19:47 -05:00
Luke Faraone 8bcbe55238 Clarify line in hotkey.js per trac #253
(imported from commit d5bacdd4cef2f62ba22e3a47d25c3a656cf601c0)
2012-11-07 10:43:42 -05:00
Keegan McAllister bbb70b496b send_pointer_update: Use an absolute path for /json/update_pointer
(imported from commit 8711df3f705023e763cf916a7dfbf43054d4823f)
2012-11-06 17:04:10 -05:00
Keegan McAllister 3923e2eca6 subs: Use an absolute path for /json/subscriptions/list
(imported from commit 82a2de5373e9170b27f4157c566e7ee23ba1f278)
2012-11-06 17:04:10 -05:00
Keegan McAllister 5f20d71065 Rename people_hash -> people_set
And use 'true' for consistency with stream_list_as_set.

(imported from commit 1cfb0a64eae368388cb2e0e57162d3b3d5ef88c1)
2012-11-06 17:04:10 -05:00
Keegan McAllister 22dc487a72 Rename stream_list_hash -> stream_set
This makes the intent more clear, since the values are all 'true'.

(imported from commit 1f1d6e206af9f2258b55bc77e7722158c2ffac98)
2012-11-06 17:04:10 -05:00
Keegan McAllister 651566ba16 Use an Object for associative stream_list_hash, not an array
From the Google JavaScript Style Guide:

    If you need a map/hash use Object instead of Array in these cases because
    the features that you want are actually features of Object and not of Array.
    Array just happens to extend Object (like any other object in JS and
    therefore you might as well have used Date, RegExp or String).

(imported from commit 048e7a640137f3919c0097a421b7b6c366b65cfe)
2012-11-06 17:04:10 -05:00
Keegan McAllister 4f53457f2f show_all_messages: Use .empty() instead of .html("")
(imported from commit 8df159bee6512856fd61eb5038e4b12470724553)
2012-11-06 17:04:10 -05:00
Keegan McAllister d6d34075ab Remove duplication in message validation
NB: this does change which error will be flagged if multiple conditions apply.

(imported from commit 080bf7d764f1f16ad57b365ad9aa6bc48f3cff72)
2012-11-06 17:04:10 -05:00
Keegan McAllister 366ca546e8 compose: Remove duplicated code in getters / setters
(imported from commit 3a17ef6fbcf9b8b4a31a54656152a1d37dea4fa0)
2012-11-06 17:04:10 -05:00
Keegan McAllister fcf21177fe compose.start: Reformat default opts
(imported from commit e0266265dbe81d19f3a666b2f822dffd2d8793d5)
2012-11-06 17:04:09 -05:00
Tim Abbott adab0c1880 Add staging/dev certs to puppet configuration.
(imported from commit 1415d909a4619adecc3b43ad0b7817f473bc2a73)
2012-11-06 16:59:28 -05:00
Tim Abbott 6a690d4d4a Create our various bot users without subscriptions.
(imported from commit 9f9249cdb295f147d8b8b5cef17709c9aaa66418)
2012-11-06 16:59:28 -05:00
Tim Abbott 837fdca1c4 feedback-bot: Only forward messages sent directly to feedback@.
(imported from commit 4a4d1e4a3ba00deb929647f7f35f2982c2b4add6)
2012-11-06 16:59:28 -05:00