Patchwork [2,of,3] test-extension: use a realistic Mercurial version

login
register
mail settings
Submitter Gregory Szorc
Date Jan. 16, 2015, 4:36 a.m.
Message ID <d9c6f710438d71fb5b41.1421382979@3.1.168.192.in-addr.arpa>
Download mbox | patch
Permalink /patch/7485/
State Accepted
Headers show

Comments

Gregory Szorc - Jan. 16, 2015, 4:36 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1421381028 28800
#      Thu Jan 15 20:03:48 2015 -0800
# Node ID d9c6f710438d71fb5b4114f0639d27f75d8cf1b9
# Parent  5d836f514e0bc34c7b1dec3a474f78c386791372
test-extension: use a realistic Mercurial version

Mercurial doesn't define the 3rd "patch" version field for major
releases. Don't use it in tests.

Patch

diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -917,18 +917,18 @@  If the extensions declare outdated versi
   ** Mercurial Distributed SCM (version 2.2)
   ** Extensions loaded: throw, older
 
 One extension only tested with older, one only with newer versions:
-  $ echo "util.version = lambda:'2.1.0'" >> older.py
+  $ echo "util.version = lambda:'2.1'" >> older.py
   $ rm -f older.pyc older.pyo
   $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
   >   throw 2>&1 | egrep '^\*\*'
   ** Unknown exception encountered with possibly-broken third-party extension older
   ** which supports versions 1.9.3 of Mercurial.
   ** Please disable older and try your action again.
   ** If that fixes the bug please report it to the extension author.
   ** Python * (glob)
-  ** Mercurial Distributed SCM (version 2.1.0)
+  ** Mercurial Distributed SCM (version 2.1)
   ** Extensions loaded: throw, older
 
 Older extension is tested with current version, the other only with newer:
   $ echo "util.version = lambda:'1.9.3'" >> older.py