diff --git a/product/ERP5VCS/Git.py b/product/ERP5VCS/Git.py index 7279d7dca88b2789457a17496f22d78993797d00..136df352ea57c889a0495f00f0a80b1853ff014a 100644 --- a/product/ERP5VCS/Git.py +++ b/product/ERP5VCS/Git.py @@ -351,7 +351,8 @@ class Git(WorkingCopy): # first check why we could not push status = [x for x in e.stdout.splitlines() if x[:1] == '!'] 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 self.remote_git('fetch', '--prune', remote) if not self.getBehindCount():