Patchwork D5690: py3: use regular expression to deal with ENOENT formatting change

login
register
mail settings
Submitter phabricator
Date Jan. 24, 2019, 8:58 p.m.
Message ID <006030b23f442c3f823a1ef5aebfc86d@localhost.localdomain>
Download mbox | patch
Permalink /patch/38007/
State Not Applicable
Headers show

Comments

phabricator - Jan. 24, 2019, 8:58 p.m.
durin42 updated this revision to Diff 13433.
Herald added a reviewer: pulkit.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5690?vs=13432&id=13433

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

AFFECTED FILES
  contrib/python3-whitelist
  tests/test-dispatch.t

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel
Yuya Nishihara - Jan. 25, 2019, 10:12 a.m.
>    $ hg log -b --cwd=inexistent default
> -  abort: $ENOENT$: 'inexistent'
> +  abort: \$ENOENT\$: ('inexistent'|inexistent) (re)

That's our fault. The exception is caught as IOError on Python 3, and our
formatting of IOError and OSError are slightly different!

Maybe we should unify them.
phabricator - Jan. 25, 2019, 10:15 a.m.
yuja added a comment.


  >   $ hg log -b --cwd=inexistent default
  > 
  > - abort: $ENOENT$: 'inexistent' +  abort: \$ENOENT\$: ('inexistent'|inexistent) (re)
  
  That's our fault. The exception is caught as IOError on Python 3, and our
  formatting of IOError and OSError are slightly different!
  
  Maybe we should unify them.

REPOSITORY
  rHG Mercurial

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

To: durin42, #hg-reviewers, pulkit
Cc: yuja, mercurial-devel

Patch

diff --git a/tests/test-dispatch.t b/tests/test-dispatch.t
--- a/tests/test-dispatch.t
+++ b/tests/test-dispatch.t
@@ -95,7 +95,7 @@ 
   [255]
 
   $ hg log -b --cwd=inexistent default
-  abort: $ENOENT$: 'inexistent'
+  abort: \$ENOENT\$: ('inexistent'|inexistent) (re)
   [255]
 
   $ hg log -b '--config=ui.traceback=yes' 2>&1 | grep '^Traceback'
@@ -188,7 +188,7 @@ 
 specified" should include filename even when it is empty
 
   $ hg -R a archive ''
-  abort: $ENOENT$: ''
+  abort: \$ENOENT\$(: '')? (re)
   [255]
 
 #if no-outer-repo
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -155,6 +155,7 @@ 
 test-dirstate-race.t
 test-dirstate.t
 test-dispatch.py
+test-dispatch.t
 test-doctest.py
 test-double-merge.t
 test-drawdag.t