Commit d6b63c7f authored by Arnaud Fontaine's avatar Arnaud Fontaine

ERP5Vcs: New push reject message has been introduced in at least Git 1.8.4.

parent 8605209d
...@@ -351,7 +351,8 @@ class Git(WorkingCopy): ...@@ -351,7 +351,8 @@ class Git(WorkingCopy):
# first check why we could not push # first check why we could not push
status = [x for x in e.stdout.splitlines() if x[:1] == '!'] status = [x for x in e.stdout.splitlines() if x[:1] == '!']
if (len(status) != 1 or if (len(status) != 1 or
status[0].split()[2:] != ['[rejected]', '(non-fast-forward)']): not re.match(r'.*\[rejected\]\s*\((fetch first|non-fast-forward)\)',
status[0])):
raise raise
self.remote_git('fetch', '--prune', remote) self.remote_git('fetch', '--prune', remote)
if not self.getBehindCount(): if not self.getBehindCount():
......
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