Changeset - b8deb93894ea
default
0
1
0
model/scm: fix incorrect reporting of pull from remote git repo
In issue #327 it was reported that the pull of a remote git repo causes the
following inaccurate journal entry:
"committed via Kallithea into repository"
The problem is caused by the following flow:
1. pull_changes calls _handle_push for git repos, passing
action='push_remote'.
2. _handle_push calls _handle_rc_scm_extras, but does not pass 'action'
3. _handle_rc_scm_extras uses a default value of 'push_local' for action.
4. The action string 'push_local' will result in the mentioned journal
entry, via action_map in action_parser() (kallithea/lib/helpers.py).
To get a more accurate log entry, _handle_push should pass the action that
it got from pull_changes. In that case, the log entry will become
"pulled from remote into repository"
In issue #327 it was reported that the pull of a remote git repo causes the
following inaccurate journal entry:
"committed via Kallithea into repository"
The problem is caused by the following flow:
1. pull_changes calls _handle_push for git repos, passing
action='push_remote'.
2. _handle_push calls _handle_rc_scm_extras, but does not pass 'action'
3. _handle_rc_scm_extras uses a default value of 'push_local' for action.
4. The action string 'push_local' will result in the mentioned journal
entry, via action_map in action_parser() (kallithea/lib/helpers.py).
To get a more accurate log entry, _handle_push should pass the action that
it got from pull_changes. In that case, the log entry will become
"pulled from remote into repository"
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
0 comments (0 inline, 0 general)