~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/controllers/changelog_ui.py

  • Committer: webmaster at geoffish
  • Date: 2011-07-10 22:53:59 UTC
  • mto: (459.2.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 461.
  • Revision ID: webmaster@geoffish.tk-20110710225359-oeairailjy6gzpuk
Fixed buggy merging and removed IDE files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
 
2
# Copyright (C) 2008, 2009 Canonical Ltd.
2
3
# Copyright (C) 2006  Robey Pointer <robey@lag.net>
3
4
# Copyright (C) 2006  Goffredo Baroncelli <kreijack@inwind.it>
4
5
#
19
20
 
20
21
import urllib
21
22
 
22
 
try:
23
 
    import simplejson
24
 
except ImportError:
25
 
    import json as simplejson
 
23
import simplejson
26
24
 
27
25
from paste.httpexceptions import HTTPServerError
28
26
 
49
47
 
50
48
        try:
51
49
            revid, start_revid, revid_list = history.get_view(
52
 
                revid, start_revid, filter_file_id, query)
 
50
                revid, start_revid, filter_file_id, query,
 
51
                extra_rev_count=pagesize+1)
53
52
            util.set_context(kwargs)
54
53
 
55
54
            if (query is not None) and (len(revid_list) == 0):
88
87
                self._branch.is_root,
89
88
                'changes'))
90
89
 
 
90
        show_tag_col = False
 
91
        for change in changes:
 
92
            if change.tags is not None:
 
93
                show_tag_col = True
 
94
                break
 
95
 
91
96
        return {
92
97
            'branch': self._branch,
93
98
            'changes': changes,
 
99
            'show_tag_col': show_tag_col,
94
100
            'data': simplejson.dumps(data),
95
101
            'util': util,
96
102
            'history': history,
98
104
            'navigation': navigation,
99
105
            'filter_file_id': filter_file_id,
100
106
            'start_revid': start_revid,
101
 
            'viewing_from': (orig_start_revid is not None) and 
 
107
            'viewing_from': (orig_start_revid is not None) and
102
108
                            (orig_start_revid != history.last_revid),
103
109
            'query': query,
104
110
            'search_failed': search_failed,