tests/test-topic-tutorial.t
author Boris Feld <boris.feld@octobus.net>
Thu, 27 Jul 2017 17:38:37 +0200
branchstable
changeset 2827 498409c72dd2
parent 2826 93588d219f2f
child 2829 1c529afd3fef
permissions -rw-r--r--
doc: various improvements on topic tutorial
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     1
==============
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     2
Topic Tutorial
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     3
==============
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     4
2826
93588d219f2f doc: various little improvements for rst export
Boris Feld <boris.feld@octobus.net>
parents: 2825
diff changeset
     5
This Mercurial configuration example is used for testing.
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     6
2826
93588d219f2f doc: various little improvements for rst export
Boris Feld <boris.feld@octobus.net>
parents: 2825
diff changeset
     7
.. Various setup
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     8
2045
db617700d318 tests: move "test setup" script into a 'testlib' directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2014
diff changeset
     9
  $ . "$TESTDIR/testlib/topic_setup.sh"
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    10
  $ hg init server
2826
93588d219f2f doc: various little improvements for rst export
Boris Feld <boris.feld@octobus.net>
parents: 2825
diff changeset
    11
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    12
  $ cd server
2826
93588d219f2f doc: various little improvements for rst export
Boris Feld <boris.feld@octobus.net>
parents: 2825
diff changeset
    13
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    14
  $ cat >> .hg/hgrc << EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    15
  > [ui]
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    16
  > user= Shopping Master
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    17
  > EOF
2826
93588d219f2f doc: various little improvements for rst export
Boris Feld <boris.feld@octobus.net>
parents: 2825
diff changeset
    18
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    19
  $ cat >> shopping << EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    20
  > Spam
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    21
  > Whizzo butter
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    22
  > Albatross
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    23
  > Rat (rather a lot)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    24
  > Jugged fish
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    25
  > Blancmange
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    26
  > Salmon mousse
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    27
  > EOF
2826
93588d219f2f doc: various little improvements for rst export
Boris Feld <boris.feld@octobus.net>
parents: 2825
diff changeset
    28
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    29
  $ hg commit -A -m "Shopping list"
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    30
  adding shopping
2826
93588d219f2f doc: various little improvements for rst export
Boris Feld <boris.feld@octobus.net>
parents: 2825
diff changeset
    31
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    32
  $ cd ..
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    33
  $ hg clone server client
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    34
  updating to branch default
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    35
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    36
  $ cd client
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    37
  $ cat >> .hg/hgrc << EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    38
  > [ui]
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    39
  > user= Tutorial User
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    40
  > EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    41
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    42
Topic branches are lightweight branches which disappear when changes are
2823
91516be7c034 test: fix typo in the topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2746
diff changeset
    43
finalized (move to the public phase). They can help users to organize and share
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    44
their unfinished work.
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    45
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    46
Topic Basics
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    47
============
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    48
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
    49
Let's say we use Mercurial to manage our shopping list:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    50
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    51
  $ hg log --graph
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    52
  @  changeset:   0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    53
     tag:         tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    54
     user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    55
     date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    56
     summary:     Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    57
  
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    58
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
    59
We are about to make some additions to this list and would like to do them 
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
    60
within a topic. Creating a new topic is done using the ``topic`` command:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    61
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    62
  $ hg topic food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    63
2722
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
    64
Much like a named branch, our topic is active but it does not contain any
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
    65
changesets yet:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    66
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    67
  $ hg topic
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    68
   * food
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
    69
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    70
  $ hg summary
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    71
  parent: 0:38da43f0a2ea tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    72
   Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    73
  branch: default
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    74
  commit: (clean)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    75
  update: (current)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    76
  topic:  food
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
    77
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    78
  $ hg log --graph
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    79
  @  changeset:   0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    80
     tag:         tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    81
     user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    82
     date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    83
     summary:     Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    84
  
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    85
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
    86
Our next commit will be part of the active topic:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    87
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    88
  $ cat >> shopping << EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    89
  > Egg
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    90
  > Suggar
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    91
  > Vinegar
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    92
  > Oil
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    93
  > EOF
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
    94
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    95
  $ hg commit -m "adding condiments"
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
    96
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    97
  $ hg log --graph --rev 'topic("food")'
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    98
  @  changeset:   1:13900241408b
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    99
  |  tag:         tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   100
  ~  topic:       food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   101
     user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   102
     date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   103
     summary:     adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   104
  
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   105
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   106
And future commits will be part of that topic too:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   107
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   108
  $ cat >> shopping << EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   109
  > Bananas
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   110
  > Pear
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   111
  > Apple
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   112
  > EOF
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   113
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   114
  $ hg commit -m "adding fruits"
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   115
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   116
  $ hg log --graph --rev 'topic("food")'
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   117
  @  changeset:   2:287de11b401f
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   118
  |  tag:         tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   119
  |  topic:       food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   120
  |  user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   121
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   122
  |  summary:     adding fruits
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   123
  |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   124
  o  changeset:   1:13900241408b
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   125
  |  topic:       food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   126
  ~  user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   127
     date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   128
     summary:     adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   129
  
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   130
2721
c3a29c7abbee tutorial: word wrap long lines
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2720
diff changeset
   131
We can get a compact view of the content of our topic using the ``stack``
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   132
command:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   133
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   134
  $ hg stack
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   135
  ### topic: food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   136
  ### branch: default
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   137
  t2@ adding fruits (current)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   138
  t1: adding condiments
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2679
diff changeset
   139
  t0^ Shopping list (base)
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   140
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   141
The topic deactivates when we update away from it:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   142
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   143
  $ hg update default
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   144
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   145
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   146
  $ hg topic
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   147
     food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   148
2721
c3a29c7abbee tutorial: word wrap long lines
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2720
diff changeset
   149
Note that ``default`` (name of the branch) now refers to the tipmost
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   150
changeset of default without a topic:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   151
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   152
  $ hg log --graph
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   153
  o  changeset:   2:287de11b401f
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   154
  |  tag:         tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   155
  |  topic:       food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   156
  |  user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   157
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   158
  |  summary:     adding fruits
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   159
  |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   160
  o  changeset:   1:13900241408b
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   161
  |  topic:       food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   162
  |  user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   163
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   164
  |  summary:     adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   165
  |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   166
  @  changeset:   0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   167
     user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   168
     date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   169
     summary:     Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   170
  
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   171
And updating back to the topic reactivates it:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   172
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   173
  $ hg update food
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   174
  switching to topic food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   175
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   176
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   177
  $ hg topic
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   178
   * food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   179
2722
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   180
Updating to any changeset that is part of a topic activates the topic
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   181
regardless of how the revision was specified:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   182
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   183
  $ hg update default
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   184
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   185
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   186
  $ hg update --rev 'desc("condiments")'
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   187
  switching to topic food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   188
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   189
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   190
  $ hg topic
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   191
   * food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   192
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   193
.. Server side activity:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   194
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   195
  $ cd ../server/
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   196
  $ cat > shopping << EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   197
  > T-Shirt
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   198
  > Trousers
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   199
  > Spam
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   200
  > Whizzo butter
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   201
  > Albatross
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   202
  > Rat (rather a lot)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   203
  > Jugged fish
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   204
  > Blancmange
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   205
  > Salmon mousse
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   206
  > EOF
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   207
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   208
  $ hg commit -A -m "Adding clothes"
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   209
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   210
  $ cd ../client
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   211
2722
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   212
The topic will also affect the rebase and the merge destinations. Let's pull
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   213
the latest update from the main server:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   214
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   215
  $ hg pull
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   216
  pulling from $TESTTMP/server (glob)
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   217
  searching for changes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   218
  adding changesets
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   219
  adding manifests
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   220
  adding file changes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   221
  added 1 changesets with 1 changes to 1 files (+1 heads)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   222
  (run 'hg heads' to see heads)
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   223
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   224
  $ hg log -G
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   225
  o  changeset:   3:6104862e8b84
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   226
  |  tag:         tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   227
  |  parent:      0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   228
  |  user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   229
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   230
  |  summary:     Adding clothes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   231
  |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   232
  | o  changeset:   2:287de11b401f
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   233
  | |  topic:       food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   234
  | |  user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   235
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   236
  | |  summary:     adding fruits
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   237
  | |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   238
  | @  changeset:   1:13900241408b
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   239
  |/   topic:       food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   240
  |    user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   241
  |    date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   242
  |    summary:     adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   243
  |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   244
  o  changeset:   0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   245
     user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   246
     date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   247
     summary:     Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   248
  
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   249
2722
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   250
The topic head will not be considered when merging from the new head of the
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   251
branch:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   252
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   253
  $ hg update default
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   254
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   255
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   256
  $ hg merge
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   257
  abort: branch 'default' has one head - please merge with an explicit rev
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   258
  (run 'hg heads' to see all heads)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   259
  [255]
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   260
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   261
But the topic will see that branch head as a valid destination:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   262
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   263
  $ hg update food
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   264
  switching to topic food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   265
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   266
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   267
  $ hg rebase
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   268
  rebasing 1:13900241408b "adding condiments"
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   269
  merging shopping
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2120
diff changeset
   270
  switching to topic food
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   271
  rebasing 2:287de11b401f "adding fruits"
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   272
  merging shopping
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   273
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   274
  $ hg log --graph
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   275
  @  changeset:   5:2d50db8b5b4c
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   276
  |  tag:         tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   277
  |  topic:       food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   278
  |  user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   279
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   280
  |  summary:     adding fruits
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   281
  |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   282
  o  changeset:   4:4011b46eeb33
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   283
  |  topic:       food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   284
  |  user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   285
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   286
  |  summary:     adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   287
  |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   288
  o  changeset:   3:6104862e8b84
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   289
  |  parent:      0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   290
  |  user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   291
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   292
  |  summary:     Adding clothes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   293
  |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   294
  o  changeset:   0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   295
     user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   296
     date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   297
     summary:     Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   298
  
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   299
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   300
The topic information will disappear when we publish the changesets:
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   301
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   302
  $ hg topic
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2120
diff changeset
   303
   * food
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   304
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   305
  $ hg push
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   306
  pushing to $TESTTMP/server (glob)
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   307
  searching for changes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   308
  adding changesets
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   309
  adding manifests
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   310
  adding file changes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   311
  added 2 changesets with 2 changes to 1 files
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   312
  2 new obsolescence markers
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   313
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   314
  $ hg topic
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2120
diff changeset
   315
   * food
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   316
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   317
  $ hg log --graph
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   318
  @  changeset:   5:2d50db8b5b4c
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   319
  |  tag:         tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   320
  |  user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   321
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   322
  |  summary:     adding fruits
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   323
  |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   324
  o  changeset:   4:4011b46eeb33
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   325
  |  user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   326
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   327
  |  summary:     adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   328
  |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   329
  o  changeset:   3:6104862e8b84
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   330
  |  parent:      0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   331
  |  user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   332
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   333
  |  summary:     Adding clothes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   334
  |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   335
  o  changeset:   0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   336
     user:        test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   337
     date:        Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   338
     summary:     Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   339
  
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   340
  $ hg update default
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   341
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   342
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   343
Working with Multiple Topics
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   344
============================
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   345
2722
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   346
In the above example, topics do not bring much benefit since you only have one
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   347
line of development. Topics start to be more useful when you have to work on
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   348
multiple features at the same time.
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   349
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   350
We might go shopping in a hardware store in the same go, so let's add some
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   351
tools to the shopping list within a new topic:
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   352
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   353
  $ hg topic tools
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   354
  $ echo hammer >> shopping
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   355
  $ hg commit -m 'Adding hammer'
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   356
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   357
  $ echo saw >> shopping
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   358
  $ hg commit -m 'Adding saw'
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   359
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   360
  $ echo drill >> shopping
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   361
  $ hg commit -m 'Adding drill'
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   362
2722
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   363
But we are not sure we will actually go to the hardware store, so in the
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   364
meantime, we want to extend the list with drinks. We go back to the official
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   365
default branch and start a new topic:
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   366
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   367
  $ hg update default
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   368
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   369
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   370
  $ hg topic drinks
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   371
  $ echo 'apple juice' >> shopping
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   372
  $ hg commit -m 'Adding apple juice'
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   373
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   374
  $ echo 'orange juice' >> shopping
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   375
  $ hg commit -m 'Adding orange juice'
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   376
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   377
We now have two topics:
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   378
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   379
  $ hg topic
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   380
   * drinks
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   381
     tools
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   382
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   383
The information displayed by ``hg stack`` adapts to the active topic:
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   384
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   385
  $ hg stack
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   386
  ### topic: drinks
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   387
  ### branch: default
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   388
  t2@ Adding orange juice (current)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   389
  t1: Adding apple juice
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2679
diff changeset
   390
  t0^ adding fruits (base)
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   391
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   392
  $ hg update tools
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   393
  switching to topic tools
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   394
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   395
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   396
  $ hg stack
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   397
  ### topic: tools
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   398
  ### branch: default
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   399
  t3@ Adding drill (current)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   400
  t2: Adding saw
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   401
  t1: Adding hammer
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2679
diff changeset
   402
  t0^ adding fruits (base)
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   403
2722
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   404
They are seen as independent branches by Mercurial. No rebase or merge
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   405
between them will be attempted by default:
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   406
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   407
  $ hg rebase
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   408
  nothing to rebase
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   409
  [1]
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   410
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   411
Server activity:
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   412
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   413
  $ cd ../server
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   414
  $ hg update
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   415
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   416
  $ mv shopping foo
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   417
  $ echo 'Coat' > shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   418
  $ cat foo >> shopping
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   419
  $ hg commit -m 'add a coat'
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   420
  $ echo 'Coat' > shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   421
  $ echo 'Shoes' >> shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   422
  $ cat foo >> shopping
2720
db3830646e34 tutorial: use rm instead of 'hg rm' for an untracked temporary file
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2679
diff changeset
   423
  $ rm foo
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   424
  $ hg commit -m 'add a pair of shoes'
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   425
  $ cd ../client
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   426
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   427
Let's see what other people did in the meantime:
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   428
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   429
  $ hg pull
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   430
  pulling from $TESTTMP/server (glob)
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   431
  searching for changes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   432
  adding changesets
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   433
  adding manifests
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   434
  adding file changes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   435
  added 2 changesets with 2 changes to 1 files (+1 heads)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   436
  (run 'hg heads' to see heads)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   437
2722
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   438
There are new changes! We can simply use ``hg rebase`` to update our
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   439
changeset on top of the latest:
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   440
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   441
  $ hg log -G
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   442
  o  changeset:   12:fbff9bc37a43
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   443
  |  tag:         tip
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   444
  |  user:        test
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   445
  |  date:        Thu Jan 01 00:00:00 1970 +0000
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   446
  |  summary:     add a pair of shoes
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   447
  |
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   448
  o  changeset:   11:f2d6cacc6115
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   449
  |  parent:      5:2d50db8b5b4c
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   450
  |  user:        test
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   451
  |  date:        Thu Jan 01 00:00:00 1970 +0000
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   452
  |  summary:     add a coat
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   453
  |
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   454
  | o  changeset:   10:70dfa201ed73
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   455
  | |  topic:       drinks
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   456
  | |  user:        test
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   457
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   458
  | |  summary:     Adding orange juice
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   459
  | |
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   460
  | o  changeset:   9:8dfa45bd5e0c
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   461
  |/   topic:       drinks
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   462
  |    parent:      5:2d50db8b5b4c
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   463
  |    user:        test
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   464
  |    date:        Thu Jan 01 00:00:00 1970 +0000
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   465
  |    summary:     Adding apple juice
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   466
  |
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   467
  | @  changeset:   8:34255b455dac
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   468
  | |  topic:       tools
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   469
  | |  user:        test
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   470
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   471
  | |  summary:     Adding drill
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   472
  | |
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   473
  | o  changeset:   7:cffff85af537
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   474
  | |  topic:       tools
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   475
  | |  user:        test
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   476
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   477
  | |  summary:     Adding saw
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   478
  | |
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   479
  | o  changeset:   6:183984ef46d1
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   480
  |/   topic:       tools
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   481
  |    user:        test
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   482
  |    date:        Thu Jan 01 00:00:00 1970 +0000
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   483
  |    summary:     Adding hammer
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   484
  |
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   485
  o  changeset:   5:2d50db8b5b4c
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   486
  |  user:        test
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   487
  |  date:        Thu Jan 01 00:00:00 1970 +0000
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   488
  |  summary:     adding fruits
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   489
  |
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   490
  o  changeset:   4:4011b46eeb33
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   491
  |  user:        test
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   492
  |  date:        Thu Jan 01 00:00:00 1970 +0000
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   493
  |  summary:     adding condiments
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   494
  |
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   495
  o  changeset:   3:6104862e8b84
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   496
  |  parent:      0:38da43f0a2ea
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   497
  |  user:        test
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   498
  |  date:        Thu Jan 01 00:00:00 1970 +0000
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   499
  |  summary:     Adding clothes
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   500
  |
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   501
  o  changeset:   0:38da43f0a2ea
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   502
     user:        test
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   503
     date:        Thu Jan 01 00:00:00 1970 +0000
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   504
     summary:     Shopping list
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   505
  
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   506
  $ hg rebase
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   507
  rebasing 6:183984ef46d1 "Adding hammer"
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   508
  merging shopping
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2120
diff changeset
   509
  switching to topic tools
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   510
  rebasing 7:cffff85af537 "Adding saw"
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   511
  merging shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   512
  rebasing 8:34255b455dac "Adding drill"
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   513
  merging shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   514
2721
c3a29c7abbee tutorial: word wrap long lines
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2720
diff changeset
   515
But what about the other topic? You can use 'hg topic --verbose' to see
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   516
information about all the topics:
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   517
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   518
  $ hg topic --verbose
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   519
     drinks (on branch: default, 2 changesets, 2 behind)
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2120
diff changeset
   520
   * tools  (on branch: default, 3 changesets)
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   521
2722
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   522
The "2 behind" is telling you that there are 2 new changesets on the named
2721
c3a29c7abbee tutorial: word wrap long lines
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2720
diff changeset
   523
branch of the topic. You need to merge or rebase to incorporate them.
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   524
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   525
Pushing that topic would create a new head, and therefore will be prevented:
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   526
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   527
  $ hg push --rev drinks
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   528
  pushing to $TESTTMP/server (glob)
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   529
  searching for changes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   530
  abort: push creates new remote head 70dfa201ed73!
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   531
  (merge or see 'hg help push' for details about pushing new heads)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   532
  [255]
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   533
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   534
2722
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   535
Even after a rebase, pushing all active topics at the same time will complain
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   536
about the multiple heads it would create on that branch:
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   537
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   538
  $ hg rebase -b drinks
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   539
  rebasing 9:8dfa45bd5e0c "Adding apple juice"
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   540
  merging shopping
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2120
diff changeset
   541
  switching to topic drinks
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   542
  rebasing 10:70dfa201ed73 "Adding orange juice"
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   543
  merging shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   544
  switching to topic tools
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   545
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   546
  $ hg push
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   547
  pushing to $TESTTMP/server (glob)
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   548
  searching for changes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   549
  abort: push creates new remote head 4cd7c1591a67!
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   550
  (merge or see 'hg help push' for details about pushing new heads)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   551
  [255]
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   552
2721
c3a29c7abbee tutorial: word wrap long lines
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2720
diff changeset
   553
Publishing only one of them is allowed (as long as it does not create a new
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   554
branch head as we just saw in the previous case):
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   555
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   556
  $ hg push -r drinks
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   557
  pushing to $TESTTMP/server (glob)
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   558
  searching for changes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   559
  adding changesets
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   560
  adding manifests
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   561
  adding file changes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   562
  added 2 changesets with 2 changes to 1 files
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   563
  2 new obsolescence markers
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   564
2722
44a6e6fbf80b tutorial: fix grammar and spelling
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2721
diff changeset
   565
The published topic has now disappeared, and the other is now marked as
2825
7608f1e04205 doc: fix test2rst
Boris Feld <boris.feld@octobus.net>
parents: 2823
diff changeset
   566
"behind":
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   567
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   568
  $ hg topic --verbose
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   569
   * tools (on branch: default, 3 changesets, 2 behind)
2827
498409c72dd2 doc: various improvements on topic tutorial
Boris Feld <boris.feld@octobus.net>
parents: 2826
diff changeset
   570
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   571
  $ hg stack
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   572
  ### topic: tools
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   573
  ### branch: default, 2 behind
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   574
  t3@ Adding drill (current)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   575
  t2: Adding saw
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   576
  t1: Adding hammer
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2679
diff changeset
   577
  t0^ add a pair of shoes (base)
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
   578