Mercurial > evolve
diff tests/test-topic.t @ 2731:d39942773163
topics: add a new flag --age which will show last touched time for topics
This adds a new flag `--age` to `hg topic` command which will show topics
sorted by their last touched time and will also show the last touched time for
them.
This patch also adds a simple test to make sure the flag does not breaks by
future changes. Adding more tests showing output like "3 hours ago", "2 minutes
ago" etc will change as the code takes time.time() into account which will
increase with time, and hence the output will change, so we need some static
output like a date.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 11 Jul 2017 21:39:39 +0530 |
parents | b6fa7b3e13d4 |
children | adfbb984ebbb |
line wrap: on
line diff
--- a/tests/test-topic.t Tue Jul 11 11:24:43 2017 +0200 +++ b/tests/test-topic.t Tue Jul 11 21:39:39 2017 +0530 @@ -33,6 +33,9 @@ List of topics: 'hg topics' + List of topics with their last touched time sorted according to it: + 'hg topic --age' + The active topic (if any) will be prepended with a "*". The --verbose version of this command display various information on the @@ -43,6 +46,7 @@ --clear clear active topic if any -r --rev REV revset of existing revisions -l --list show the stack of changeset in the topic + --age show when you last touched the topics (some details hidden, use --verbose to show complete help) $ hg topics @@ -821,6 +825,9 @@ t1: start on fran t0^ Add file delta (base) + $ hg topics --age + * changewut (1970-01-01) + $ cd .. Testing the new config knob to forbid untopiced commit