tests/test-topic.t
author Pulkit Goyal <7895pulkit@gmail.com>
Mon, 28 Aug 2017 17:16:16 +0200
changeset 2869 b629874ccaac
parent 2868 e46b68547017
child 2888 aa5268900ba1
permissions -rw-r--r--
topics: allow use a --current when setting a topic This patch allow to use the current flag which can be used by user set existing revs to the current topic.
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
  
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    18
  View current topic, set current topic, change topic for a set of revisions, or
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    19
  see all topics.
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    20
  
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    21
      Clear topic on existing topiced revisions:
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    22
          'hg topic --rev <related revset> --clear'
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    23
  
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    24
      Change topic on some revisions:
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    25
          'hg topic <newtopicname> --rev <related revset>'
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    26
  
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    27
      Clear current topic:
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    28
          'hg topic --clear'
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    29
  
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    30
      Set current topic:
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    31
          'hg topic <topicname>'
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    32
  
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    33
      List of topics:
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    34
          'hg topics'
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    35
  
2731
d39942773163 topics: add a new flag --age which will show last touched time for topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2718
diff changeset
    36
      List of topics with their last touched time sorted according to it:
d39942773163 topics: add a new flag --age which will show last touched time for topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2718
diff changeset
    37
          'hg topic --age'
d39942773163 topics: add a new flag --age which will show last touched time for topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2718
diff changeset
    38
  
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    39
      The active topic (if any) will be prepended with a "*".
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    40
  
2869
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
    41
      The '--current' flag helps to take active topic into account. For example,
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
    42
      if you want to set the topic on all the draft changesets to the active
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
    43
      topic, you can do: 'hg topic -r "draft()" --current'
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
    44
  
2011
9c7665e3107b documentation: some basic update of the documentation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
    45
      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
    46
      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
    47
  
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    48
  options:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    49
  
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
    50
      --clear   clear active topic if any
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
    51
   -r --rev REV revset of existing revisions
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
    52
   -l --list    show the stack of changeset in the topic
2731
d39942773163 topics: add a new flag --age which will show last touched time for topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2718
diff changeset
    53
      --age     show when you last touched the topics
2867
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
    54
      --current display the current topic only
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    55
  
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    56
  (some details hidden, use --verbose to show complete help)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    57
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    58
1851
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    59
Test topics interaction with evolution:
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    60
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    61
  $ hg topics --config experimental.evolution=
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
    62
  $ hg topics --config experimental.evolution= --rev . bob
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
    63
  abort: must have obsolete enabled to change topics
1851
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    64
  [255]
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    65
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    66
Create some changes:
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
    67
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    68
  $ for x in alpha beta gamma delta ; do
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    69
  >   echo file $x >> $x
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    70
  >   hg addremove
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    71
  >   hg ci -m "Add file $x"
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    72
  > done
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    73
  adding alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    74
  adding beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    75
  adding gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    76
  adding delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    77
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    78
Still no topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    79
  $ hg topics
2867
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
    80
  $ hg topics --current
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
    81
  no active topic
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
    82
  [1]
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
    83
  $ hg topics --current somerandomtopic
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
    84
  abort: cannot use --current when setting a topic
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
    85
  [255]
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
    86
  $ hg topics --current --clear
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
    87
  abort: cannot use --current and --clear
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
    88
  [255]
2868
e46b68547017 topic: make --clear + topicname invalid
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2867
diff changeset
    89
  $ hg topics --clear somerandomtopic
e46b68547017 topic: make --clear + topicname invalid
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2867
diff changeset
    90
  abort: cannot use --clear when setting a topic
e46b68547017 topic: make --clear + topicname invalid
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2867
diff changeset
    91
  [255]
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    92
1852
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    93
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
    94
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    95
  $ echo stuff >> alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    96
  $ 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
    97
  
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    98
  
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
    99
  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
   100
  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
   101
  HG: --
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   102
  HG: user: test
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   103
  HG: topic 'topicflag'
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   104
  HG: branch 'default'
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   105
  HG: changed alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   106
  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
   107
  [255]
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   108
  $ hg revert alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   109
  $ hg topic
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   110
   * topicflag
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   111
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   112
Make a topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   113
  $ hg topic narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   114
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   115
   * narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   116
  $ echo topic work >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   117
  $ hg ci -m 'start on narf'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   118
  $ hg co .^
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   119
  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
   120
  $ hg topic fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   121
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   122
   * fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   123
     narf
2867
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
   124
  $ hg topics --current
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
   125
  fran
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   126
  $ echo >> fran work >> beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   127
  $ hg ci -m 'start on fran'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   128
  $ hg co narf
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
   129
  switching to topic narf
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   130
  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
   131
  $ hg topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   132
     fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   133
   * narf
1869
995617c7f2fc template: test that topic is accessible through template
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1868
diff changeset
   134
  $ 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
   135
  narf
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   136
  $ echo 'narf!!!' >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   137
  $ hg ci -m 'narf!'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   138
  $ hg log -G
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   139
  @  changeset:   6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   140
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   141
  |  topic:       narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   142
  |  parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   143
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   144
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   145
  |  summary:     narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   146
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   147
  | o  changeset:   5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   148
  | |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   149
  | |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   150
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   151
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   152
  | |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   153
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   154
  o |  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   155
  |/   topic:       narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   156
  |    user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   157
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   158
  |    summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   159
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   160
  o  changeset:   3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   161
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   162
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   163
  |  summary:     Add file delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   164
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   165
  o  changeset:   2:15d1eb11d2fa
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   166
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   167
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   168
  |  summary:     Add file gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   169
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   170
  o  changeset:   1:c692ea2c9224
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   171
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   172
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   173
  |  summary:     Add file beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   174
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   175
  o  changeset:   0:c2b7d2f7d14b
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   176
     user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   177
     date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   178
     summary:     Add file alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   179
  
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   180
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   181
Exchanging of topics:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   182
  $ cd ..
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   183
  $ hg init brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   184
  $ hg -R pinky push -r 4 brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   185
  pushing to brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   186
  searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   187
  adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   188
  adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   189
  adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   190
  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
   191
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   192
Export
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   193
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   194
  $ hg -R pinky export
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   195
  # HG changeset patch
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   196
  # User test
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   197
  # Date 0 0
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   198
  #      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
   199
  # Node ID 7c34953036d6a36eae468c550d0592b89ee8bffc
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   200
  # Parent  fb147b0b417c25ca15547cd945acf51cf8dcaf02
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   201
  # EXP-Topic narf
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   202
  narf!
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   203
  
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   204
  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
   205
  --- 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
   206
  +++ 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
   207
  @@ -1,2 +1,3 @@
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   208
   file alpha
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   209
   topic work
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   210
  +narf!!!
1867
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   211
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   212
Import
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   213
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   214
  $ 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
   215
  $ 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
   216
  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
   217
  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
   218
  $ 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
   219
  applying narf.diff
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   220
  $ hg -R pinky log -r .
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   221
  changeset:   6:7c34953036d6
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   222
  tag:         tip
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   223
  topic:       narf
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   224
  parent:      4:fb147b0b417c
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   225
  user:        test
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   226
  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
   227
  summary:     narf!
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   228
  
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   229
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
   230
draft, so we won't see that topic name anymore:
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
  $ hg log -R pinky -G
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   233
  @  changeset:   6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   234
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   235
  |  topic:       narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   236
  |  parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   237
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   238
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   239
  |  summary:     narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   240
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   241
  | o  changeset:   5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   242
  | |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   243
  | |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   244
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   245
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   246
  | |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   247
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   248
  o |  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   249
  |/   user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   250
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   251
  |    summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   252
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   253
  o  changeset:   3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   254
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   255
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   256
  |  summary:     Add file delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   257
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   258
  o  changeset:   2:15d1eb11d2fa
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   259
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   260
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   261
  |  summary:     Add file gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   262
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   263
  o  changeset:   1:c692ea2c9224
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   264
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   265
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   266
  |  summary:     Add file beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   267
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   268
  o  changeset:   0:c2b7d2f7d14b
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   269
     user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   270
     date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   271
     summary:     Add file alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   272
  
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   273
  $ cd brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   274
  $ hg co tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   275
  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
   276
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   277
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
   278
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   279
  $ hg topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   280
  $ echo what >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   281
  $ hg topic query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   282
  $ hg ci -m 'what is narf, pinky?'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   283
  $ hg log -Gl2
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   284
  @  changeset:   5:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   285
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   286
  |  topic:       query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   287
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   288
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   289
  |  summary:     what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   290
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   291
  o  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   292
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   293
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   294
  |  summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   295
  |
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   296
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   297
  $ hg push -f ../pinky -r query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   298
  pushing to ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   299
  searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   300
  adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   301
  adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   302
  adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   303
  added 1 changesets with 1 changes to 1 files (+1 heads)
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   304
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   305
  $ hg -R ../pinky log -Gl 4
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   306
  o  changeset:   7:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   307
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   308
  |  topic:       query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   309
  |  parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   310
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   311
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   312
  |  summary:     what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   313
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   314
  | @  changeset:   6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   315
  |/   topic:       narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   316
  |    parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   317
  |    user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   318
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   319
  |    summary:     narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   320
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   321
  | o  changeset:   5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   322
  | |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   323
  | |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   324
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   325
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   326
  | |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   327
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   328
  o |  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   329
  |/   user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   330
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   331
  |    summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   332
  |
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   333
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   334
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   335
   * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   336
  $ cd ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   337
  $ hg co query
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
   338
  switching to topic query
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   339
  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
   340
  $ echo answer >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   341
  $ hg ci -m 'Narf is like `zort` or `poit`!'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   342
  $ hg merge narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   343
  merging alpha
1868
5cdd5e0a421c test: adapt to newer mercurial
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1867
diff changeset
   344
  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
   345
  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
   346
  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
   347
  [1]
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   348
  $ hg revert -r narf alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   349
  $ hg resolve -m alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   350
  (no more unresolved files)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   351
  $ hg topic narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   352
  $ hg ci -m 'Finish narf'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   353
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   354
     fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   355
   * narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   356
     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
   357
  $ 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
   358
  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
   359
  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
   360
  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
   361
  default:query
1857
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   362
  fran
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   363
  narf
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   364
  query
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   365
  tip
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   366
  $ hg phase --public 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
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
   369
narf commits public:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   370
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   371
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   372
     fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   373
   * narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   374
  $ hg log -Gl 6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   375
  @    changeset:   9:ae074045b7a7
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   376
  |\   tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   377
  | |  parent:      8:54c943c1c167
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   378
  | |  parent:      6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   379
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   380
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   381
  | |  summary:     Finish narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   382
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   383
  | o  changeset:   8:54c943c1c167
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   384
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   385
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   386
  | |  summary:     Narf is like `zort` or `poit`!
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
  | o  changeset:   7:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   389
  | |  parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   390
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   391
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   392
  | |  summary:     what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   393
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   394
  o |  changeset:   6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   395
  |/   parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   396
  |    user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   397
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   398
  |    summary:     narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   399
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   400
  | o  changeset:   5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   401
  | |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   402
  | |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   403
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   404
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   405
  | |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   406
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   407
  o |  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   408
  |/   user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   409
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   410
  |    summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   411
  |
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   412
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   413
  $ cd ../brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   414
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   415
   * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   416
  $ hg pull ../pinky -r narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   417
  pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   418
  abort: unknown revision 'narf'!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   419
  [255]
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   420
  $ hg pull ../pinky -r default
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   421
  pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   422
  searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   423
  adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   424
  adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   425
  adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   426
  added 3 changesets with 3 changes to 1 files
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   427
  (run 'hg update' to get a working copy)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   428
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   429
   * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   430
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   431
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
   432
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   433
  $ hg pull ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   434
  pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   435
  searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   436
  adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   437
  adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   438
  adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   439
  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
   440
  (run 'hg heads' to see heads)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   441
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   442
     fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   443
   * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   444
  $ hg log -Gr 'draft()'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   445
  o  changeset:   9:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   446
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   447
  |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   448
  |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   449
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   450
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   451
  |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   452
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   453
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   454
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
   455
disappear:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   456
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   457
  $ hg topics --clear
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   458
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   459
     fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   460
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   461
--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
   462
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   463
  $ hg topics --clear
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   464
1843
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   465
Topic revset
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   466
  $ hg log -r 'topic()' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   467
  o  changeset:   9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   468
  |  tag:         tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   469
  |  topic:       fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   470
  |  parent:      3:a53952faf762
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:     start on fran
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
  $ hg log -r 'not topic()' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   476
  o    changeset:   8:ae074045b7a7
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   477
  |\   parent:      7:54c943c1c167
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   478
  | |  parent:      6:7c34953036d6
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   479
  | |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   480
  | |  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
   481
  | |  summary:     Finish narf
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   482
  | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   483
  | o  changeset:   7:54c943c1c167
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   484
  | |  parent:      5:c01515cfc331
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   485
  | |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   486
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   487
  | |  summary:     Narf is like `zort` or `poit`!
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   488
  | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   489
  o |  changeset:   6:7c34953036d6
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   490
  | |  parent:      4:fb147b0b417c
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   491
  | |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   492
  | |  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
   493
  | |  summary:     narf!
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   494
  | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   495
  | @  changeset:   5:c01515cfc331
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   496
  |/   user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   497
  |    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
   498
  |    summary:     what is narf, pinky?
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   499
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   500
  o  changeset:   4:fb147b0b417c
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   501
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   502
  |  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
   503
  |  summary:     start on narf
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   504
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   505
  o  changeset:   3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   506
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   507
  |  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
   508
  |  summary:     Add file delta
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   509
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   510
  o  changeset:   2:15d1eb11d2fa
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   511
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   512
  |  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
   513
  |  summary:     Add file gamma
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   514
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   515
  o  changeset:   1:c692ea2c9224
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   516
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   517
  |  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
   518
  |  summary:     Add file beta
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   519
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   520
  o  changeset:   0:c2b7d2f7d14b
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   521
     user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   522
     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
   523
     summary:     Add file alpha
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   524
  
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   525
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
   526
  $ hg log -r 'topic(narf)' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   527
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
   528
  $ 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
   529
  o  changeset:   9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   530
  |  tag:         tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   531
  |  topic:       fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   532
  |  parent:      3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   533
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   534
  |  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
   535
  |  summary:     start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   536
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   537
Exact match on fran:
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   538
  $ hg log -r 'topic(fran)' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   539
  o  changeset:   9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   540
  |  tag:         tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   541
  |  topic:       fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   542
  |  parent:      3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   543
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   544
  |  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
   545
  |  summary:     start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   546
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   547
1864
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   548
Match current topic:
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   549
  $ hg topic
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   550
     fran
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   551
  $ hg log -r 'topic(.)'
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   552
(no output is expected)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   553
  $ hg co fran
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
   554
  switching to topic fran
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   555
  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
   556
  $ hg log -r 'topic(.)'
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   557
  changeset:   9:0469d521db49
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   558
  tag:         tip
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   559
  topic:       fran
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   560
  parent:      3:a53952faf762
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   561
  user:        test
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   562
  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
   563
  summary:     start on fran
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   564
  
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   565
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   566
Deactivate the topic.
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   567
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   568
   * fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   569
  $ hg topics --clear
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   570
  $ echo fran? >> beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   571
  $ 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
   572
  created new head
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   573
  $ hg log -Gr 'draft()'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   574
  @  changeset:   10:4073470c35e1
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   575
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   576
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   577
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   578
  |  summary:     fran?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   579
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   580
  o  changeset:   9:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   581
  |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   582
  |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   583
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   584
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   585
  |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   586
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   587
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   588
     fran
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   589
Changing topic fails if we don't give a topic
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
   590
  $ hg topic --rev 9
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   591
  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
   592
  [255]
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   593
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   594
Can't change topic of a public change
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
   595
  $ hg topic --rev 1:: --clear
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   596
  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
   597
  [255]
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
Can clear topics
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
   600
  $ hg topic --rev 9 --clear
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   601
  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
   602
  $ hg log -Gr 'draft() and not obsolete()'
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   603
  o  changeset:   11:0beca5ab56c3
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   604
  |  tag:         tip
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   605
  |  parent:      3:a53952faf762
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   606
  |  user:        test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   607
  |  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
   608
  |  summary:     start on fran
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   609
  |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   610
  | @  changeset:   10:4073470c35e1
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   611
  | |  user:        test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   612
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
2834
38db1466c6fb log: unstable was renamed into orphan
Boris Feld <boris.feld@octobus.net>
parents: 2833
diff changeset
   613
  | |  instability: orphan
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   614
  | |  summary:     fran?
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   615
  | |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   616
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   617
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
   618
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
   619
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   620
  $ 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
   621
  rebasing 10:4073470c35e1 "fran?"
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   622
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   623
Can add a topic to an existing change
2663
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   624
  $ hg topic
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   625
  $ hg sum
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   626
  parent: 12:18b70b8de1f0 tip
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   627
   fran?
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   628
  branch: default
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   629
  commit: (clean)
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   630
  update: 5 new changesets, 2 branch heads (merge)
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   631
  phases: 2 draft
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
   632
  $ hg topic --rev 11 wat
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   633
  changed topic on 1 changes
2663
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   634
  $ hg log -r .
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   635
  changeset:   12:18b70b8de1f0
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   636
  user:        test
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   637
  date:        Thu Jan 01 00:00:00 1970 +0000
2834
38db1466c6fb log: unstable was renamed into orphan
Boris Feld <boris.feld@octobus.net>
parents: 2833
diff changeset
   638
  instability: orphan
2663
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   639
  summary:     fran?
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   640
  
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   641
  $ hg sum
2834
38db1466c6fb log: unstable was renamed into orphan
Boris Feld <boris.feld@octobus.net>
parents: 2833
diff changeset
   642
  parent: 12:18b70b8de1f0  (orphan)
2663
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   643
   fran?
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   644
  branch: default
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   645
  commit: (clean)
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   646
  update: 5 new changesets, 2 branch heads (merge)
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   647
  phases: 3 draft
2834
38db1466c6fb log: unstable was renamed into orphan
Boris Feld <boris.feld@octobus.net>
parents: 2833
diff changeset
   648
  orphan: 1 changesets
2663
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
   649
  $ hg topic
2664
ed6fb5f20b24 topics: return early so that other if conditions don't get execute (issue5600)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2663
diff changeset
   650
     wat
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   651
  $ hg log -Gr 'draft() and not obsolete()'
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   652
  o  changeset:   13:686a642006db
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   653
  |  tag:         tip
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   654
  |  topic:       wat
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   655
  |  parent:      3:a53952faf762
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   656
  |  user:        test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   657
  |  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
   658
  |  summary:     start on fran
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   659
  |
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   660
  | @  changeset:   12:18b70b8de1f0
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   661
  | |  user:        test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   662
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
2834
38db1466c6fb log: unstable was renamed into orphan
Boris Feld <boris.feld@octobus.net>
parents: 2833
diff changeset
   663
  | |  instability: orphan
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   664
  | |  summary:     fran?
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   665
  | |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   666
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   667
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
   668
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
   669
2661
914757c70217 tests: expand output to check topic activation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2649
diff changeset
   670
  $ hg topic
2664
ed6fb5f20b24 topics: return early so that other if conditions don't get execute (issue5600)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2663
diff changeset
   671
     wat
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   672
  $ hg rebase -d tip -s .
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   673
  rebasing 12:18b70b8de1f0 "fran?"
2664
ed6fb5f20b24 topics: return early so that other if conditions don't get execute (issue5600)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2663
diff changeset
   674
  switching to topic wat
2661
914757c70217 tests: expand output to check topic activation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2649
diff changeset
   675
  $ hg topic
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2665
diff changeset
   676
     wat
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   677
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   678
  $ hg log -Gr 'draft()'
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2665
diff changeset
   679
  @  changeset:   14:45358f7a5892
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   680
  |  tag:         tip
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   681
  |  user:        test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   682
  |  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
   683
  |  summary:     fran?
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   684
  |
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   685
  o  changeset:   13:686a642006db
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   686
  |  topic:       wat
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   687
  |  parent:      3:a53952faf762
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   688
  |  user:        test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   689
  |  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
   690
  |  summary:     start on fran
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
   691
  |
1858
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   692
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   693
Amend a topic
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   694
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   695
  $ hg topic watwat
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   696
  $ hg ci --amend
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   697
  $ hg log -Gr 'draft()'
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2665
diff changeset
   698
  @  changeset:   16:6c40a4c21bbe
1858
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   699
  |  tag:         tip
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   700
  |  topic:       watwat
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   701
  |  parent:      13:686a642006db
1858
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   702
  |  user:        test
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   703
  |  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
   704
  |  summary:     fran?
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   705
  |
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   706
  o  changeset:   13:686a642006db
1858
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   707
  |  topic:       wat
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   708
  |  parent:      3:a53952faf762
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   709
  |  user:        test
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   710
  |  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
   711
  |  summary:     start on fran
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
   712
  |
1862
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   713
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   714
Clear and amend:
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   715
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   716
  $ hg topic --clear
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   717
  $ hg ci --amend
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   718
  $ hg log -r .
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2665
diff changeset
   719
  changeset:   18:0f9cd5070654
1862
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   720
  tag:         tip
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   721
  parent:      13:686a642006db
1862
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   722
  user:        test
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   723
  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
   724
  summary:     fran?
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
   725
  
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
   726
Reading the same topic with topic --rev should work:
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
   727
  $ hg topic --rev . watwat
2648
d8b47d961c77 topic-change: update the working copy along when changing topic of '.'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2646
diff changeset
   728
  switching to topic watwat
1874
ec28b6c3414a topic: fix changing topics of commits that have an amend_source
Augie Fackler <raf@durin42.com>
parents: 1869
diff changeset
   729
  changed topic on 1 changes
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   730
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   731
Testing issue5441
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   732
  $ hg co 19
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   733
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   734
  $ hg log -Gr 'draft()'
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2665
diff changeset
   735
  @  changeset:   19:980a0f608481
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   736
  |  tag:         tip
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   737
  |  topic:       watwat
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   738
  |  parent:      13:686a642006db
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   739
  |  user:        test
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   740
  |  date:        Thu Jan 01 00:00:00 1970 +0000
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   741
  |  summary:     fran?
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   742
  |
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   743
  o  changeset:   13:686a642006db
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   744
  |  topic:       wat
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   745
  |  parent:      3:a53952faf762
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   746
  |  user:        test
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   747
  |  date:        Thu Jan 01 00:00:00 1970 +0000
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   748
  |  summary:     start on fran
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   749
  |
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   750
2869
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
   751
Using the current flag
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
   752
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
   753
  $ hg topic changewat
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
   754
  $ hg topics --rev '13::19' --current
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   755
  changed topic on 2 changes
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   756
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   757
  $ hg log -Gr 'draft()'
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2665
diff changeset
   758
  @  changeset:   21:56c83be6105f
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   759
  |  tag:         tip
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   760
  |  topic:       changewat
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   761
  |  user:        test
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   762
  |  date:        Thu Jan 01 00:00:00 1970 +0000
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   763
  |  summary:     fran?
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
   764
  |
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   765
  o  changeset:   20:ceba5be9d56f
2624
fd602980f7ee topics: make sure we commit on new parents while changing topics (issue5441)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2623
diff changeset
   766
  |  topic:       changewat
fd602980f7ee topics: make sure we commit on new parents while changing topics (issue5441)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2623
diff changeset
   767
  |  parent:      3:a53952faf762
fd602980f7ee topics: make sure we commit on new parents while changing topics (issue5441)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2623
diff changeset
   768
  |  user:        test
fd602980f7ee topics: make sure we commit on new parents while changing topics (issue5441)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2623
diff changeset
   769
  |  date:        Thu Jan 01 00:00:00 1970 +0000
fd602980f7ee topics: make sure we commit on new parents while changing topics (issue5441)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2623
diff changeset
   770
  |  summary:     start on fran
fd602980f7ee topics: make sure we commit on new parents while changing topics (issue5441)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2623
diff changeset
   771
  |
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   772
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   773
Case with branching:
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   774
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   775
  $ hg up changewat
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   776
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   777
  $ hg up t1
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   778
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   779
  $ echo gamma >> gamma
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   780
  $ hg ci -m gamma
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   781
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   782
  $ hg log -Gr 'draft()'
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   783
  @  changeset:   22:0d3d805542b4
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   784
  |  tag:         tip
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   785
  |  topic:       changewat
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   786
  |  parent:      20:ceba5be9d56f
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   787
  |  user:        test
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   788
  |  date:        Thu Jan 01 00:00:00 1970 +0000
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   789
  |  summary:     gamma
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   790
  |
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2665
diff changeset
   791
  | o  changeset:   21:56c83be6105f
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   792
  |/   topic:       changewat
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   793
  |    user:        test
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   794
  |    date:        Thu Jan 01 00:00:00 1970 +0000
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   795
  |    summary:     fran?
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   796
  |
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   797
  o  changeset:   20:ceba5be9d56f
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   798
  |  topic:       changewat
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   799
  |  parent:      3:a53952faf762
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   800
  |  user:        test
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   801
  |  date:        Thu Jan 01 00:00:00 1970 +0000
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   802
  |  summary:     start on fran
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   803
  |
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   804
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   805
  $ hg topics --rev 't1::' changewut
2648
d8b47d961c77 topic-change: update the working copy along when changing topic of '.'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2646
diff changeset
   806
  switching to topic changewut
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   807
  changed topic on 3 changes
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   808
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   809
  $ hg log -Gr 'draft()'
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   810
  @  changeset:   25:729ed5717393
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   811
  |  tag:         tip
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   812
  |  topic:       changewut
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   813
  |  parent:      23:62e49f09f883
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   814
  |  user:        test
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   815
  |  date:        Thu Jan 01 00:00:00 1970 +0000
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   816
  |  summary:     gamma
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   817
  |
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2665
diff changeset
   818
  | o  changeset:   24:369c6e2e5474
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   819
  |/   topic:       changewut
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   820
  |    user:        test
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   821
  |    date:        Thu Jan 01 00:00:00 1970 +0000
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   822
  |    summary:     fran?
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   823
  |
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
   824
  o  changeset:   23:62e49f09f883
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   825
  |  topic:       changewut
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   826
  |  parent:      3:a53952faf762
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   827
  |  user:        test
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   828
  |  date:        Thu Jan 01 00:00:00 1970 +0000
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   829
  |  summary:     start on fran
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
   830
  |
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   831
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   832
Testing for updating to t0
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   833
==========================
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   834
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   835
  $ hg stack
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   836
  ### topic: changewut (2 heads)
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   837
  ### branch: default, 5 behind
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   838
  t3: fran?
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   839
  t1^ start on fran (base)
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   840
  t2@ gamma (current)
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   841
  t1: start on fran
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   842
  t0^ Add file delta (base)
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   843
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   844
  $ hg up t0
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   845
  preserving the current topic 'changewut'
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   846
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   847
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   848
  $ hg topic
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   849
   * changewut
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   850
  $ hg stack
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   851
  ### topic: changewut (2 heads)
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   852
  ### branch: default, 5 behind
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   853
  t3: fran?
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   854
  t1^ start on fran (base)
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   855
  t2: gamma
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   856
  t1: start on fran
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   857
  t0^ Add file delta (base)
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   858
2731
d39942773163 topics: add a new flag --age which will show last touched time for topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2718
diff changeset
   859
  $ hg topics --age
d39942773163 topics: add a new flag --age which will show last touched time for topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2718
diff changeset
   860
   * changewut (1970-01-01)
d39942773163 topics: add a new flag --age which will show last touched time for topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2718
diff changeset
   861
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   862
  $ cd ..
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   863
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   864
Testing the new config knob to forbid untopiced commit
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   865
======================================================
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   866
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   867
  $ hg init ponky
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   868
  $ cd ponky
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   869
  $ cat <<EOF >> .hg/hgrc
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   870
  > [phases]
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   871
  > publish=false
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   872
  > EOF
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   873
  $ cat <<EOF >> $HGRCPATH
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   874
  > [experimental]
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   875
  > enforce-topic = yes
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   876
  > EOF
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   877
  $ touch a b c d
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   878
  $ hg add a
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   879
  $ hg ci -m "Added a"
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   880
  abort: no active topic
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   881
  (set a current topic or use '--config experimental.enforce-topic=no' to commit without a topic)
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   882
  [255]
2733
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
   883
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
   884
(same test, checking we abort before the editor)
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
   885
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
   886
  $ EDITOR=cat hg ci -m "Added a" --edit
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
   887
  abort: no active topic
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
   888
  (set a current topic or use '--config experimental.enforce-topic=no' to commit without a topic)
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
   889
  [255]
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   890
  $ hg ci -m "added a" --config experimental.enforce-topic=no
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   891
  $ hg log
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   892
  changeset:   0:a154386e50d1
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   893
  tag:         tip
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   894
  user:        test
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   895
  date:        Thu Jan 01 00:00:00 1970 +0000
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   896
  summary:     added a
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   897
  
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   898
Testing the --age flag for `hg topics`
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   899
======================================
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   900
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   901
  $ hg topic topic1970 --rev 0
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   902
  switching to topic topic1970
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   903
  changed topic on 1 changes
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   904
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   905
  $ hg add b
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   906
  $ hg topic topic1990
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   907
  $ hg ci -m "Added b" --config devel.default-date="631152000 0"
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   908
  $ hg add c
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   909
  $ hg topic topic2010
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   910
  $ hg ci -m "Added c" --config devel.default-date="1262304000 0"
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   911
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   912
  $ hg log -G
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   913
  @  changeset:   3:9048b194797d
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   914
  |  tag:         tip
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   915
  |  topic:       topic2010
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   916
  |  user:        test
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   917
  |  date:        Fri Jan 01 00:00:00 2010 +0000
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   918
  |  summary:     Added c
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   919
  |
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   920
  o  changeset:   2:186d493c7f8d
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   921
  |  topic:       topic1990
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   922
  |  user:        test
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   923
  |  date:        Mon Jan 01 00:00:00 1990 +0000
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   924
  |  summary:     Added b
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   925
  |
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   926
  o  changeset:   1:e5a30a141954
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   927
     topic:       topic1970
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   928
     parent:      -1:000000000000
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   929
     user:        test
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   930
     date:        Thu Jan 01 00:00:00 1970 +0000
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   931
     summary:     added a
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   932
  
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   933
  $ hg topics
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   934
     topic1970
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   935
     topic1990
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   936
   * topic2010
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   937
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   938
  $ hg topics --age
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   939
   * topic2010 (2010-01-01)
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   940
     topic1990 (1990-01-01)
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   941
     topic1970 (1970-01-01)
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   942
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   943
  $ hg up topic1970
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   944
  switching to topic topic1970
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   945
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   946
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   947
  $ hg topics --age
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   948
     topic2010 (2010-01-01)
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   949
     topic1990 (1990-01-01)
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   950
   * topic1970 (1970-01-01)
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   951
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   952
  $ cd ..