tests/test-topic.t
author Pulkit Goyal <7895pulkit@gmail.com>
Fri, 08 Jun 2018 22:52:52 +0530
branchmercurial-4.4
changeset 3817 5ca297e78f2c
parent 3714 19ec729f3ca2
parent 3765 4aabc5c8b2af
child 3818 f8677cb11dcb
child 3930 d00f0c369bc7
permissions -rw-r--r--
test-compat: merge mercurial-4.5 into mercurial-4.4
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
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
     3
  $ hg init pinky
1839
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
3763
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    15
  $ hg help -e topic
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    16
  topic extension - support for topic branches
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    17
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    18
  Topic branches are lightweight branches which disappear when changes are
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    19
  finalized (move to the public phase).
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    20
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    21
  Compared to bookmark, topic is reference carried by each changesets of the
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    22
  series instead of just the single head revision.  Topic are quite similar to
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    23
  the way named branch work, except they eventually fade away when the changeset
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    24
  becomes part of the immutable history. Changeset can belong to both a topic
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    25
  and a named branch, but as long as it is mutable, its topic identity will
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    26
  prevail. As a result, default destination for 'update', 'merge', etc...  will
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    27
  take topic into account. When a topic is active these operations will only
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    28
  consider other changesets on that topic (and, in some occurrence, bare
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    29
  changeset on same branch).  When no topic is active, changeset with topic will
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    30
  be ignored and only bare one on the same branch will be taken in account.
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    31
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    32
  There is currently two commands to be used with that extension: 'topics' and
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    33
  'stack'.
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    34
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    35
  The 'hg topics' command is used to set the current topic, change and list
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    36
  existing one. 'hg topics --verbose' will list various information related to
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    37
  each topic.
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    38
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    39
  The 'stack' will show you information about the stack of commit belonging to
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    40
  your current topic.
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    41
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    42
  Topic is offering you aliases reference to changeset in your current topic
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    43
  stack as 't#'. For example, 't1' refers to the root of your stack, 't2' to the
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    44
  second commits, etc. The 'hg stack' command show these number.
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    45
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    46
  Push behavior will change a bit with topic. When pushing to a publishing
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    47
  repository the changesets will turn public and the topic data on them will
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    48
  fade away. The logic regarding pushing new heads will behave has before,
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    49
  ignore any topic related data. When pushing to a non-publishing repository
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    50
  (supporting topic), the head checking will be done taking topic data into
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    51
  account. Push will complain about multiple heads on a branch if you push
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    52
  multiple heads with no topic information on them (or multiple public heads).
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    53
  But pushing a new topic will not requires any specific flag. However, pushing
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    54
  multiple heads on a topic will be met with the usual warning.
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    55
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    56
  The 'evolve' extension takes 'topic' into account. 'hg evolve --all' will
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    57
  evolve all changesets in the active topic. In addition, by default. 'hg next'
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    58
  and 'hg prev' will stick to the current topic.
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    59
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    60
  Be aware that this extension is still an experiment, commands and other
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    61
  features are likely to be change/adjusted/dropped over time as we refine the
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    62
  concept.
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    63
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    64
  topic-mode
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    65
  ==========
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    66
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    67
  The topic extension can be configured to ensure the user do not forget to add
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    68
  a topic when committing a new topic:
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    69
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    70
    [experimental]
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    71
    # behavior when commit is made without an active topic
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    72
    topic-mode = ignore # do nothing special (default)
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    73
    topic-mode = warning # print a warning
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    74
    topic-mode = enforce # abort the commit (except for merge)
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    75
    topic-mode = enforce-all # abort the commit (even for merge)
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    76
    topic-mode = random # use a randomized generated topic (except for merge)
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    77
    topic-mode = random-all # use a randomized generated topic (even for merge)
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    78
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    79
  Single head enforcing
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    80
  =====================
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    81
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    82
  The extensions come with an option to enforce that there is only one heads for
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    83
  each name in the repository at any time.
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    84
  
3764
f0f9139016d8 topic: use preformatted block for config snippets documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3763
diff changeset
    85
    [experimental]
f0f9139016d8 topic: use preformatted block for config snippets documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3763
diff changeset
    86
    enforce-single-head = yes
3763
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    87
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    88
  Publishing behavior
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    89
  ===================
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    90
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    91
  Topic vanish when changeset move to the public phases. Moving to the public
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    92
  phase usually happens on push, but it is possible to update that behavior. The
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    93
  server needs to have specific config for this.
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
    94
  
3765
4aabc5c8b2af topic: dedent items about publishing behavior in docstring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3764
diff changeset
    95
  * everything pushed become public (the default):
3764
f0f9139016d8 topic: use preformatted block for config snippets documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3763
diff changeset
    96
  
3765
4aabc5c8b2af topic: dedent items about publishing behavior in docstring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3764
diff changeset
    97
      [phase]
4aabc5c8b2af topic: dedent items about publishing behavior in docstring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3764
diff changeset
    98
      publish = yes
3764
f0f9139016d8 topic: use preformatted block for config snippets documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3763
diff changeset
    99
  
3765
4aabc5c8b2af topic: dedent items about publishing behavior in docstring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3764
diff changeset
   100
  * nothing push turned public:
3763
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   101
  
3765
4aabc5c8b2af topic: dedent items about publishing behavior in docstring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3764
diff changeset
   102
      [phase]
4aabc5c8b2af topic: dedent items about publishing behavior in docstring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3764
diff changeset
   103
      publish = no
3764
f0f9139016d8 topic: use preformatted block for config snippets documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3763
diff changeset
   104
  
3765
4aabc5c8b2af topic: dedent items about publishing behavior in docstring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3764
diff changeset
   105
  * topic branches are not published, changeset without topic are:
3763
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   106
  
3765
4aabc5c8b2af topic: dedent items about publishing behavior in docstring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3764
diff changeset
   107
      [phase]
4aabc5c8b2af topic: dedent items about publishing behavior in docstring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3764
diff changeset
   108
      publish = no
4aabc5c8b2af topic: dedent items about publishing behavior in docstring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3764
diff changeset
   109
      [experimental]
4aabc5c8b2af topic: dedent items about publishing behavior in docstring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3764
diff changeset
   110
      topic.publish-bare-branch = yes
3763
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   111
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   112
  In addition, the topic extension adds a "--publish" flag on 'hg push'. When
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   113
  used, the pushed revisions are published if the push succeeds. It also applies
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   114
  to common revisions selected by the push.
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   115
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   116
  list of commands:
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   117
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   118
   stack         list all changesets in a topic and other information
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   119
   topics        View current topic, set current topic, change topic for a set
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   120
                 of revisions, or see all topics.
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   121
  
6f56ff701746 tests: add a test for "hg help -e topic"
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3667
diff changeset
   122
  (use 'hg help -v topic' to show built-in aliases and global options)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   123
  $ hg help topics
1847
9fa5b8f4e98e topics: add command summary
Matt Mackall <mpm@selenic.com>
parents: 1844
diff changeset
   124
  hg topics [TOPIC]
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   125
  
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   126
  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
   127
  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
   128
  
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   129
      Clear topic on existing topiced revisions:
2923
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
   130
  
2994
1e8ac0fcd6b7 topics: spell out topics completely in help
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2993
diff changeset
   131
        hg topics --rev <related revset> --clear
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   132
  
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   133
      Change topic on some revisions:
2923
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
   134
  
2994
1e8ac0fcd6b7 topics: spell out topics completely in help
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2993
diff changeset
   135
        hg topics <newtopicname> --rev <related revset>
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   136
  
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   137
      Clear current topic:
2923
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
   138
  
2994
1e8ac0fcd6b7 topics: spell out topics completely in help
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2993
diff changeset
   139
        hg topics --clear
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   140
  
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   141
      Set current topic:
2923
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
   142
  
2994
1e8ac0fcd6b7 topics: spell out topics completely in help
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2993
diff changeset
   143
        hg topics <topicname>
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   144
  
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   145
      List of topics:
2923
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
   146
  
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
   147
        hg topics
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   148
  
2993
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   149
      List of topics sorted according to their last touched time displaying last
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   150
      touched time and the user who last touched the topic:
2923
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
   151
  
2994
1e8ac0fcd6b7 topics: spell out topics completely in help
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2993
diff changeset
   152
        hg topics --age
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
   153
  
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   154
      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
   155
  
2869
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
   156
      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
   157
      if you want to set the topic on all the draft changesets to the active
2994
1e8ac0fcd6b7 topics: spell out topics completely in help
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2993
diff changeset
   158
      topic, you can do: 'hg topics -r "draft()" --current'
2869
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
   159
  
2011
9c7665e3107b documentation: some basic update of the documentation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
   160
      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
   161
      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
   162
  
2898
3dfc88c06378 topic: support --rev argument and properly process then as user input
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2889
diff changeset
   163
  options ([+] can be repeated):
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   164
  
2898
3dfc88c06378 topic: support --rev argument and properly process then as user input
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2889
diff changeset
   165
      --clear       clear active topic if any
3dfc88c06378 topic: support --rev argument and properly process then as user input
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2889
diff changeset
   166
   -r --rev REV [+] revset of existing revisions
3dfc88c06378 topic: support --rev argument and properly process then as user input
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2889
diff changeset
   167
   -l --list        show the stack of changeset in the topic
3dfc88c06378 topic: support --rev argument and properly process then as user input
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2889
diff changeset
   168
      --age         show when you last touched the topics
3dfc88c06378 topic: support --rev argument and properly process then as user input
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2889
diff changeset
   169
      --current     display the current topic only
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   170
  
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   171
  (some details hidden, use --verbose to show complete help)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   172
  $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   173
1851
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
   174
Test topics interaction with evolution:
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
   175
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
   176
  $ hg topics --config experimental.evolution=
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
   177
  $ hg topics --config experimental.evolution= --rev . bob
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
   178
  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
   179
  [255]
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
   180
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
   181
Create some changes:
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
   182
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   183
  $ for x in alpha beta gamma delta ; do
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   184
  >   echo file $x >> $x
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   185
  >   hg addremove
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   186
  >   hg ci -m "Add file $x"
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   187
  > done
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   188
  adding alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   189
  adding beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   190
  adding gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   191
  adding delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   192
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   193
Still no topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   194
  $ hg topics
2867
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
   195
  $ hg topics --current
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
   196
  no active topic
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
   197
  [1]
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
   198
  $ hg topics --current somerandomtopic
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
   199
  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
   200
  [255]
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
   201
  $ hg topics --current --clear
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
   202
  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
   203
  [255]
2868
e46b68547017 topic: make --clear + topicname invalid
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2867
diff changeset
   204
  $ hg topics --clear somerandomtopic
e46b68547017 topic: make --clear + topicname invalid
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2867
diff changeset
   205
  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
   206
  [255]
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   207
2888
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
   208
Trying some invalid topicnames
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
   209
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
   210
  $ hg topic '.'
2889
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
   211
  abort: the name '.' is reserved
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
   212
  [255]
2888
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
   213
  $ hg topic null
2889
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
   214
  abort: the name 'null' is reserved
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
   215
  [255]
2888
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
   216
  $ hg topic tip
2889
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
   217
  abort: the name 'tip' is reserved
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
   218
  [255]
2888
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
   219
  $ hg topic 12345
2889
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
   220
  abort: cannot use an integer as a name
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
   221
  [255]
2888
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
   222
  $ hg topic '   '
2889
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
   223
  abort: topic name cannot consist entirely of whitespaces
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
   224
  [255]
2888
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
   225
3652
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   226
  $ hg topic 'a12#45'
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   227
  abort: invalid topic name: 'a12#45'
3667
a346b1641dfa topic: allow '.' in topic names
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3652
diff changeset
   228
  (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
3652
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   229
  [255]
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   230
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   231
  $ hg topic 'foo bar'
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   232
  abort: invalid topic name: 'foo bar'
3667
a346b1641dfa topic: allow '.' in topic names
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3652
diff changeset
   233
  (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
3652
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   234
  [255]
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   235
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   236
this is trying to list topic names
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   237
  $ hg topic ''
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   238
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   239
  $ hg topic '*12 B23'
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   240
  abort: invalid topic name: '*12 B23'
3667
a346b1641dfa topic: allow '.' in topic names
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3652
diff changeset
   241
  (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
3652
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   242
  [255]
81985b9d3e74 topic-ext: restrict the format of topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3430
diff changeset
   243
1852
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   244
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
   245
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   246
  $ echo stuff >> alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   247
  $ 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
   248
  
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   249
  
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   250
  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
   251
  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
   252
  HG: --
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   253
  HG: user: test
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   254
  HG: topic 'topicflag'
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   255
  HG: branch 'default'
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   256
  HG: changed alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   257
  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
   258
  [255]
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   259
  $ hg revert alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   260
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   261
   * topicflag (0 changesets)
1852
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
   262
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   263
Make a topic
2935
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
   264
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   265
  $ hg topic narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   266
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   267
   * narf (0 changesets)
2935
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
   268
  $ hg topics -v
2936
3a9303b7b648 topics: show working directory branch when topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2935
diff changeset
   269
   * narf (on branch: default, 0 changesets)
2935
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
   270
  $ hg stack
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
   271
  ### topic: narf
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2995
diff changeset
   272
  ### target: default (branch)
2937
b54abc7e80e2 topics: improve the description if topic is not touched
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2936
diff changeset
   273
  (stack is empty)
3085
3eca2cbdc498 stack: order the adjective of changeset
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3084
diff changeset
   274
  t0^ Add file delta (base current)
2935
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
   275
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
   276
Add commits to topic
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
   277
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   278
  $ echo topic work >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   279
  $ hg ci -m 'start on narf'
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
   280
  active topic 'narf' grew its first changeset
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   281
  $ hg co .^
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   282
  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
   283
  $ hg topic fran
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2984
diff changeset
   284
  marked working directory as topic: fran
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   285
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   286
   * fran (0 changesets)
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   287
     narf (1 changesets)
2867
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
   288
  $ hg topics --current
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
   289
  fran
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   290
  $ echo >> fran work >> beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   291
  $ hg ci -m 'start on fran'
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
   292
  active topic 'fran' grew its first changeset
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   293
  $ hg co narf
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
   294
  switching to topic narf
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   295
  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
   296
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   297
     fran (1 changesets)
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   298
   * narf (1 changesets)
1869
995617c7f2fc template: test that topic is accessible through template
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1868
diff changeset
   299
  $ 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
   300
  narf
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   301
  $ echo 'narf!!!' >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   302
  $ hg ci -m 'narf!'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   303
  $ hg log -G
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   304
  @  changeset:   6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   305
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   306
  |  topic:       narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   307
  |  parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   308
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   309
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   310
  |  summary:     narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   311
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   312
  | o  changeset:   5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   313
  | |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   314
  | |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   315
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   316
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   317
  | |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   318
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   319
  o |  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   320
  |/   topic:       narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   321
  |    user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   322
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   323
  |    summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   324
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   325
  o  changeset:   3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   326
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   327
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   328
  |  summary:     Add file delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   329
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   330
  o  changeset:   2:15d1eb11d2fa
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   331
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   332
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   333
  |  summary:     Add file gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   334
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   335
  o  changeset:   1:c692ea2c9224
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   336
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   337
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   338
  |  summary:     Add file beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   339
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   340
  o  changeset:   0:c2b7d2f7d14b
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   341
     user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   342
     date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   343
     summary:     Add file alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   344
  
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   345
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   346
Exchanging of topics:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   347
  $ cd ..
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   348
  $ hg init brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   349
  $ hg -R pinky push -r 4 brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   350
  pushing to brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   351
  searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   352
  adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   353
  adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   354
  adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   355
  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
   356
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   357
Export
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   358
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   359
  $ hg -R pinky export
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   360
  # HG changeset patch
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   361
  # User test
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   362
  # Date 0 0
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   363
  #      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
   364
  # Node ID 7c34953036d6a36eae468c550d0592b89ee8bffc
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   365
  # Parent  fb147b0b417c25ca15547cd945acf51cf8dcaf02
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   366
  # EXP-Topic narf
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   367
  narf!
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   368
  
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   369
  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
   370
  --- 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
   371
  +++ 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
   372
  @@ -1,2 +1,3 @@
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   373
   file alpha
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   374
   topic work
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
   375
  +narf!!!
1867
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   376
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   377
Import
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   378
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   379
  $ 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
   380
  $ 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
   381
  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
   382
  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
   383
  $ 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
   384
  applying narf.diff
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   385
  $ hg -R pinky log -r .
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   386
  changeset:   6:7c34953036d6
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   387
  tag:         tip
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   388
  topic:       narf
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   389
  parent:      4:fb147b0b417c
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   390
  user:        test
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   391
  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
   392
  summary:     narf!
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
   393
  
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   394
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
   395
draft, so we won't see that topic name anymore:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   396
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   397
  $ hg log -R pinky -G
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   398
  @  changeset:   6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   399
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   400
  |  topic:       narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   401
  |  parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   402
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   403
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   404
  |  summary:     narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   405
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   406
  | o  changeset:   5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   407
  | |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   408
  | |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   409
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   410
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   411
  | |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   412
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   413
  o |  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   414
  |/   user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   415
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   416
  |    summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   417
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   418
  o  changeset:   3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   419
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   420
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   421
  |  summary:     Add file delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   422
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   423
  o  changeset:   2:15d1eb11d2fa
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   424
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   425
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   426
  |  summary:     Add file gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   427
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   428
  o  changeset:   1:c692ea2c9224
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   429
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   430
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   431
  |  summary:     Add file beta
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
  o  changeset:   0:c2b7d2f7d14b
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   434
     user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   435
     date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   436
     summary:     Add file alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   437
  
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   438
  $ cd brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   439
  $ hg co tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   440
  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
   441
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   442
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
   443
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   444
  $ hg topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   445
  $ echo what >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   446
  $ hg topic query
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2984
diff changeset
   447
  marked working directory as topic: query
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   448
  $ hg ci -m 'what is narf, pinky?'
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
   449
  active topic 'query' grew its first changeset
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   450
  $ hg log -Gl2
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   451
  @  changeset:   5:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   452
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   453
  |  topic:       query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   454
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   455
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   456
  |  summary:     what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   457
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   458
  o  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   459
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   460
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   461
  |  summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   462
  |
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   463
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   464
  $ hg push -f ../pinky -r query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   465
  pushing to ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   466
  searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   467
  adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   468
  adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   469
  adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   470
  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
   471
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   472
  $ hg -R ../pinky log -Gl 4
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   473
  o  changeset:   7:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   474
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   475
  |  topic:       query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   476
  |  parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   477
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   478
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   479
  |  summary:     what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   480
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   481
  | @  changeset:   6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   482
  |/   topic:       narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   483
  |    parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   484
  |    user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   485
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   486
  |    summary:     narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   487
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   488
  | o  changeset:   5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   489
  | |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   490
  | |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   491
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   492
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   493
  | |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   494
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   495
  o |  changeset:   4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   496
  |/   user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   497
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   498
  |    summary:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   499
  |
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   500
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   501
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   502
   * query (1 changesets)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   503
  $ cd ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   504
  $ hg co query
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
   505
  switching to topic query
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   506
  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
   507
  $ echo answer >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   508
  $ hg ci -m 'Narf is like `zort` or `poit`!'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   509
  $ hg merge narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   510
  merging alpha
1868
5cdd5e0a421c test: adapt to newer mercurial
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1867
diff changeset
   511
  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
   512
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
3590
d5adce52cef4 test-compat: merge stable into mercurial-4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3430
diff changeset
   513
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   514
  [1]
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   515
  $ hg revert -r narf alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   516
  $ hg resolve -m alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   517
  (no more unresolved files)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   518
  $ hg topic narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   519
  $ hg ci -m 'Finish narf'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   520
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   521
     fran  (1 changesets)
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   522
   * narf  (2 changesets)
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   523
     query (2 changesets)
1885
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
   524
  $ 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
   525
  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
   526
  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
   527
  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
   528
  default:query
1857
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   529
  fran
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   530
  narf
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   531
  query
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
   532
  tip
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   533
  $ hg phase --public narf
2986
4746b92cc1f8 topics/ui: signal when an operation entails voiding a topic
Aurélien Campéas
parents: 2985
diff changeset
   534
  active topic 'narf' is now empty
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   535
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   536
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
   537
narf commits public:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   538
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   539
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   540
     fran (1 changesets)
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   541
   * narf (0 changesets)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   542
  $ hg log -Gl 6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   543
  @    changeset:   9:ae074045b7a7
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   544
  |\   tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   545
  | |  parent:      8:54c943c1c167
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   546
  | |  parent:      6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   547
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   548
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   549
  | |  summary:     Finish narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   550
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   551
  | o  changeset:   8:54c943c1c167
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   552
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   553
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   554
  | |  summary:     Narf is like `zort` or `poit`!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   555
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   556
  | o  changeset:   7:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   557
  | |  parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   558
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   559
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   560
  | |  summary:     what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   561
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   562
  o |  changeset:   6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   563
  |/   parent:      4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   564
  |    user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   565
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   566
  |    summary:     narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   567
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   568
  | o  changeset:   5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   569
  | |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   570
  | |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   571
  | |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   572
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   573
  | |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   574
  | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   575
  o |  changeset:   4:fb147b0b417c
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:     start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   579
  |
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   580
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   581
  $ cd ../brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   582
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   583
   * query (1 changesets)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   584
  $ hg pull ../pinky -r narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   585
  pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   586
  abort: unknown revision 'narf'!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   587
  [255]
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   588
  $ hg pull ../pinky -r default
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   589
  pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   590
  searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   591
  adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   592
  adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   593
  adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   594
  added 3 changesets with 3 changes to 1 files
3075
8feb2cae7eae test: adapt to output change from eb586ed5d8ce
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3060
diff changeset
   595
  new changesets 7c34953036d6:ae074045b7a7
2986
4746b92cc1f8 topics/ui: signal when an operation entails voiding a topic
Aurélien Campéas
parents: 2985
diff changeset
   596
  active topic 'query' is now empty
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   597
  (run 'hg update' to get a working copy)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   598
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   599
   * query (0 changesets)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   600
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   601
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
   602
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   603
  $ hg pull ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   604
  pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   605
  searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   606
  adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   607
  adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   608
  adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   609
  added 1 changesets with 1 changes to 1 files (+1 heads)
3075
8feb2cae7eae test: adapt to output change from eb586ed5d8ce
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3060
diff changeset
   610
  new changesets 0469d521db49
1885
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
   611
  (run 'hg heads' to see heads)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   612
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   613
     fran  (1 changesets)
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   614
   * query (0 changesets)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   615
  $ hg log -Gr 'draft()'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   616
  o  changeset:   9:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   617
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   618
  |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   619
  |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   620
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   621
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   622
  |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   623
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   624
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   625
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
   626
disappear:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   627
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   628
  $ hg topics --clear
2984
30f6030dca8f topics: signal to the end user when a topic has been forgotten
Aurélien Campéas
parents: 2938
diff changeset
   629
  clearing empty topic "query"
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   630
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   631
     fran (1 changesets)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   632
1843
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   633
Topic revset
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   634
  $ hg log -r 'topic()' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   635
  o  changeset:   9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   636
  |  tag:         tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   637
  |  topic:       fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   638
  |  parent:      3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   639
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   640
  |  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
   641
  |  summary:     start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   642
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   643
  $ hg log -r 'not topic()' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   644
  o    changeset:   8:ae074045b7a7
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   645
  |\   parent:      7:54c943c1c167
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   646
  | |  parent:      6:7c34953036d6
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   647
  | |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   648
  | |  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
   649
  | |  summary:     Finish narf
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   650
  | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   651
  | o  changeset:   7:54c943c1c167
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   652
  | |  parent:      5:c01515cfc331
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   653
  | |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   654
  | |  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
   655
  | |  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
   656
  | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   657
  o |  changeset:   6:7c34953036d6
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   658
  | |  parent:      4:fb147b0b417c
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   659
  | |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   660
  | |  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
   661
  | |  summary:     narf!
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   662
  | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   663
  | @  changeset:   5:c01515cfc331
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   664
  |/   user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   665
  |    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
   666
  |    summary:     what is narf, pinky?
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   667
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   668
  o  changeset:   4:fb147b0b417c
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   669
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   670
  |  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
   671
  |  summary:     start on narf
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   672
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   673
  o  changeset:   3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   674
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   675
  |  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
   676
  |  summary:     Add file delta
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   677
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   678
  o  changeset:   2:15d1eb11d2fa
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   679
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   680
  |  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
   681
  |  summary:     Add file gamma
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   682
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   683
  o  changeset:   1:c692ea2c9224
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   684
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   685
  |  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
   686
  |  summary:     Add file beta
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   687
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   688
  o  changeset:   0:c2b7d2f7d14b
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   689
     user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   690
     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
   691
     summary:     Add file alpha
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   692
  
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   693
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
   694
  $ hg log -r 'topic(narf)' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   695
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
   696
  $ 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
   697
  o  changeset:   9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   698
  |  tag:         tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   699
  |  topic:       fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   700
  |  parent:      3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   701
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   702
  |  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
   703
  |  summary:     start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   704
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   705
Exact match on fran:
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   706
  $ hg log -r 'topic(fran)' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   707
  o  changeset:   9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   708
  |  tag:         tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   709
  |  topic:       fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   710
  |  parent:      3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   711
  |  user:        test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   712
  |  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
   713
  |  summary:     start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   714
  |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
   715
1864
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   716
Match current topic:
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   717
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   718
     fran (1 changesets)
1864
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   719
  $ hg log -r 'topic(.)'
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   720
(no output is expected)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   721
  $ hg co fran
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
   722
  switching to topic fran
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   723
  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
   724
  $ hg log -r 'topic(.)'
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   725
  changeset:   9:0469d521db49
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   726
  tag:         tip
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   727
  topic:       fran
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   728
  parent:      3:a53952faf762
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   729
  user:        test
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   730
  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
   731
  summary:     start on fran
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   732
  
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   733
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
   734
Deactivate the topic.
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   735
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   736
   * fran (1 changesets)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   737
  $ hg topics --clear
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   738
  $ echo fran? >> beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   739
  $ 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
   740
  created new head
3397
f7129e3d5a38 topic: suggest using topic when user creates a new head on branch
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3225
diff changeset
   741
  (consider using topic for lightweight branches. See 'hg help topic')
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   742
  $ hg log -Gr 'draft()'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   743
  @  changeset:   10:4073470c35e1
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   744
  |  tag:         tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   745
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   746
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   747
  |  summary:     fran?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   748
  |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   749
  o  changeset:   9:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   750
  |  topic:       fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   751
  |  parent:      3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   752
  |  user:        test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   753
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   754
  |  summary:     start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   755
  |
3037
5c8d5f980f49 tests: add a new test for testing changing or clearing topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3027
diff changeset
   756
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
   757
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   758
     fran (1 changesets)
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   759
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   760
Testing for updating to t0
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   761
==========================
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   762
3037
5c8d5f980f49 tests: add a new test for testing changing or clearing topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3027
diff changeset
   763
  $ hg up fran
5c8d5f980f49 tests: add a new test for testing changing or clearing topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3027
diff changeset
   764
  switching to topic fran
5c8d5f980f49 tests: add a new test for testing changing or clearing topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3027
diff changeset
   765
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   766
  $ hg stack
3037
5c8d5f980f49 tests: add a new test for testing changing or clearing topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3027
diff changeset
   767
  ### topic: fran
3225
28fb347a5bf8 typos: fix typos in several locations
Kyle Lippincott <spectral@google.com>
parents: 3085
diff changeset
   768
  ### target: default (branch), ambiguous rebase destination - branch 'default' has 2 heads
3037
5c8d5f980f49 tests: add a new test for testing changing or clearing topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3027
diff changeset
   769
  t1@ start on fran (current)
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   770
  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
   771
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   772
  $ hg up t0
3037
5c8d5f980f49 tests: add a new test for testing changing or clearing topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3027
diff changeset
   773
  preserving the current topic 'fran'
5c8d5f980f49 tests: add a new test for testing changing or clearing topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3027
diff changeset
   774
  1 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
   775
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   776
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   777
   * fran (1 changesets)
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   778
  $ hg stack
3037
5c8d5f980f49 tests: add a new test for testing changing or clearing topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3027
diff changeset
   779
  ### topic: fran
3225
28fb347a5bf8 typos: fix typos in several locations
Kyle Lippincott <spectral@google.com>
parents: 3085
diff changeset
   780
  ### target: default (branch), ambiguous rebase destination - branch 'default' has 2 heads
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
   781
  t1: start on fran
3085
3eca2cbdc498 stack: order the adjective of changeset
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3084
diff changeset
   782
  t0^ Add file delta (base current)
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   783
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
   784
  $ hg topics --age
3037
5c8d5f980f49 tests: add a new test for testing changing or clearing topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3027
diff changeset
   785
   * fran (1970-01-01 by test)
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
   786
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   787
  $ cd ..
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   788
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   789
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
   790
======================================================
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   791
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   792
  $ hg init ponky
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   793
  $ cd ponky
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   794
  $ cat <<EOF >> .hg/hgrc
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   795
  > [phases]
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   796
  > publish=false
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   797
  > EOF
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   798
  $ cat <<EOF >> $HGRCPATH
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   799
  > [experimental]
3021
5f4c42d4f2e8 test: update tests to use topic-mode enforce
Boris Feld <boris.feld@octobus.net>
parents: 3013
diff changeset
   800
  > topic-mode = enforce
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   801
  > EOF
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   802
  $ touch a b c d
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   803
  $ hg add a
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   804
  $ hg ci -m "Added a"
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   805
  abort: no active topic
3027
b220e2f5ebd5 topic: update the topic-mode hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3023
diff changeset
   806
  (see 'hg help -e topic.topic-mode' for details)
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   807
  [255]
2733
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
   808
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
   809
(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
   810
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
   811
  $ 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
   812
  abort: no active topic
3027
b220e2f5ebd5 topic: update the topic-mode hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3023
diff changeset
   813
  (see 'hg help -e topic.topic-mode' for details)
2733
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
   814
  [255]
3021
5f4c42d4f2e8 test: update tests to use topic-mode enforce
Boris Feld <boris.feld@octobus.net>
parents: 3013
diff changeset
   815
  $ hg ci -m "added a" --config experimental.topic-mode=off
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   816
  $ hg log
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   817
  changeset:   0:a154386e50d1
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   818
  tag:         tip
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   819
  user:        test
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   820
  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
   821
  summary:     added a
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   822
  
3023
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents: 3021
diff changeset
   823
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   824
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
   825
======================================
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   826
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   827
  $ 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
   828
  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
   829
  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
   830
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   831
  $ 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
   832
  $ hg topic topic1990
2993
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   833
  $ hg ci -m "Added b" --config devel.default-date="631152000 0" --user "foo"
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
   834
  active topic 'topic1990' grew its first changeset
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   835
  $ 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
   836
  $ hg topic topic2010
2993
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   837
  $ hg ci -m "Added c" --config devel.default-date="1262304000 0" --user "bar"
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
   838
  active topic 'topic2010' grew its first changeset
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   839
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   840
  $ hg log -G
2993
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   841
  @  changeset:   3:76b16af75125
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   842
  |  tag:         tip
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   843
  |  topic:       topic2010
2993
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   844
  |  user:        bar
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   845
  |  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
   846
  |  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
   847
  |
2993
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   848
  o  changeset:   2:bba5bde53608
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   849
  |  topic:       topic1990
2993
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   850
  |  user:        foo
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   851
  |  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
   852
  |  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
   853
  |
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   854
  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
   855
     topic:       topic1970
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   856
     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
   857
     user:        test
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   858
     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
   859
     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
   860
  
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   861
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   862
     topic1970 (1 changesets)
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   863
     topic1990 (1 changesets)
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3037
diff changeset
   864
   * topic2010 (1 changesets)
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   865
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   866
  $ hg topics --age
2993
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   867
   * topic2010 (2010-01-01 by bar)
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   868
     topic1990 (1990-01-01 by foo)
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   869
     topic1970 (1970-01-01 by test)
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
   870
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   871
  $ 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
   872
  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
   873
  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
   874
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   875
  $ hg topics --age
2993
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   876
     topic2010 (2010-01-01 by bar)
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   877
     topic1990 (1990-01-01 by foo)
725b660d9886 topics: show the user who last touched the topic in --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2988
diff changeset
   878
   * topic1970 (1970-01-01 by test)
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
   879
2995
dbc896a7a1c3 topics: make sure user don't pass both the age option and a topic name
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2994
diff changeset
   880
  $ hg topics --age random
dbc896a7a1c3 topics: make sure user don't pass both the age option and a topic name
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2994
diff changeset
   881
  abort: cannot use --age while setting a topic
dbc896a7a1c3 topics: make sure user don't pass both the age option and a topic name
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2994
diff changeset
   882
  [255]
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
   883
  $ cd ..