changeset 3427:cbeee8d31d58 stable

trouble-reports: yield to in code reporting of new troubles Mercurial 4.5 has the feature in core, let core do the reporting in this case.
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 20 Jan 2018 11:07:18 +0100
parents be284a34b822
children 6904e6bea2f7
files hgext3rd/evolve/__init__.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py	Fri Jan 19 20:41:58 2018 +0100
+++ b/hgext3rd/evolve/__init__.py	Sat Jan 20 11:07:18 2018 +0100
@@ -809,6 +809,10 @@
 @eh.wrapcommand("unbundle")
 def warnobserrors(orig, ui, repo, *args, **kwargs):
     """display warning is the command resulted in more instable changeset"""
+    # hg < 4.4 does not have the feature built in. bail out otherwise.
+    if util.safehasattr(scmutil, '_reportstroubledchangesets'):
+        return orig(ui, repo, *args, **kwargs)
+
     # part of the troubled stuff may be filtered (stash ?)
     # This needs a better implementation but will probably wait for core.
     filtered = repo.changelog.filteredrevs