##// END OF EJS Templates
logged local commit with special action via action_logger,
marcink -
r1312:70a5a9a5 beta
parent child Browse files
Show More
@@ -246,6 +246,7 b' class FilesController(BaseRepoController'
246 246 try:
247 247 self.scm_model.commit_change(repo=c.rhodecode_repo,
248 248 repo_name=repo_name, cs=c.cs,
249 user=self.rhodecode_user,
249 250 author=author, message=message,
250 251 content=content, f_path=f_path)
251 252 h.flash(_('Successfully committed to %s' % f_path),
@@ -453,6 +453,7 b' def action_parser(user_log, feed=False):'
453 453 'admin_forked_repo':(_('[forked] repository'), None),
454 454 'admin_updated_repo':(_('[updated] repository'), None),
455 455 'push':(_('[pushed] into'), get_cs_links),
456 'push_local':(_('[committed via RhodeCode] into'), get_cs_links),
456 457 'push_remote':(_('[pulled from remote] into'), get_cs_links),
457 458 'pull':(_('[pulled] from'), None),
458 459 'started_following_repo':(_('[started following] repository'), None),
@@ -491,6 +492,7 b' def action_parser_icon(user_log):'
491 492 'admin_forked_repo':'arrow_divide.png',
492 493 'admin_updated_repo':'database_edit.png',
493 494 'push':'script_add.png',
495 'push_local':'script_edit.png',
494 496 'push_remote':'connect.png',
495 497 'pull':'down_16.png',
496 498 'started_following_repo':'heart_add.png',
@@ -378,7 +378,7 b' class ScmModel(BaseModel):'
378 378 raise
379 379
380 380
381 def commit_change(self, repo, repo_name, cs, author, message, content,
381 def commit_change(self, repo, repo_name, cs, user, author, message, content,
382 382 f_path):
383 383
384 384 if repo.alias == 'hg':
@@ -394,10 +394,15 b' class ScmModel(BaseModel):'
394 394 author = author.encode('utf8')
395 395 m = IMC(repo)
396 396 m.change(FileNode(path, content))
397 m.commit(message=message,
397 tip = m.commit(message=message,
398 398 author=author,
399 399 parents=[cs], branch=cs.branch)
400 400
401 new_cs = tip.short_id
402 action = 'push_local:%s' % new_cs
403
404 action_logger(user, action, repo_name)
405
401 406 self.mark_for_invalidation(repo_name)
402 407
403 408
General Comments 0
You need to be logged in to leave comments. Login now