comparison MoinMoin/search/Xapian.py @ 5018:67578c72e2d9

Xapian2009: create_page works right no need to check if revision is '99999999'.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Sun, 16 Aug 2009 09:52:24 +0200
parents bc42755b5820
children a93283d1f827
comparison
equal deleted inserted replaced
5017:09e577676ba2 5018:67578c72e2d9
522 request.page = page 522 request.page = page
523 wikiname = request.cfg.interwikiname or u"Self" 523 wikiname = request.cfg.interwikiname or u"Self"
524 pagename = page.page_name 524 pagename = page.page_name
525 mtime = page.mtime_usecs() 525 mtime = page.mtime_usecs()
526 revision = str(page.get_real_rev()) 526 revision = str(page.get_real_rev())
527 if revision == '99999999':
528 # XXX
529 # While page is being created with MoinMoin._tests.create_page, it is indexed and has revision 99999999.
530 # This magic number is taken from http://hg.moinmo.in/moin/1.9/file/dce251f8cfc3/MoinMoin/Page.py#l307
531 # Note that a page object which create_page returns will have right revision!
532 revision = '0'
533 itemid = "%s:%s:%s" % (wikiname, pagename, revision) 527 itemid = "%s:%s:%s" % (wikiname, pagename, revision)
534 author = page.edit_info().get('editor', '?') 528 author = page.edit_info().get('editor', '?')
535 # XXX: Hack until we get proper metadata 529 # XXX: Hack until we get proper metadata
536 language, stem_language = self._get_languages(page) 530 language, stem_language = self._get_languages(page)
537 categories = self._get_categories(page) 531 categories = self._get_categories(page)