[PATCH STABLE V2] test: add test for the issue introduced by e410be860393 (issue3669)

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Tue Oct 23 03:34:59 CDT 2012


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1350979591 -32400
# Branch stable
# Node ID 5eadcd8c942448b42d1a82941d47c8f604fb6821
# Parent  71c1513fd5601f37dc8cdfb08c3943ae963e3607
test: add test for the issue introduced by e410be860393 (issue3669)

e410be860393 (released as Mercurial 2.3) introduced the issue that the
revset program started with 40 hexadecimal letters caused unexpected
result at "hg log" execution.

This issue was already fixed by bde1185f406c (released as 2.3.1), but
there is no test to examine whether this issue is certainly fixed or
not: no test fails even if bde1185f406c is backed out.

This patch adds test for this issue.

Added test is also confirmed to fail, when it is tested against:

  - Mercurial 2.3, or
  - Mercurial 2.3.1 or later with backing bde1185f406c out

diff -r 71c1513fd560 -r 5eadcd8c9424 tests/test-revset.t
--- a/tests/test-revset.t	Sun Oct 21 11:20:33 2012 -0200
+++ b/tests/test-revset.t	Tue Oct 23 17:06:31 2012 +0900
@@ -750,6 +750,14 @@
   $ log 'min(1 or 2) and not 1'
   $ log 'last(1 or 2, 1) and not 2'
 
+test revsets started with 40-chars hash (issue3669)
+
+  $ ISSUE3669_TIP=`hg tip --template '{node}'`
+  $ hg log -r "${ISSUE3669_TIP}" --template '{rev}\n'
+  9
+  $ hg log -r "${ISSUE3669_TIP}^" --template '{rev}\n'
+  8
+
 tests for 'remote()' predicate:
 #.  (csets in remote) (id)            (remote)
 1.  less than local   current branch  "default"


More information about the Mercurial-devel mailing list