tests/test-topic-flow-single-head.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 20 Dec 2017 20:17:11 +0100
changeset 3331 846bdf081871
parent 3157 f286eefbd20d
child 3167 f089741039e5
child 3397 f7129e3d5a38
permissions -rw-r--r--
stablerange: drop unused `until` utility We no longer needs this function.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3157
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     1
=====================
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     2
Test workflow options
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     3
=====================
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     4
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     5
  $ . "$TESTDIR/testlib/topic_setup.sh"
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     6
  $ . "$TESTDIR/testlib/common.sh"
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     7
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     8
Test single head enforcing - Setup
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     9
=============================================
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    10
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    11
  $ hg init single-head-server
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    12
  $ cd single-head-server
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    13
  $ cat <<EOF >> .hg/hgrc
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    14
  > [phases]
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    15
  > publish = no
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    16
  > [experimental]
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    17
  > enforce-single-head = yes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    18
  > evolution = all
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    19
  > EOF
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    20
  $ mkcommit ROOT
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    21
  $ mkcommit c_dA0
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    22
  $ cd ..
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    23
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    24
  $ hg clone single-head-server client
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    25
  updating to branch default
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    26
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    27
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    28
Test single head enforcing - with branch only
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    29
---------------------------------------------
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    30
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    31
  $ cd client
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    32
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    33
continuing the current defaultbranch
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    34
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    35
  $ mkcommit c_dB0
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    36
  $ hg push
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    37
  pushing to $TESTTMP/single-head-server
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    38
  searching for changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    39
  adding changesets
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    40
  adding manifests
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    41
  adding file changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    42
  added 1 changesets with 1 changes to 1 files
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    43
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    44
creating a new branch
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    45
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    46
  $ hg up 'desc("ROOT")'
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    47
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    48
  $ hg branch branch_A
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    49
  marked working directory as branch branch_A
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    50
  (branches are permanent and global, did you want a bookmark?)
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    51
  $ mkcommit c_aC0
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    52
  $ hg push --new-branch
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    53
  pushing to $TESTTMP/single-head-server
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    54
  searching for changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    55
  adding changesets
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    56
  adding manifests
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    57
  adding file changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    58
  added 1 changesets with 1 changes to 1 files (+1 heads)
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    59
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    60
Create a new head on the default branch
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    61
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    62
  $ hg up 'desc("c_dA0")'
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    63
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    64
  $ mkcommit c_dD0
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    65
  created new head
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    66
  $ hg push -f
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    67
  pushing to $TESTTMP/single-head-server
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    68
  searching for changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    69
  adding changesets
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    70
  adding manifests
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    71
  adding file changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    72
  added 1 changesets with 1 changes to 1 files (+1 heads)
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    73
  transaction abort!
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    74
  rollback completed
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    75
  abort: 2 heads on "default"
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    76
  (286d02a6e2a2, 9bf953aa81f6)
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    77
  [255]
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    78
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    79
remerge them
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    80
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    81
  $ hg merge
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    82
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    83
  (branch merge, don't forget to commit)
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    84
  $ mkcommit c_dE0
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    85
  $ hg push
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    86
  pushing to $TESTTMP/single-head-server
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    87
  searching for changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    88
  adding changesets
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    89
  adding manifests
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    90
  adding file changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    91
  added 2 changesets with 2 changes to 2 files
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    92
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    93
Test single head enforcing - with topic
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    94
---------------------------------------
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    95
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    96
pushing a new topic
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    97
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    98
  $ hg topic foo
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    99
  marked working directory as topic: foo
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   100
  $ mkcommit c_dF0
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   101
  active topic 'foo' grew its first changeset
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   102
  $ hg push
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   103
  pushing to $TESTTMP/single-head-server
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   104
  searching for changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   105
  adding changesets
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   106
  adding manifests
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   107
  adding file changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   108
  added 1 changesets with 1 changes to 1 files
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   109
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   110
pushing a new topo branch (with a topic)
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   111
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   112
  $ hg up 'desc("c_dD0")'
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   113
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   114
  $ hg topic bar
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   115
  marked working directory as topic: bar
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   116
  $ mkcommit c_dG0
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   117
  active topic 'bar' grew its first changeset
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   118
  $ hg push
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   119
  pushing to $TESTTMP/single-head-server
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   120
  searching for changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   121
  adding changesets
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   122
  adding manifests
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   123
  adding file changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   124
  added 1 changesets with 1 changes to 1 files (+1 heads)
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   125
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   126
detect multiple heads on the topic
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   127
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   128
  $ mkcommit c_dH0
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   129
  $ hg push
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   130
  pushing to $TESTTMP/single-head-server
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   131
  searching for changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   132
  adding changesets
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   133
  adding manifests
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   134
  adding file changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   135
  added 1 changesets with 1 changes to 1 files
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   136
  $ hg up 'desc("c_dG0")'
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   137
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   138
  $ mkcommit c_dI0
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   139
  $ hg push  -f
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   140
  pushing to $TESTTMP/single-head-server
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   141
  searching for changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   142
  adding changesets
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   143
  adding manifests
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   144
  adding file changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   145
  added 1 changesets with 1 changes to 1 files (+1 heads)
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   146
  transaction abort!
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   147
  rollback completed
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   148
  abort: 2 heads on "default:bar"
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   149
  (5194f5dcd542, 48a01453c1c5)
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   150
  [255]
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   151
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   152
merge works fine
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   153
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   154
  $ hg merge
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   155
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   156
  (branch merge, don't forget to commit)
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   157
  $ mkcommit c_dJ0
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   158
  $ hg push
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   159
  pushing to $TESTTMP/single-head-server
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   160
  searching for changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   161
  adding changesets
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   162
  adding manifests
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   163
  adding file changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   164
  added 2 changesets with 2 changes to 2 files
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   165
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   166
Test single head enforcing - by phase move
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   167
------------------------------------------
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   168
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   169
  $ hg -R ../single-head-server phase --public 'desc("c_dJ0")'
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   170
  abort: 2 heads on "default"
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   171
  (6ed1df20edb1, 678bca4de98c)
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   172
  [255]
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   173
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   174
Test single head enforcing - after rewrite
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   175
------------------------------------------
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   176
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   177
  $ hg up foo
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   178
  switching to topic foo
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   179
  3 files updated, 0 files merged, 4 files removed, 0 files unresolved
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   180
  $ hg commit --amend -m c_dF1
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   181
  $ hg push
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   182
  pushing to $TESTTMP/single-head-server
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   183
  searching for changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   184
  adding changesets
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   185
  adding manifests
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   186
  adding file changes
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   187
  added 1 changesets with 0 changes to 1 files (+1 heads)
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   188
  1 new obsolescence markers
f286eefbd20d topic: add an option to enforce a single head per name in a repository
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   189
  obsoleted 1 changesets