[PATCH 1 of 2 RFC] revpair: update test to make a difference if odd range not handled specially

Yuya Nishihara yuya at tcha.org
Thu Aug 13 10:54:40 UTC 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1439450852 -32400
#      Thu Aug 13 16:27:32 2015 +0900
# Node ID e7091f706d6590cfc07a8c75b3a75124a3906279
# Parent  2780b415e6a93eeafccf57b35ddb7977d875990c
revpair: update test to make a difference if odd range not handled specially

It was added at 2a0efa1112ac, but there was no difference between -r2 and -r2:2
because the working directory was clean.

diff --git a/tests/test-diff-change.t b/tests/test-diff-change.t
--- a/tests/test-diff-change.t
+++ b/tests/test-diff-change.t
@@ -29,15 +29,25 @@ Testing diff --change
   -first
   +second
 
+  $ cd ..
+
 Test dumb revspecs (issue3474)
 
+  $ hg clone -q a dumbspec
+  $ cd dumbspec
+  $ echo "wdir" > file.txt
+
   $ hg diff -r 2:2
   $ hg diff -r "2 and 1"
   abort: empty revision range
   [255]
 
+  $ cd ..
+
 Testing diff --change when merge:
 
+  $ cd a
+
   $ for i in 1 2 3 4 5 6 7 8 9 10; do
   >    echo $i >> file.txt
   > done


More information about the Mercurial-devel mailing list