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