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