Skip to content

Commit

Permalink
update for revision 77, add tobias to credits
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Dirolf committed Sep 29, 2009
1 parent 9f94556 commit e8b971d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 16 deletions.
10 changes: 8 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ To apply the patch, do the following from a command line::

$ cd googleappengine-read-only
$ cd python/ # need to do this if you checked out all the different AE languages
$ patch -p0 < gae_patch.txt
$ patch -p0 < gae_patch.diff

you should see output similar to::

Expand Down Expand Up @@ -128,4 +128,10 @@ Other Notes
see if it should create an index a query is performed.

- Index creation ignores the "Ancestor" option. This option would just create an
index on '_id', which (soon) MongoDB creates automatically anyway.
index on '_id', which MongoDB creates automatically anyway.

Credits
=======
- Tobias Rodäbel <[email protected]>

- Fix for newer versions of AppEngine
2 changes: 2 additions & 0 deletions datastore_mongo_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ def _Dynamic_Next(self, next_request, query_result):
'Cursor %d not found' % cursor)

count = next_request.count()
if count == 0:
count = 1
for _ in range(count):
try:
query_result.result_list().append(self.__entity_for_mongo_document(cursor.next()))
Expand Down
25 changes: 14 additions & 11 deletions gae_patch.txt → gae_patch.diff
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
Index: dev_appserver.py
===================================================================
--- dev_appserver.py (revision 46)
+++ dev_appserver.py (working copy)
--- dev_appserver.py (revision 77)
+++ dev_appserver.py (working copy)
@@ -37,6 +37,7 @@
SCRIPT_DIR = os.path.join(DIR_PATH, 'google', 'appengine', 'tools')

EXTRA_PATHS = [
+ "PATH/TO/MONGO-APPENGINE-CONNECTOR/DIRECTORY",
DIR_PATH,
os.path.join(DIR_PATH, 'lib', 'antlr3'),
os.path.join(DIR_PATH, 'lib', 'django'),
Index: google/appengine/tools/dev_appserver.py
===================================================================
--- google/appengine/tools/dev_appserver.py (revision 46)
+++ google/appengine/tools/dev_appserver.py (working copy)
@@ -76,7 +76,7 @@
--- google/appengine/tools/dev_appserver.py (revision 77)
+++ google/appengine/tools/dev_appserver.py (working copy)
@@ -84,7 +84,7 @@
from google.appengine.api import appinfo
from google.appengine.api import croninfo
from google.appengine.api import datastore_admin
Expand All @@ -23,12 +23,15 @@ Index: google/appengine/tools/dev_appserver.py
from google.appengine.api import mail_stub
from google.appengine.api import urlfetch_stub
from google.appengine.api import user_service_stub
@@ -3040,7 +3040,7 @@

@@ -3311,9 +3311,8 @@
apiproxy_stub_map.apiproxy = apiproxy_stub_map.APIProxyStubMap()

- datastore = datastore_file_stub.DatastoreFileStub(
- app_id, datastore_path, history_path, require_indexes=require_indexes,
- trusted=trusted)
+ datastore = datastore_mongo_stub.DatastoreMongoStub(
app_id, datastore_path, history_path, require_indexes=require_indexes)
+ app_id, datastore_path, history_path, require_indexes=require_indexes)
apiproxy_stub_map.apiproxy.RegisterStub('datastore_v3', datastore)


fixed_login_url = '%s?%s=%%s' % (login_url,
6 changes: 3 additions & 3 deletions test/test_site/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ indexes:
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.

# Used 10 times in query history.
# Unused in query history -- copied from input.
- kind: Ancestor
ancestor: yes

# Used 3 times in query history.
# Unused in query history -- copied from input.
- kind: Ancestor2
ancestor: yes

Expand Down Expand Up @@ -67,7 +67,7 @@ indexes:
- name: __key__
direction: desc

# Used once in query history.
# Unused in query history -- copied from input.
- kind: TestModel
properties:
- name: number
Expand Down

0 comments on commit e8b971d

Please sign in to comment.