Mercurial > evolve
comparison tests/test-amend.t @ 976:bed842762447
amend: add -D/--current-date option, just like mq's qrefresh has
Carefully designed so we can easily add -D to other changeset-creating
commands (probably anything that takes -d), and so that we can add
-U/--current-user as well. When that's done, the date and user options
should be very similar to those in MQ.
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Fri, 06 Jun 2014 17:43:45 -0400 |
parents | 09d6036ad596 |
children | b286f77d680c |
comparison
equal
deleted
inserted
replaced
975:09d6036ad596 | 976:bed842762447 |
---|---|
81 Specify precise commit date with -d | 81 Specify precise commit date with -d |
82 $ hg amend -d '2001-02-03 04:05:06 +0700' | 82 $ hg amend -d '2001-02-03 04:05:06 +0700' |
83 $ hg parents --template '{rev} {date|date}\n' | 83 $ hg parents --template '{rev} {date|date}\n' |
84 5 Sat Feb 03 04:05:06 2001 +0700 | 84 5 Sat Feb 03 04:05:06 2001 +0700 |
85 | 85 |
86 Specify "now" as commit date with -D | |
87 $ before=`date +%s` | |
88 $ hg amend -D | |
89 $ commit=`hg parents --template '{date|hgdate} rev{rev}\n'` | |
90 $ after=`date +%s` | |
91 $ (echo $before ; echo $commit; echo $after) | sort -k1 -n -s | |
92 \d+ (re) | |
93 \d+ 0 rev6 (re) | |
94 \d+ (re) |