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