Guest User

Untitled

a guest
May 21st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.63 KB | None | 0 0
  1. diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
  2. --- a/mercurial/dispatch.py
  3. +++ b/mercurial/dispatch.py
  4. @@ -154,6 +154,8 @@
  5.          ui.warn(_("abort: %s\n") % inst)
  6.          if inst.hint:
  7.              ui.warn(_("(%s)\n") % inst.hint)
  8. +        if inst.errlist:
  9. +            ui.warn("  " + "\n  ".join(inst.errlist) + "\n")
  10.      except ImportError, inst:
  11.          ui.warn(_("abort: %s!\n") % inst)
  12.          m = str(inst).split()[-1]
  13. diff --git a/mercurial/error.py b/mercurial/error.py
  14. --- a/mercurial/error.py
  15. +++ b/mercurial/error.py
  16. @@ -35,6 +35,7 @@
  17.      def __init__(self, *args, **kw):
  18.          Exception.__init__(self, *args)
  19.          self.hint = kw.get('hint')
  20. +        self.errlist = kw.get('errlist')
  21.  
  22.  class ConfigError(Abort):
  23.      'Exception raised when parsing config files'
  24. diff --git a/mercurial/merge.py b/mercurial/merge.py
  25. --- a/mercurial/merge.py
  26. +++ b/mercurial/merge.py
  27. @@ -90,11 +90,16 @@
  28.      folded = {}
  29.      for fn in mctx:
  30.          folded[foldf(fn)] = fn
  31. +
  32. +    errlist = list()
  33.      for fn in wctx.unknown():
  34.          f = foldf(fn)
  35.          if f in folded and mctx[folded[f]].cmp(wctx[f]):
  36. -            raise util.Abort(_("untracked file in working directory differs"
  37. -                               " from file in requested revision: '%s'") % fn)
  38. +            errlist.append(fn)
  39. +    if errlist:
  40. +        raise util.Abort("untracked file(s) in working directory differ"
  41. +                         " from file(s) in requested revision: ",
  42. +                         errlist=errlist)
  43.  
  44.  def _checkcollision(mctx, wctx):
  45.      "check for case folding collisions in the destination context"
Add Comment
Please, Sign In to add comment