[PATCH 2 of 2] Add tests for the new log option --tolerant
Jason Harris
jason.f.harris at gmail.com
Sat Dec 11 21:20:01 CST 2010
# HG changeset patch
# User jfh <jason at jasonfharris.com>
# Date 1292122983 -3600
# Node ID 5db5ecaa3719a539a0f646dcbcd5d2a8edd20f2b
# Parent 5eec305ce06f7f096871f70aacedcd838eb802c2
Add tests for the new log option --tolerant
Allow revision ranges outside the repository to be handled tolerantly. For
instance assume that the repository has 15 changesets and the user asks for log
--tolerant --rev "0:23" then Mercurial should interpret this request as --rev
"0:15" and not fail with an abort: unknown revision '23'! error.
diff --git a/tests/test-log.t b/tests/test-log.t
--- a/tests/test-log.t
+++ b/tests/test-log.t
@@ -306,6 +306,24 @@
+log --tolerant test
+
+ $ hg log --rev "0:20" --template "{rev}:{node|short}\n"
+ abort: unknown revision '20'!
+ [255]
+
+ $ hg log --tolerant --rev "0:20" --template "{rev}:{node|short}\n"
+ 0:8580ff50825a
+ 1:784de7cef101
+ 2:41dd4284081e
+ 3:7c6c671bb7cc
+ 4:66c1345dc4f9
+ 5:bbf33324ba83
+ 6:0c2d57219b70
+
+
+
+
log --follow tests
$ hg init ../follow
More information about the Mercurial-devel
mailing list