comparison rhodecode/controllers/changelog.py @ 1818:cf51bbfb120e beta

auto white-space removal
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 29 Dec 2011 07:35:51 +0200
parents 833f9dec0a06
children 89efedac4e6c
comparison
equal deleted inserted replaced
1817:523b1011a625 1818:cf51bbfb120e
69 69
70 p = int(request.params.get('page', 1)) 70 p = int(request.params.get('page', 1))
71 branch_name = request.params.get('branch', None) 71 branch_name = request.params.get('branch', None)
72 try: 72 try:
73 if branch_name: 73 if branch_name:
74 collection = [z for z in 74 collection = [z for z in
75 c.rhodecode_repo.get_changesets(start=0, 75 c.rhodecode_repo.get_changesets(start=0,
76 branch_name=branch_name)] 76 branch_name=branch_name)]
77 c.total_cs = len(collection) 77 c.total_cs = len(collection)
78 else: 78 else:
79 collection = list(c.rhodecode_repo) 79 collection = list(c.rhodecode_repo)
80 c.total_cs = len(c.rhodecode_repo) 80 c.total_cs = len(c.rhodecode_repo)
81 81
82 82
83 c.pagination = RepoPage(collection, page=p, item_count=c.total_cs, 83 c.pagination = RepoPage(collection, page=p, item_count=c.total_cs,
84 items_per_page=c.size, branch=branch_name) 84 items_per_page=c.size, branch=branch_name)
85 except (RepositoryError, ChangesetDoesNotExistError, Exception), e: 85 except (RepositoryError, ChangesetDoesNotExistError, Exception), e:
86 log.error(traceback.format_exc()) 86 log.error(traceback.format_exc())
87 h.flash(str(e), category='warning') 87 h.flash(str(e), category='warning')
88 return redirect(url('home')) 88 return redirect(url('home'))
89 89
90 self._graph(c.rhodecode_repo, collection, c.total_cs, c.size, p) 90 self._graph(c.rhodecode_repo, collection, c.total_cs, c.size, p)
91 91
92 c.branch_name = branch_name 92 c.branch_name = branch_name
93 c.branch_filters = [('',_('All Branches'))] + \ 93 c.branch_filters = [('',_('All Branches'))] + \
137 if type != graphmod.CHANGESET: 137 if type != graphmod.CHANGESET:
138 continue 138 continue
139 data.append(['', vtx, edges]) 139 data.append(['', vtx, edges])
140 140
141 c.jsdata = json.dumps(data) 141 c.jsdata = json.dumps(data)
142