tests/test-phabricator.t
changeset 42617 7629eb87e7f2
parent 42459 d3c81439e2ee
child 42618 c17e6a3e7356
--- a/tests/test-phabricator.t	Tue Jul 02 18:02:12 2019 +0530
+++ b/tests/test-phabricator.t	Tue Jul 16 18:38:38 2019 +0100
@@ -131,4 +131,48 @@
   $ hg phabsend -r . -m "Address review comments" --test-vcr "$VCR/phabsend-comment-updated.json"
   D1253 - updated - 1acd4b60af38: create comment for phabricator test
 
+Phabreading a DREV with a local:commits time as a string:
+BROKEN: shouldn't error
+  $ hg phabread --test-vcr "$VCR/phabread-str-time.json" D1285
+  ** unknown exception encountered, please report by visiting
+  ** https://mercurial-scm.org/wiki/BugTracker
+  ** Python * (glob)
+  ** Mercurial Distributed SCM (version *) (glob)
+  ** Extensions loaded: phabricator
+  Traceback (most recent call last):
+    File "*/install/bin/hg", line *, in <module> (glob)
+      dispatch.run()
+    File "*/install/lib/python/mercurial/dispatch.py", line *, in run (glob)
+      status = dispatch(req)
+    File "*/install/lib/python/mercurial/dispatch.py", line *, in dispatch (glob)
+      ret = _runcatch(req) or 0
+    File "*/install/lib/python/mercurial/dispatch.py", line *, in _runcatch (glob)
+      return _callcatch(ui, _runcatchfunc)
+    File "*/install/lib/python/mercurial/dispatch.py", line *, in _callcatch (glob)
+      return scmutil.callcatch(ui, func)
+    File "*/install/lib/python/mercurial/scmutil.py", line *, in callcatch (glob)
+      return func()
+    File "*/install/lib/python/mercurial/dispatch.py", line *, in _runcatchfunc (glob)
+      return _dispatch(req)
+    File "*/install/lib/python/mercurial/dispatch.py", line *, in _dispatch (glob)
+      cmdpats, cmdoptions)
+    File "*/install/lib/python/mercurial/dispatch.py", line *, in runcommand (glob)
+      ret = _runcommand(ui, options, cmd, d)
+    File "*/install/lib/python/mercurial/dispatch.py", line *, in _runcommand (glob)
+      return cmdfunc()
+    File "*/install/lib/python/mercurial/dispatch.py", line *, in <lambda> (glob)
+      d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
+    File "*/install/lib/python/mercurial/util.py", line *, in check (glob)
+      return func(*args, **kwargs)
+    File "*/install/lib/python/hgext/phabricator.py", line *, in inner (glob)
+      return fn(*args, **kwargs)
+    File "*/install/lib/python/hgext/phabricator.py", line *, in phabread (glob)
+      readpatch(repo, drevs, ui.write)
+    File "*/install/lib/python/hgext/phabricator.py", line *, in readpatch (glob)
+      meta = getdiffmeta(diffs[b'%d' % diffid])
+    File "*/install/lib/python/hgext/phabricator.py", line *, in getdiffmeta (glob)
+      meta[b'date'] = b'%d 0' % commit[b'time']
+  TypeError: %d format: a number is required, not str
+  [1]
+
   $ cd ..