Patchwork D2505: py3: port the markdirver extension in tests/test-resolve.t

login
register
mail settings
Submitter phabricator
Date March 1, 2018, 9:35 a.m.
Message ID <2501c9536162e4b799f099f53c636eae@localhost.localdomain>
Download mbox | patch
Permalink /patch/28535/
State Not Applicable
Headers show

Comments

phabricator - March 1, 2018, 9:35 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGef3955ca072c: py3: port the markdirver extension in tests/test-resolve.t (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2505?vs=6205&id=6237

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

AFFECTED FILES
  tests/test-resolve.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-resolve.t b/tests/test-resolve.t
--- a/tests/test-resolve.t
+++ b/tests/test-resolve.t
@@ -85,24 +85,25 @@ 
 
   $ cat > $TESTTMP/markdriver.py << EOF
   > '''mark and unmark files as driver-resolved'''
-  > from mercurial import merge, registrar, scmutil
+  > from mercurial import merge, registrar, scmutil, pycompat
   > cmdtable = {}
   > command = registrar.command(cmdtable)
   > @command(b'markdriver',
-  >   [('u', 'unmark', None, '')],
-  >   'FILE...')
+  >   [(b'u', b'unmark', None, b'')],
+  >   b'FILE...')
   > def markdriver(ui, repo, *pats, **opts):
   >     wlock = repo.wlock()
+  >     opts = pycompat.byteskwargs(opts)
   >     try:
   >         ms = merge.mergestate.read(repo)
   >         m = scmutil.match(repo[None], pats, opts)
   >         for f in ms:
   >             if not m(f):
   >                 continue
-  >             if not opts['unmark']:
-  >                 ms.mark(f, 'd')
+  >             if not opts[b'unmark']:
+  >                 ms.mark(f, b'd')
   >             else:
-  >                 ms.mark(f, 'u')
+  >                 ms.mark(f, b'u')
   >         ms.commit()
   >     finally:
   >         wlock.release()