Patchwork [1,of,3] amend: in tests, do not rely on defaults -- always use explicit -d

login
register
mail settings
Submitter Greg Ward
Date June 6, 2014, 1:33 a.m.
Message ID <b3c700f75ac234203731.1402018438@queequeg.renesys.com>
Download mbox | patch
Permalink /patch/4941/
State Not Applicable
Headers show

Comments

Greg Ward - June 6, 2014, 1:33 a.m.
# HG changeset patch
# User Greg Ward <greg@gerg.ca>
# Date 1402018026 14400
#      Thu Jun 05 21:27:06 2014 -0400
# Node ID b3c700f75ac23420373129501bef302a3b687fcb
# Parent  f889409bdcc30356b8dacc1cee9bdf6c8181b993
amend: in tests, do not rely on defaults -- always use explicit -d

Having a default -d option will make it hard to test
-D/--current-date, which is coming shortly: presence of -d overrides
-D, just like with mq's qrefresh.
Greg Ward - June 6, 2014, 1:36 a.m.
On 05 June 2014, Cc mercurial-devel@selenic.com said:
> # HG changeset patch
> # User Greg Ward <greg@gerg.ca>
> # Date 1402018026 14400
> #      Thu Jun 05 21:27:06 2014 -0400
> # Node ID b3c700f75ac23420373129501bef302a3b687fcb
> # Parent  f889409bdcc30356b8dacc1cee9bdf6c8181b993
> amend: in tests, do not rely on defaults -- always use explicit -d

Argh! This time I completely forgot the patch flag. Should have been
"evolve-ext". Not for stable.

       Greg

Patch

diff --git a/tests/test-amend.t b/tests/test-amend.t
--- a/tests/test-amend.t
+++ b/tests/test-amend.t
@@ -1,6 +1,4 @@ 
   $ cat >> $HGRCPATH <<EOF
-  > [defaults]
-  > amend=-d "0 0"
   > [extensions]
   > hgext.rebase=
   > hgext.graphlog=
@@ -22,7 +20,7 @@ 
   $ hg branch foo
   marked working directory as branch foo
   (branches are permanent and global, did you want a bookmark?)
-  $ hg amend
+  $ hg amend -d '0 0'
   $ hg debugobsolete
   07f4944404050f47db2e5c5071e0e84e7a27bba9 6a022cbb61d5ba0f03f98ff2d36319dfea1034ae 0 {'date': '* *', 'user': 'test'} (glob)
   b2e32ffb533cbe1d5759638c0cd4e8abc43b2738 0 {'date': '* *', 'user': 'test'} (glob)
@@ -35,7 +33,7 @@ 
   
 Test no-op
 
-  $ hg amend
+  $ hg amend -d '0 0'
   nothing changed
   [1]
   $ glog
@@ -44,7 +42,7 @@ 
 
 Test forcing the message to the same value, no intermediate revision.
 
-  $ hg amend -m 'adda'
+  $ hg amend -d '0 0' -m 'adda'
   nothing changed
   [1]
   $ glog