tests/test-phabricator.t
changeset 42950 6fb281f39c25
parent 42949 3355e0c2845f
child 43260 ec4dfcc39638
equal deleted inserted replaced
42949:3355e0c2845f 42950:6fb281f39c25
   130   saved backup bundle to $TESTTMP/repo/.hg/strip-backup/81fce7de1b7d-05339e5b-amend.hg
   130   saved backup bundle to $TESTTMP/repo/.hg/strip-backup/81fce7de1b7d-05339e5b-amend.hg
   131   $ hg phabsend -r . -m "Address review comments" --test-vcr "$VCR/phabsend-comment-updated.json"
   131   $ hg phabsend -r . -m "Address review comments" --test-vcr "$VCR/phabsend-comment-updated.json"
   132   D1253 - updated - 1acd4b60af38: create comment for phabricator test
   132   D1253 - updated - 1acd4b60af38: create comment for phabricator test
   133 
   133 
   134 Phabsending a skipped commit:
   134 Phabsending a skipped commit:
   135 #if no-py3
       
   136   $ hg phabsend --no-amend -r . --test-vcr "$VCR/phabsend-skipped.json"
   135   $ hg phabsend --no-amend -r . --test-vcr "$VCR/phabsend-skipped.json"
   137   D1253 - skipped - 1acd4b60af38: create comment for phabricator test
   136   D1253 - skipped - 1acd4b60af38: create comment for phabricator test
   138 #endif
       
   139 BROKEN: shouldn't error under py3
       
   140 #if py3
       
   141   $ hg phabsend --no-amend -r . --test-vcr "$VCR/phabsend-skipped.json"
       
   142   ** unknown exception encountered, please report by visiting
       
   143   ** https://mercurial-scm.org/wiki/BugTracker
       
   144   ** Python 3* (glob)
       
   145   ** Mercurial Distributed SCM (version *) (glob)
       
   146   ** Extensions loaded: phabricator
       
   147   Traceback (most recent call last):
       
   148     File "*/install/bin/hg", line *, in <module> (glob)
       
   149       dispatch.run()
       
   150     File "*/install/lib/python/mercurial/dispatch.py", line *, in run (glob)
       
   151       status = dispatch(req)
       
   152     File "*/install/lib/python/mercurial/dispatch.py", line *, in dispatch (glob)
       
   153       ret = _runcatch(req) or 0
       
   154     File "*/install/lib/python/mercurial/dispatch.py", line *, in _runcatch (glob)
       
   155       return _callcatch(ui, _runcatchfunc)
       
   156     File "*/install/lib/python/mercurial/dispatch.py", line *, in _callcatch (glob)
       
   157       return scmutil.callcatch(ui, func)
       
   158     File "*/install/lib/python/mercurial/scmutil.py", line *, in callcatch (glob)
       
   159       return func()
       
   160     File "*/install/lib/python/mercurial/dispatch.py", line *, in _runcatchfunc (glob)
       
   161       return _dispatch(req)
       
   162     File "*/install/lib/python/mercurial/dispatch.py", line *, in _dispatch (glob)
       
   163       cmdpats, cmdoptions)
       
   164     File "*/install/lib/python/mercurial/dispatch.py", line *, in runcommand (glob)
       
   165       ret = _runcommand(ui, options, cmd, d)
       
   166     File "*/install/lib/python/mercurial/dispatch.py", line *, in _runcommand (glob)
       
   167       return cmdfunc()
       
   168     File "*/install/lib/python/mercurial/dispatch.py", line *, in <lambda> (glob)
       
   169       d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
       
   170     File "*/install/lib/python/mercurial/util.py", line *, in check (glob)
       
   171       return func(*args, **kwargs)
       
   172     File "*/install/lib/python/hgext/phabricator.py", line *, in inner (glob)
       
   173       return fn(*args, **kwargs)
       
   174     File "*/install/lib/python/hgext/phabricator.py", line *, in phabsend (glob)
       
   175       newrevphid = querydrev(repo, str(revid))[0][b'phid']
       
   176     File "*/install/lib/python/hgext/phabricator.py", line *, in querydrev (glob)
       
   177       tree = _parse(spec)
       
   178     File "*/install/lib/python/hgext/phabricator.py", line *, in _parse (glob)
       
   179       tree, pos = parser.parser(_elements).parse(_tokenize(text))
       
   180     File "*/install/lib/python/mercurial/parser.py", line *, in parse (glob)
       
   181       self._advance()
       
   182     File "*/install/lib/python/mercurial/parser.py", line *, in _advance (glob)
       
   183       self.current = next(self._iter, None)
       
   184     File "*/install/lib/python/hgext/phabricator.py", line *, in _tokenize (glob)
       
   185       view = memoryview(text) # zero-copy slice
       
   186   TypeError: memoryview: a bytes-like object is required, not 'str'
       
   187   [1]
       
   188 #endif
       
   189 
   137 
   190 Phabreading a DREV with a local:commits time as a string:
   138 Phabreading a DREV with a local:commits time as a string:
   191   $ hg phabread --test-vcr "$VCR/phabread-str-time.json" D1285
   139   $ hg phabread --test-vcr "$VCR/phabread-str-time.json" D1285
   192   # HG changeset patch
   140   # HG changeset patch
   193   # User test <test>
   141   # User test <test>