diff --git a/rhodecode/controllers/files.py b/rhodecode/controllers/files.py --- a/rhodecode/controllers/files.py +++ b/rhodecode/controllers/files.py @@ -246,6 +246,7 @@ class FilesController(BaseRepoController try: self.scm_model.commit_change(repo=c.rhodecode_repo, repo_name=repo_name, cs=c.cs, + user=self.rhodecode_user, author=author, message=message, content=content, f_path=f_path) h.flash(_('Successfully committed to %s' % f_path), diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -453,6 +453,7 @@ def action_parser(user_log, feed=False): 'admin_forked_repo':(_('[forked] repository'), None), 'admin_updated_repo':(_('[updated] repository'), None), 'push':(_('[pushed] into'), get_cs_links), + 'push_local':(_('[committed via RhodeCode] into'), get_cs_links), 'push_remote':(_('[pulled from remote] into'), get_cs_links), 'pull':(_('[pulled] from'), None), 'started_following_repo':(_('[started following] repository'), None), @@ -491,6 +492,7 @@ def action_parser_icon(user_log): 'admin_forked_repo':'arrow_divide.png', 'admin_updated_repo':'database_edit.png', 'push':'script_add.png', + 'push_local':'script_edit.png', 'push_remote':'connect.png', 'pull':'down_16.png', 'started_following_repo':'heart_add.png', diff --git a/rhodecode/model/scm.py b/rhodecode/model/scm.py --- a/rhodecode/model/scm.py +++ b/rhodecode/model/scm.py @@ -378,7 +378,7 @@ class ScmModel(BaseModel): raise - def commit_change(self, repo, repo_name, cs, author, message, content, + def commit_change(self, repo, repo_name, cs, user, author, message, content, f_path): if repo.alias == 'hg': @@ -394,10 +394,15 @@ class ScmModel(BaseModel): author = author.encode('utf8') m = IMC(repo) m.change(FileNode(path, content)) - m.commit(message=message, + tip = m.commit(message=message, author=author, parents=[cs], branch=cs.branch) + new_cs = tip.short_id + action = 'push_local:%s' % new_cs + + action_logger(user, action, repo_name) + self.mark_for_invalidation(repo_name)