##// END OF EJS Templates
white space cleanup
marcink -
r2367:86aa4f1f beta
parent child Browse files
Show More
@@ -454,7 +454,7 b' def action_parser(user_log, feed=False):'
454 454
455 455 if isinstance(rev, BaseChangeset):
456 456 lbl = 'r%s:%s' % (rev.revision, rev.short_id)
457 _url = url('changeset_home', repo_name=repo_name,
457 _url = url('changeset_home', repo_name=repo_name,
458 458 revision=rev.raw_id)
459 459 title = tooltip(rev.message)
460 460 else:
@@ -309,7 +309,7 b' def age(prevdate):'
309 309 for num, length in [(5, 60), (4, 60), (3, 24)]: # seconds, minutes, hours
310 310 part = order[num]
311 311 carry_part = order[num - 1]
312
312
313 313 if deltas[part] < 0:
314 314 deltas[part] += length
315 315 deltas[carry_part] -= 1
@@ -323,13 +323,13 b' def age(prevdate):'
323 323 deltas['day'] += 29
324 324 else:
325 325 deltas['day'] += month_lengths[prevdate.month - 1]
326
326
327 327 deltas['month'] -= 1
328
328
329 329 if deltas['month'] < 0:
330 330 deltas['month'] += 12
331 331 deltas['year'] -= 1
332
332
333 333 # Format the result
334 334 fmt_funcs = {
335 335 'year': lambda d: ungettext(u'%d year', '%d years', d) % d,
@@ -339,21 +339,21 b' def age(prevdate):'
339 339 'minute': lambda d: ungettext(u'%d minute', '%d minutes', d) % d,
340 340 'second': lambda d: ungettext(u'%d second', '%d seconds', d) % d,
341 341 }
342
342
343 343 for i, part in enumerate(order):
344 344 value = deltas[part]
345 345 if value == 0:
346 346 continue
347
347
348 348 if i < 5:
349 349 sub_part = order[i + 1]
350 350 sub_value = deltas[sub_part]
351 351 else:
352 352 sub_value = 0
353
353
354 354 if sub_value == 0:
355 355 return _(u'%s ago') % fmt_funcs[part](value)
356
356
357 357 return _(u'%s and %s ago') % (fmt_funcs[part](value),
358 358 fmt_funcs[sub_part](sub_value))
359 359
@@ -94,7 +94,7 b' class GitRepository(BaseRepository):'
94 94 if isinstance(cmd, basestring):
95 95 cmd = [cmd]
96 96 _str_cmd = True
97
97
98 98 gitenv = os.environ
99 99 gitenv['GIT_CONFIG_NOGLOBAL'] = '1'
100 100
@@ -82,4 +82,4 b''
82 82 </div>
83 83 </div>
84 84 ${h.end_form()}
85 </div> No newline at end of file
85 </div>
@@ -200,8 +200,8 b' class TestFilesController(TestController'
200 200
201 201 self.assertEqual(response.status, '200 OK')
202 202 heads = [
203 ('Pragma', 'no-cache'),
204 ('Cache-Control', 'no-cache'),
203 ('Pragma', 'no-cache'),
204 ('Cache-Control', 'no-cache'),
205 205 ('Content-Disposition', 'attachment; filename=%s' % filename),
206 206 ('Content-Type', '%s; charset=utf-8' % info[0]),
207 207 ]
@@ -213,7 +213,7 b' class TestFilesController(TestController'
213 213 for arch_ext in ['tar', 'rar', 'x', '..ax', '.zipz']:
214 214 fname = '27cd5cce30c96924232dffcd24178a07ffeb5dfc%s' % arch_ext
215 215
216 response = self.app.get(url(controller='files',
216 response = self.app.get(url(controller='files',
217 217 action='archivefile',
218 218 repo_name=HG_REPO,
219 219 fname=fname))
General Comments 0
You need to be logged in to leave comments. Login now