# HG changeset patch # User Marcin Kuzminski # Date 2012-07-01 16:11:38 # Node ID c35980ae7958742774c090881dc9915c5f15c6ed # Parent 9d4b80743a2ad6685e8426650186aef18d2b7a41 Don't always return action, raise an Exception if we cannot check what the action is diff --git a/rhodecode/lib/hooks.py b/rhodecode/lib/hooks.py --- a/rhodecode/lib/hooks.py +++ b/rhodecode/lib/hooks.py @@ -90,7 +90,6 @@ def log_pull_action(ui, repo, **kwargs): :param ui: :param repo: """ - extras = dict(repo.ui.configitems('rhodecode_extras')) username = extras['username'] repository = extras['repository'] diff --git a/rhodecode/lib/middleware/simplehg.py b/rhodecode/lib/middleware/simplehg.py --- a/rhodecode/lib/middleware/simplehg.py +++ b/rhodecode/lib/middleware/simplehg.py @@ -224,7 +224,10 @@ class SimpleHg(BaseVCSController): if cmd in mapping: return mapping[cmd] - return 'pull' + return 'pull' + + raise Exception('Unable to detect pull/push action !!' + 'Are you using non standard command or client ?') def __inject_extras(self, repo_path, baseui, extras={}): """