diff mercurial/subrepo.py @ 30755:0fbb3a5c188e

rebase: provide detailed hint to abort message if working dir is not clean Detailed hint message is now provided when 'pull --rebase' operation detects unclean working dir, for example: abort: uncommitted changes (cannot pull with rebase: please commit or shelve your changes first) Added tests for uncommitted merge, and for subrepo support verifying that same hint is also passed to subrepo state check.
author Valters Vingolds <valters@vingolds.ch>
date Tue, 10 Jan 2017 09:32:27 +0100
parents d524c88511a7
children b44ab288358e 2915cc1d3429
line wrap: on
line diff
--- a/mercurial/subrepo.py	Mon Jan 09 16:02:56 2017 +0900
+++ b/mercurial/subrepo.py	Tue Jan 10 09:32:27 2017 +0100
@@ -464,12 +464,12 @@
             return _("uncommitted changes in subrepository '%s'"
                      ) % subrelpath(self)
 
-    def bailifchanged(self, ignoreupdate=False):
+    def bailifchanged(self, ignoreupdate=False, hint=None):
         """raise Abort if subrepository is ``dirty()``
         """
         dirtyreason = self.dirtyreason(ignoreupdate=ignoreupdate)
         if dirtyreason:
-            raise error.Abort(dirtyreason)
+            raise error.Abort(dirtyreason, hint=hint)
 
     def basestate(self):
         """current working directory base state, disregarding .hgsubstate