Commit 83aaa091 authored by Julien Muchembled's avatar Julien Muchembled

ERP5VCS: revert local commit if push failed due to authentication

parent 0e98548d
...@@ -352,8 +352,10 @@ class Git(WorkingCopy): ...@@ -352,8 +352,10 @@ class Git(WorkingCopy):
reset += 1 reset += 1
# retry to push everything # retry to push everything
self.remote_git(*push_args) self.remote_git(*push_args)
except GitError, e: except (GitError, GitLoginError), e:
self.git('reset', '--soft', '@{%u}' % reset) self.git('reset', '--soft', '@{%u}' % reset)
if isinstance(e, GitLoginError):
raise
portal_status_message = str(e) portal_status_message = str(e)
else: else:
head = self.git('rev-parse', '--short', 'HEAD') head = self.git('rev-parse', '--short', 'HEAD')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment