Commit e6b9e582 authored by Michal Čihař's avatar Michal Čihař

Properly try to update repo before doing merge

Issue #511
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 86a39844
......@@ -640,6 +640,11 @@ class HgRepository(Repository):
if abort:
self.execute(['update', '--clean', '.'])
else:
try:
# First try update
self.execute(['update'])
except RepositoryException as error:
# Fallback to merge
try:
self.execute(['merge', '--tool', 'internal:merge'])
except RepositoryException as error:
......@@ -719,7 +724,7 @@ class HgRepository(Repository):
(is missing some revisions).
"""
missing_revs = self.execute(
['log', '--branch', 'tip', '--prune', 'default']
['log', '--branch', 'tip', '--prune', '.']
)
return missing_revs != ''
......
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