# HG changeset patch
# User Kevin Bullock <kbull...@ringworld.org>
# Date 1525291788 18000
#      Wed May 02 15:09:48 2018 -0500
# Node ID 138a6f224f8529ecdc69daac026684ee0892eb5e
# Parent  214aea0ce91528a7b22ba34ab991c43963872d23
land: add test demonstrating JSON error on empty revset

diff --git a/tests/test-land.t b/tests/test-land.t
--- a/tests/test-land.t
+++ b/tests/test-land.t
@@ -1,4 +1,21 @@
   $ . "$TESTDIR/lib.sh"
+BUG: Fails with no accepted nodes to land.
+  $ land
+  hg: parse error: empty query
+  Traceback (most recent call last):
+    File "/Users/kbullock/Source/Projects/hg/accept/tests/../land", line 57, 
in <module>
+      conf.source, _thesenodesrevset(all_accepted))))
+    File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py",
 line 290, in load
+      **kw)
+    File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py",
 line 338, in loads
+      return _default_decoder.decode(s)
+    File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",
 line 366, in decode
+      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
+    File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",
 line 384, in raw_decode
+      raise ValueError("No JSON object could be decoded")
+  ValueError: No JSON object could be decoded
+  [1]
+
 If only r2 is accepted, nothing happens.
   $ echo `hg log -r 2 -R source --template '{node}'` > bob-accepted
   $ land
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to