D5089: py3: fix test-status.t
This revision was automatically updated to reflect the committed changes. Closed by commit rHG125fc478719f: py3: fix test-status.t (authored by mbthomas, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D5089?vs=12098&id=12101#toc REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5089?vs=12098&id=12101 REVISION DETAIL https://phab.mercurial-scm.org/D5089 AFFECTED FILES contrib/python3-whitelist tests/test-status.t CHANGE DETAILS diff --git a/tests/test-status.t b/tests/test-status.t --- a/tests/test-status.t +++ b/tests/test-status.t @@ -272,8 +272,17 @@ $ hg status -A -Tpickle > pickle >>> from __future__ import print_function >>> import pickle - >>> print(sorted((x['status'], x['path']) for x in pickle.load(open("pickle" - [('!', 'deleted'), ('?', 'pickle'), ('?', 'unknown'), ('A', 'added'), ('A', 'copied'), ('C', '.hgignore'), ('C', 'modified'), ('I', 'ignored'), ('R', 'removed')] + >>> data = sorted((x[b'status'].decode(), x[b'path'].decode()) for x in pickle.load(open("pickle", r"rb"))) + >>> for s, p in data: print("%s %s" % (s, p)) + ! deleted + ? pickle + ? unknown + A added + A copied + C .hgignore + C modified + I ignored + R removed $ rm pickle $ echo "^ignoreddir$" > .hgignore diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist --- a/contrib/python3-whitelist +++ b/contrib/python3-whitelist @@ -563,6 +563,7 @@ test-status-inprocess.py test-status-rev.t test-status-terse.t +test-status.t test-storage.py test-stream-bundle-v2.t test-strict.t To: mbthomas, #hg-reviewers, pulkit Cc: durin42, yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5089: py3: fix test-status.t
durin42 added inline comments. INLINE COMMENTS > mbthomas wrote in test-status.t:540 > Yes - it's `'...'` on py2.7 and `b'...'` on py3. Is there a better way to > check for these in debugoutput? Queued with this hunk dropped. Thanks! REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5089 To: mbthomas, #hg-reviewers, pulkit Cc: durin42, yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5089: py3: fix test-status.t
mbthomas added a comment. Just saw yuya's comment, I will do that. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5089 To: mbthomas, #hg-reviewers, pulkit Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5089: py3: fix test-status.t
mbthomas added inline comments. INLINE COMMENTS > pulkit wrote in test-status.t:540 > are we hiding a b'' prefix here? Yes - it's `'...'` on py2.7 and `b'...'` on py3. Is there a better way to check for these in debugoutput? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5089 To: mbthomas, #hg-reviewers, pulkit Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5089: py3: fix test-status.t
yuja added a comment. >> test-status.t:540 > >status = [ > > - {*'path': '1/2/3/4/5/b.txt'*}, (glob) > > + {*'path': *'1/2/3/4/5/b.txt'*}, (glob) > >] > > are we hiding a b'' prefix here? Let's fix formatter.debugformatter. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5089 To: mbthomas, #hg-reviewers, pulkit Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: D5089: py3: fix test-status.t
> > test-status.t:540 > >status = [ > > - {*'path': '1/2/3/4/5/b.txt'*}, (glob) > > + {*'path': *'1/2/3/4/5/b.txt'*}, (glob) > >] > > are we hiding a b'' prefix here? Let's fix formatter.debugformatter. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5089: py3: fix test-status.t
pulkit added inline comments. INLINE COMMENTS > test-status.t:540 >status = [ > - {*'path': '1/2/3/4/5/b.txt'*}, (glob) > + {*'path': *'1/2/3/4/5/b.txt'*}, (glob) >] are we hiding a b'' prefix here? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5089 To: mbthomas, #hg-reviewers, pulkit Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5089: py3: fix test-status.t
mbthomas updated this revision to Diff 12098. mbthomas added a comment. Herald added a reviewer: pulkit. Add to whitelist REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5089?vs=12097&id=12098 BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D5089 AFFECTED FILES contrib/python3-whitelist tests/test-status.t CHANGE DETAILS diff --git a/tests/test-status.t b/tests/test-status.t --- a/tests/test-status.t +++ b/tests/test-status.t @@ -272,8 +272,17 @@ $ hg status -A -Tpickle > pickle >>> from __future__ import print_function >>> import pickle - >>> print(sorted((x['status'], x['path']) for x in pickle.load(open("pickle" - [('!', 'deleted'), ('?', 'pickle'), ('?', 'unknown'), ('A', 'added'), ('A', 'copied'), ('C', '.hgignore'), ('C', 'modified'), ('I', 'ignored'), ('R', 'removed')] + >>> data = sorted((x[b'status'].decode(), x[b'path'].decode()) for x in pickle.load(open("pickle", r"rb"))) + >>> for s, p in data: print("%s %s" % (s, p)) + ! deleted + ? pickle + ? unknown + A added + A copied + C .hgignore + C modified + I ignored + R removed $ rm pickle $ echo "^ignoreddir$" > .hgignore @@ -528,7 +537,7 @@ $ hg status --config ui.formatdebug=True --rev 1 1 status = [ - {*'path': '1/2/3/4/5/b.txt'*}, (glob) + {*'path': *'1/2/3/4/5/b.txt'*}, (glob) ] #if windows diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist --- a/contrib/python3-whitelist +++ b/contrib/python3-whitelist @@ -529,6 +529,7 @@ test-status-inprocess.py test-status-rev.t test-status-terse.t +test-status.t test-storage.py test-stream-bundle-v2.t test-strict.t To: mbthomas, #hg-reviewers, pulkit Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5089: py3: fix test-status.t
mbthomas created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D5089 AFFECTED FILES tests/test-status.t CHANGE DETAILS diff --git a/tests/test-status.t b/tests/test-status.t --- a/tests/test-status.t +++ b/tests/test-status.t @@ -272,8 +272,17 @@ $ hg status -A -Tpickle > pickle >>> from __future__ import print_function >>> import pickle - >>> print(sorted((x['status'], x['path']) for x in pickle.load(open("pickle" - [('!', 'deleted'), ('?', 'pickle'), ('?', 'unknown'), ('A', 'added'), ('A', 'copied'), ('C', '.hgignore'), ('C', 'modified'), ('I', 'ignored'), ('R', 'removed')] + >>> data = sorted((x[b'status'].decode(), x[b'path'].decode()) for x in pickle.load(open("pickle", r"rb"))) + >>> for s, p in data: print("%s %s" % (s, p)) + ! deleted + ? pickle + ? unknown + A added + A copied + C .hgignore + C modified + I ignored + R removed $ rm pickle $ echo "^ignoreddir$" > .hgignore @@ -528,7 +537,7 @@ $ hg status --config ui.formatdebug=True --rev 1 1 status = [ - {*'path': '1/2/3/4/5/b.txt'*}, (glob) + {*'path': *'1/2/3/4/5/b.txt'*}, (glob) ] #if windows To: mbthomas, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel