tests/test-topic.t
branchmercurial-4.5
changeset 4362 8bd60e09dfb4
parent 4205 6be09fb2c08c
parent 4360 522abf1d70b7
child 4363 a2fdbece7ce1
child 4551 7de160f6c7a9
equal deleted inserted replaced
4314:1fd2440afaf7 4362:8bd60e09dfb4
   814   ### target: default (branch), ambiguous rebase destination - branch 'default' has 2 heads
   814   ### target: default (branch), ambiguous rebase destination - branch 'default' has 2 heads
   815   s1: start on fran
   815   s1: start on fran
   816   s0^ Add file delta (base current)
   816   s0^ Add file delta (base current)
   817 
   817 
   818   $ hg topics --age
   818   $ hg topics --age
   819    * fran (1970-01-01 by test)
   819    * fran (1970-01-01 by test, 1 changesets)
       
   820 
       
   821   $ cd ..
       
   822 
       
   823 Relation subscript in revsets
       
   824 =============================
       
   825 
       
   826   $ hg init more-than-one-commit-per-topic
       
   827   $ cd more-than-one-commit-per-topic
       
   828   $ cat > .hg/hgrc << EOF
       
   829   > [phases]
       
   830   > publish=false
       
   831   > EOF
       
   832 
       
   833   $ echo 0 > foo
       
   834   $ hg ci -qAm 0
       
   835   $ hg topic featureA
       
   836   marked working directory as topic: featureA
       
   837   $ echo 1 > foo
       
   838   $ hg ci -qm 1
       
   839   $ echo 2 > foo
       
   840   $ hg ci -qm 2
       
   841   $ echo 3 > foo
       
   842   $ hg ci -qm 3
       
   843   $ hg topic --clear
       
   844   $ echo 4 > foo
       
   845   $ hg ci -qm 4
       
   846 
       
   847   $ tlog 'all()'
       
   848   0: 
       
   849   1: featureA
       
   850   2: featureA
       
   851   3: featureA
       
   852   4: 
   820 
   853 
   821   $ cd ..
   854   $ cd ..
   822 
   855 
   823 Testing the new config knob to forbid untopiced commit
   856 Testing the new config knob to forbid untopiced commit
   824 ======================================================
   857 ======================================================
   858 Testing the --age flag for `hg topics`
   891 Testing the --age flag for `hg topics`
   859 ======================================
   892 ======================================
   860 
   893 
   861   $ hg topic topic1970 --rev 0
   894   $ hg topic topic1970 --rev 0
   862   switching to topic topic1970
   895   switching to topic topic1970
   863   changed topic on 1 changes
   896   changed topic on 1 changesets to "topic1970"
   864 
   897 
   865   $ hg add b
   898   $ hg add b
   866   $ hg topic topic1990
   899   $ hg topic topic1990
   867   $ hg ci -m "Added b" --config devel.default-date="631152000 0" --user "foo"
   900   $ hg ci -m "Added b" --config devel.default-date="631152000 0" --user "foo"
   868   active topic 'topic1990' grew its first changeset
   901   active topic 'topic1990' grew its first changeset
   898      topic1970 (1 changesets)
   931      topic1970 (1 changesets)
   899      topic1990 (1 changesets)
   932      topic1990 (1 changesets)
   900    * topic2010 (1 changesets)
   933    * topic2010 (1 changesets)
   901 
   934 
   902   $ hg topics --age
   935   $ hg topics --age
   903    * topic2010 (2010-01-01 by bar)
   936    * topic2010 (2010-01-01 by bar, 1 changesets)
   904      topic1990 (1990-01-01 by foo)
   937      topic1990 (1990-01-01 by foo, 1 changesets)
   905      topic1970 (1970-01-01 by test)
   938      topic1970 (1970-01-01 by test, 1 changesets)
       
   939 
       
   940   $ hg topics --age --verbose
       
   941    * topic2010 (2010-01-01 by bar, on branch: default, 1 changesets)
       
   942      topic1990 (1990-01-01 by foo, on branch: default, 1 changesets)
       
   943      topic1970 (1970-01-01 by test, on branch: default, 1 changesets)
   906 
   944 
   907   $ hg up topic1970
   945   $ hg up topic1970
   908   switching to topic topic1970
   946   switching to topic topic1970
   909   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   947   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   910 
   948 
   911   $ hg topics --age
   949   $ hg topics --age
   912      topic2010 (2010-01-01 by bar)
   950      topic2010 (2010-01-01 by bar, 1 changesets)
   913      topic1990 (1990-01-01 by foo)
   951      topic1990 (1990-01-01 by foo, 1 changesets)
   914    * topic1970 (1970-01-01 by test)
   952    * topic1970 (1970-01-01 by test, 1 changesets)
   915 
   953 
   916   $ hg topics --age random
   954   $ hg topics --age random
   917   abort: cannot use --age while setting a topic
   955   abort: cannot use --age while setting a topic
   918   [255]
   956   [255]
   919   $ cd ..
   957   $ cd ..