Ability to perform force update when there are uncommitted merge added

*hg update error pattern modified;
*comments added
This commit is contained in:
Nadya Zabrodina
2014-05-08 18:44:02 +04:00
parent 11fdf6337c
commit 48d9080e39
@@ -101,7 +101,8 @@ public class HgUpdateCommand {
}
private static boolean detectLocalChangeConflict(HgCommandResult result) {
final Pattern UNCOMMITTED_PATTERN = Pattern.compile(".*abort.*uncommitted.*changes.*", Pattern.DOTALL);
// error messages from mercurial after update command: "abort: outstanding uncommitted merges", "abort: uncommitted changes"
final Pattern UNCOMMITTED_PATTERN = Pattern.compile(".*abort.*uncommitted\\s*(changes|merges).*", Pattern.DOTALL);
Matcher matcher = UNCOMMITTED_PATTERN.matcher(result.getRawError());
return matcher.matches();
}