tests/test-topic.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 15 Aug 2016 01:50:15 +0200
changeset 1981 b467fe430404
parent 1953 bdc5bb223b50
child 2011 9c7665e3107b
permissions -rw-r--r--
destmerge: honor the 'onheadcheck' argument This argument was introduced in Mercurial some time ago but the topic extension was never updated to take it in account. This is now fixed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
  $ . "$TESTDIR/testlib"
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
  $ hg init pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     4
  $ cd pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     5
  $ cat <<EOF >> .hg/hgrc
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     6
  > [phases]
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     7
  > publish=false
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     8
  > EOF
1931
1cc2b87c91df test: disable the new style rendering for "missing parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
     9
  $ cat <<EOF >> $HGRCPATH
1cc2b87c91df test: disable the new style rendering for "missing parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
    10
  > [experimental]
1cc2b87c91df test: disable the new style rendering for "missing parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
    11
  > # disable the new graph style until we drop 3.7 support
1cc2b87c91df test: disable the new style rendering for "missing parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
    12
  > graphstyle.missing = |
1cc2b87c91df test: disable the new style rendering for "missing parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
    13
  > EOF
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    14
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    15
  $ hg help topics
1847
9fa5b8f4e98e topics: add command summary
Matt Mackall <mpm@selenic.com>
parents: 1844
diff changeset
    16
  hg topics [TOPIC]
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    17
  
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    18
  View current topic, set current topic, or see all topics.
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    19
  
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    20
  options:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    21
  
1895
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1885
diff changeset
    22
      --clear        clear active topic if any
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1885
diff changeset
    23
      --change VALUE revset of existing revisions to change topic
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1885
diff changeset
    24
   -l --list         show the stack of changeset in the topic
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    25
  
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    26
  (some details hidden, use --verbose to show complete help)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    27
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    28
1851
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    29
Test topics interaction with evolution:
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    30
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    31
  $ hg topics --config experimental.evolution=
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    32
  $ hg topics --config experimental.evolution= --change . bob
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    33
  abort: must have obsolete enabled to use --change
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    34
  [255]
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    35
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    36
Create some changes:
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    37
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    38
  $ for x in alpha beta gamma delta ; do
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    39
  >   echo file $x >> $x
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    40
  >   hg addremove
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    41
  >   hg ci -m "Add file $x"
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    42
  > done
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    43
  adding alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    44
  adding beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    45
  adding gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    46
  adding delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    47
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    48
Still no topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    49
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    50
1852
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    51
Test commit flag and help text
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    52
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    53
  $ echo stuff >> alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    54
  $ HGEDITOR=cat hg ci -t topicflag
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    55
  
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    56
  
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    57
  HG: Enter commit message.  Lines beginning with 'HG:' are removed.
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    58
  HG: Leave message empty to abort commit.
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    59
  HG: --
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    60
  HG: user: test
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    61
  HG: topic 'topicflag'
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    62
  HG: branch 'default'
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    63
  HG: changed alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    64
  abort: empty commit message
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    65
  [255]
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    66
  $ hg revert alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    67
  $ hg topic
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    68
   * topicflag
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    69
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    70
Make a topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    71
  $ hg topic narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    72
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    73
   * narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    74
  $ echo topic work >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    75
  $ hg ci -m 'start on narf'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    76
  $ hg co .^
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    77
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    78
  $ hg topic fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    79
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    80
   * fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    81
     narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    82
  $ echo >> fran work >> beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    83
  $ hg ci -m 'start on fran'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    84
  $ hg co narf
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
    85
  switching to topic narf
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    86
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    87
  $ hg topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    88
     fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    89
   * narf
1869
995617c7f2fc template: test that topic is accessible through template
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1868
diff changeset
    90
  $ hg log -r . -T '{topics}\n'
995617c7f2fc template: test that topic is accessible through template
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1868
diff changeset
    91
  narf
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    92
  $ echo 'narf!!!' >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    93
  $ hg ci -m 'narf!'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    94
  $ hg log -G
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    95
  @  changeset:   6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    96
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    97
  |  topic:       narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    98
  |  parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    99
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   100
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   101
  |  summary:     narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   102
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   103
  | o  changeset:   5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   104
  | |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   105
  | |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   106
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   107
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   108
  | |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   109
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   110
  o |  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   111
  |/   topic:       narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   112
  |    user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   113
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   114
  |    summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   115
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   116
  o  changeset:   3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   117
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   118
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   119
  |  summary:     Add file delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   120
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   121
  o  changeset:   2:15d1eb11d2fa
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   122
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   123
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   124
  |  summary:     Add file gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   125
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   126
  o  changeset:   1:c692ea2c9224
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   127
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   128
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   129
  |  summary:     Add file beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   130
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   131
  o  changeset:   0:c2b7d2f7d14b
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   132
     user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   133
     date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   134
     summary:     Add file alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   135
  
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   136
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   137
Exchanging of topics:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   138
  $ cd ..
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   139
  $ hg init brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   140
  $ hg -R pinky push -r 4 brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   141
  pushing to brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   142
  searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   143
  adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   144
  adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   145
  adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   146
  added 5 changesets with 5 changes to 4 files
1866
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   147
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   148
Export
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   149
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   150
  $ hg -R pinky export
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   151
  # HG changeset patch
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   152
  # User test
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   153
  # Date 0 0
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   154
  #      Thu Jan 01 00:00:00 1970 +0000
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   155
  # Node ID 7c34953036d6a36eae468c550d0592b89ee8bffc
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   156
  # Parent  fb147b0b417c25ca15547cd945acf51cf8dcaf02
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   157
  # EXP-Topic narf
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   158
  narf!
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   159
  
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   160
  diff -r fb147b0b417c -r 7c34953036d6 alpha
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   161
  --- a/alpha	Thu Jan 01 00:00:00 1970 +0000
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   162
  +++ b/alpha	Thu Jan 01 00:00:00 1970 +0000
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   163
  @@ -1,2 +1,3 @@
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   164
   file alpha
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   165
   topic work
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   166
  +narf!!!
1867
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   167
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   168
Import
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   169
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   170
  $ hg -R pinky export > narf.diff
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   171
  $ hg -R pinky --config extensions.strip= strip .
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   172
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   173
  saved backup bundle to $TESTTMP/pinky/.hg/strip-backup/7c34953036d6-1ff3bae2-backup.hg (glob)
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   174
  $ hg -R pinky import narf.diff
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   175
  applying narf.diff
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   176
  $ hg -R pinky log -r .
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   177
  changeset:   6:7c34953036d6
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   178
  tag:         tip
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   179
  topic:       narf
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   180
  parent:      4:fb147b0b417c
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   181
  user:        test
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   182
  date:        Thu Jan 01 00:00:00 1970 +0000
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   183
  summary:     narf!
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   184
  
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   185
Now that we've pushed to brain, the work done on narf is no longer a
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   186
draft, so we won't see that topic name anymore:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   187
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   188
  $ hg log -R pinky -G
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   189
  @  changeset:   6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   190
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   191
  |  topic:       narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   192
  |  parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   193
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   194
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   195
  |  summary:     narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   196
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   197
  | o  changeset:   5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   198
  | |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   199
  | |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   200
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   201
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   202
  | |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   203
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   204
  o |  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   205
  |/   user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   206
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   207
  |    summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   208
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   209
  o  changeset:   3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   210
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   211
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   212
  |  summary:     Add file delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   213
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   214
  o  changeset:   2:15d1eb11d2fa
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   215
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   216
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   217
  |  summary:     Add file gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   218
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   219
  o  changeset:   1:c692ea2c9224
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   220
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   221
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   222
  |  summary:     Add file beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   223
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   224
  o  changeset:   0:c2b7d2f7d14b
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   225
     user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   226
     date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   227
     summary:     Add file alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   228
  
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   229
  $ cd brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   230
  $ hg co tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   231
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   232
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   233
Because the change is public, we won't inherit the topic from narf.
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   234
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   235
  $ hg topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   236
  $ echo what >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   237
  $ hg topic query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   238
  $ hg ci -m 'what is narf, pinky?'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   239
  $ hg log -Gl2
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   240
  @  changeset:   5:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   241
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   242
  |  topic:       query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   243
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   244
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   245
  |  summary:     what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   246
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   247
  o  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   248
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   249
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   250
  |  summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   251
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   252
  $ hg push -f ../pinky -r query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   253
  pushing to ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   254
  searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   255
  adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   256
  adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   257
  adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   258
  added 1 changesets with 1 changes to 1 files (+1 heads)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   259
  $ hg -R ../pinky log -Gl 4
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   260
  o  changeset:   7:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   261
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   262
  |  topic:       query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   263
  |  parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   264
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   265
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   266
  |  summary:     what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   267
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   268
  | @  changeset:   6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   269
  |/   topic:       narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   270
  |    parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   271
  |    user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   272
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   273
  |    summary:     narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   274
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   275
  | o  changeset:   5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   276
  | |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   277
  | |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   278
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   279
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   280
  | |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   281
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   282
  o |  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   283
  |/   user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   284
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   285
  |    summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   286
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   287
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   288
   * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   289
  $ cd ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   290
  $ hg co query
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
   291
  switching to topic query
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   292
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   293
  $ echo answer >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   294
  $ hg ci -m 'Narf is like `zort` or `poit`!'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   295
  $ hg merge narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   296
  merging alpha
1868
5cdd5e0a421c test: adapt to newer mercurial
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1867
diff changeset
   297
  warning: conflicts while merging alpha! (edit, then use 'hg resolve --mark')
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   298
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   299
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   300
  [1]
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   301
  $ hg revert -r narf alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   302
  $ hg resolve -m alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   303
  (no more unresolved files)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   304
  $ hg topic narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   305
  $ hg ci -m 'Finish narf'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   306
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   307
     fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   308
   * narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   309
     query
1885
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
   310
  $ hg debugnamecomplete # branch:topic here is a buggy side effect
1857
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   311
  default
1885
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
   312
  default:fran
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
   313
  default:narf
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
   314
  default:query
1857
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   315
  fran
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   316
  narf
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   317
  query
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   318
  tip
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   319
  $ hg phase --public narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   320
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   321
POSSIBLE BUG: narf topic stays alive even though we just made all
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   322
narf commits public:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   323
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   324
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   325
     fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   326
   * narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   327
  $ hg log -Gl 6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   328
  @    changeset:   9:ae074045b7a7
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   329
  |\   tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   330
  | |  parent:      8:54c943c1c167
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   331
  | |  parent:      6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   332
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   333
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   334
  | |  summary:     Finish narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   335
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   336
  | o  changeset:   8:54c943c1c167
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   337
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   338
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   339
  | |  summary:     Narf is like `zort` or `poit`!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   340
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   341
  | o  changeset:   7:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   342
  | |  parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   343
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   344
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   345
  | |  summary:     what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   346
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   347
  o |  changeset:   6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   348
  |/   parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   349
  |    user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   350
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   351
  |    summary:     narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   352
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   353
  | o  changeset:   5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   354
  | |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   355
  | |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   356
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   357
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   358
  | |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   359
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   360
  o |  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   361
  |/   user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   362
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   363
  |    summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   364
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   365
  $ cd ../brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   366
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   367
   * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   368
  $ hg pull ../pinky -r narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   369
  pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   370
  abort: unknown revision 'narf'!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   371
  [255]
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   372
  $ hg pull ../pinky -r default
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   373
  pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   374
  searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   375
  adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   376
  adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   377
  adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   378
  added 3 changesets with 3 changes to 1 files
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   379
  (run 'hg update' to get a working copy)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   380
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   381
   * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   382
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   383
We can pull in the draft-phase change and we get the new topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   384
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   385
  $ hg pull ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   386
  pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   387
  searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   388
  adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   389
  adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   390
  adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   391
  added 1 changesets with 1 changes to 1 files (+1 heads)
1885
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
   392
  (run 'hg heads' to see heads)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   393
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   394
     fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   395
   * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   396
  $ hg log -Gr 'draft()'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   397
  o  changeset:   9:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   398
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   399
  |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   400
  |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   401
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   402
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   403
  |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   404
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   405
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   406
query is not an open topic, so when we clear the current topic it'll
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   407
disappear:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   408
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   409
  $ hg topics --clear
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   410
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   411
     fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   412
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   413
--clear when we don't have an active topic isn't an error:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   414
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   415
  $ hg topics --clear
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   416
1843
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   417
Topic revset
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   418
  $ hg log -r 'topic()' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   419
  o  changeset:   9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   420
  |  tag:         tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   421
  |  topic:       fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   422
  |  parent:      3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   423
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   424
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   425
  |  summary:     start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   426
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   427
  $ hg log -r 'not topic()' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   428
  o    changeset:   8:ae074045b7a7
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   429
  |\   parent:      7:54c943c1c167
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   430
  | |  parent:      6:7c34953036d6
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   431
  | |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   432
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   433
  | |  summary:     Finish narf
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   434
  | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   435
  | o  changeset:   7:54c943c1c167
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   436
  | |  parent:      5:c01515cfc331
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   437
  | |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   438
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   439
  | |  summary:     Narf is like `zort` or `poit`!
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   440
  | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   441
  o |  changeset:   6:7c34953036d6
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   442
  | |  parent:      4:fb147b0b417c
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   443
  | |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   444
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   445
  | |  summary:     narf!
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   446
  | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   447
  | @  changeset:   5:c01515cfc331
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   448
  |/   user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   449
  |    date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   450
  |    summary:     what is narf, pinky?
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   451
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   452
  o  changeset:   4:fb147b0b417c
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   453
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   454
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   455
  |  summary:     start on narf
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   456
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   457
  o  changeset:   3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   458
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   459
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   460
  |  summary:     Add file delta
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   461
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   462
  o  changeset:   2:15d1eb11d2fa
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   463
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   464
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   465
  |  summary:     Add file gamma
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   466
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   467
  o  changeset:   1:c692ea2c9224
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   468
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   469
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   470
  |  summary:     Add file beta
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   471
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   472
  o  changeset:   0:c2b7d2f7d14b
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   473
     user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   474
     date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   475
     summary:     Add file alpha
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   476
  
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   477
No matches because narf is already closed:
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   478
  $ hg log -r 'topic(narf)' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   479
This regexp should match the topic `fran`:
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   480
  $ hg log -r 'topic("re:.ra.")' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   481
  o  changeset:   9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   482
  |  tag:         tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   483
  |  topic:       fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   484
  |  parent:      3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   485
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   486
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   487
  |  summary:     start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   488
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   489
Exact match on fran:
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   490
  $ hg log -r 'topic(fran)' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   491
  o  changeset:   9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   492
  |  tag:         tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   493
  |  topic:       fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   494
  |  parent:      3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   495
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   496
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   497
  |  summary:     start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   498
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   499
1864
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   500
Match current topic:
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   501
  $ hg topic
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   502
     fran
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   503
  $ hg log -r 'topic(.)'
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   504
(no output is expected)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   505
  $ hg co fran
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
   506
  switching to topic fran
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   507
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1864
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   508
  $ hg log -r 'topic(.)'
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   509
  changeset:   9:0469d521db49
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   510
  tag:         tip
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   511
  topic:       fran
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   512
  parent:      3:a53952faf762
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   513
  user:        test
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   514
  date:        Thu Jan 01 00:00:00 1970 +0000
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   515
  summary:     start on fran
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   516
  
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   517
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   518
Deactivate the topic.
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   519
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   520
   * fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   521
  $ hg topics --clear
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   522
  $ echo fran? >> beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   523
  $ hg ci -m 'fran?'
1885
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
   524
  created new head
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   525
  $ hg log -Gr 'draft()'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   526
  @  changeset:   10:4073470c35e1
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   527
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   528
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   529
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   530
  |  summary:     fran?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   531
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   532
  o  changeset:   9:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   533
  |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   534
  |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   535
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   536
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   537
  |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   538
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   539
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   540
     fran
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   541
Changing topic fails if we don't give a topic
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   542
  $ hg topic --change 9
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   543
  abort: changing topic requires a topic name or --clear
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   544
  [255]
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   545
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   546
Can't change topic of a public change
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   547
  $ hg topic --change 1:: --clear
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   548
  abort: can't change topic of a public change
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   549
  [255]
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   550
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   551
Can clear topics
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   552
  $ hg topic --change 9 --clear
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   553
  changed topic on 1 changes
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   554
  please run hg evolve --rev "not topic()" now
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   555
  $ hg log -Gr 'draft() and not obsolete()'
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   556
  o  changeset:   11:783930e1d79e
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   557
  |  tag:         tip
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   558
  |  parent:      3:a53952faf762
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   559
  |  user:        test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   560
  |  date:        Thu Jan 01 00:00:00 1970 +0000
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   561
  |  summary:     start on fran
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   562
  |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   563
  | @  changeset:   10:4073470c35e1
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   564
  | |  user:        test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   565
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   566
  | |  summary:     fran?
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   567
  | |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   568
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   569
Normally you'd do this with evolve, but we'll use rebase to avoid
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   570
bonus deps in the testsuite.
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   571
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   572
  $ hg rebase -d tip -s .
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   573
  rebasing 10:4073470c35e1 "fran?"
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   574
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   575
Can add a topic to an existing change
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   576
  $ hg topic --change 11 wat
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   577
  changed topic on 1 changes
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   578
  please run hg evolve --rev "topic(wat)" now
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   579
  $ hg log -Gr 'draft() and not obsolete()'
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   580
  o  changeset:   13:d91cd8fd490e
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   581
  |  tag:         tip
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   582
  |  topic:       wat
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   583
  |  parent:      3:a53952faf762
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   584
  |  user:        test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   585
  |  date:        Thu Jan 01 00:00:00 1970 +0000
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   586
  |  summary:     start on fran
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   587
  |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   588
  | @  changeset:   12:d9e32f4c4806
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   589
  | |  user:        test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   590
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   591
  | |  summary:     fran?
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   592
  | |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   593
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   594
Normally you'd do this with evolve, but we'll use rebase to avoid
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   595
bonus deps in the testsuite.
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   596
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   597
  $ hg rebase -d tip -s .
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   598
  rebasing 12:d9e32f4c4806 "fran?"
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   599
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   600
  $ hg log -Gr 'draft()'
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   601
  @  changeset:   14:cf24ad8bbef5
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   602
  |  tag:         tip
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   603
  |  topic:       wat
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   604
  |  user:        test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   605
  |  date:        Thu Jan 01 00:00:00 1970 +0000
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   606
  |  summary:     fran?
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   607
  |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   608
  o  changeset:   13:d91cd8fd490e
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   609
  |  topic:       wat
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   610
  |  parent:      3:a53952faf762
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   611
  |  user:        test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   612
  |  date:        Thu Jan 01 00:00:00 1970 +0000
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   613
  |  summary:     start on fran
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   614
  |
1858
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   615
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   616
Amend a topic
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   617
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   618
  $ hg topic watwat
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   619
  $ hg ci --amend
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   620
  $ hg log -Gr 'draft()'
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   621
  @  changeset:   16:893ffcf66c1f
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   622
  |  tag:         tip
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   623
  |  topic:       watwat
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   624
  |  parent:      13:d91cd8fd490e
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   625
  |  user:        test
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   626
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   627
  |  summary:     fran?
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   628
  |
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   629
  o  changeset:   13:d91cd8fd490e
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   630
  |  topic:       wat
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   631
  |  parent:      3:a53952faf762
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   632
  |  user:        test
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   633
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   634
  |  summary:     start on fran
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   635
  |
1862
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   636
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   637
Clear and amend:
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   638
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   639
  $ hg topic --clear
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   640
  $ hg ci --amend
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   641
  $ hg log -r .
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   642
  changeset:   18:a13639e22b65
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   643
  tag:         tip
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   644
  parent:      13:d91cd8fd490e
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   645
  user:        test
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   646
  date:        Thu Jan 01 00:00:00 1970 +0000
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   647
  summary:     fran?
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   648
  
1874
ec28b6c3414a topic: fix changing topics of commits that have an amend_source
Augie Fackler <raf@durin42.com>
parents: 1869
diff changeset
   649
Readding the same topic with topic --change should work:
ec28b6c3414a topic: fix changing topics of commits that have an amend_source
Augie Fackler <raf@durin42.com>
parents: 1869
diff changeset
   650
  $ hg topic --change . watwat
ec28b6c3414a topic: fix changing topics of commits that have an amend_source
Augie Fackler <raf@durin42.com>
parents: 1869
diff changeset
   651
  changed topic on 1 changes