D4170: linelog: fix bytes/str issue in exception raise on Python 3

2018-08-09 Thread durin42 (Augie Fackler)
durin42 added a comment.


  >   I assume LineLogError is a kind of a ProgrammingError. If it's a 
user-facing
  >   error, we'll have to convert a message to bytes.
  
  Yep - it should never happen (barring misuse of the API or woefully corrupt 
linelog files).

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4170

To: durin42, #hg-reviewers
Cc: yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D4170: linelog: fix bytes/str issue in exception raise on Python 3

2018-08-09 Thread durin42 (Augie Fackler)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG70a19e804deb: linelog: fix bytes/str issue in exception 
raise on Python 3 (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4170?vs=10100=10102

REVISION DETAIL
  https://phab.mercurial-scm.org/D4170

AFFECTED FILES
  mercurial/linelog.py

CHANGE DETAILS

diff --git a/mercurial/linelog.py b/mercurial/linelog.py
--- a/mercurial/linelog.py
+++ b/mercurial/linelog.py
@@ -371,7 +371,7 @@
 executed += 1
 if pc is not None:
 raise LineLogError(
-'Probably hit an infinite loop in linelog. Program:\n' +
+r'Probably hit an infinite loop in linelog. Program:\n' +
 self.debugstr())
 ar = annotateresult(rev, lines, lastpc)
 self._lastannotate = ar



To: durin42, #hg-reviewers
Cc: yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D4170: linelog: fix bytes/str issue in exception raise on Python 3

2018-08-09 Thread yuja (Yuya Nishihara)
yuja added a comment.


  Queued, thanks.
  
  >   raise LineLogError(
  > 
  > - 'Probably hit an infinite loop in linelog. Program:\n' + +
r'Probably hit an infinite loop in linelog. Program:\n' + self.debugstr())
  
  I assume LineLogError is a kind of a ProgrammingError. If it's a user-facing
  error, we'll have to convert a message to bytes.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4170

To: durin42, #hg-reviewers
Cc: yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: D4170: linelog: fix bytes/str issue in exception raise on Python 3

2018-08-09 Thread Yuya Nishihara
Queued, thanks.

>  raise LineLogError(
> -'Probably hit an infinite loop in linelog. Program:\n' +
> +r'Probably hit an infinite loop in linelog. Program:\n' +
>  self.debugstr())

I assume LineLogError is a kind of a ProgrammingError. If it's a user-facing
error, we'll have to convert a message to bytes.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D4170: linelog: fix bytes/str issue in exception raise on Python 3

2018-08-09 Thread durin42 (Augie Fackler)
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4170

AFFECTED FILES
  mercurial/linelog.py

CHANGE DETAILS

diff --git a/mercurial/linelog.py b/mercurial/linelog.py
--- a/mercurial/linelog.py
+++ b/mercurial/linelog.py
@@ -371,7 +371,7 @@
 executed += 1
 if pc is not None:
 raise LineLogError(
-'Probably hit an infinite loop in linelog. Program:\n' +
+r'Probably hit an infinite loop in linelog. Program:\n' +
 self.debugstr())
 ar = annotateresult(rev, lines, lastpc)
 self._lastannotate = ar



To: durin42, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel