tests/test-topic-push.t
author Martin von Zweigbergk <martinvonz@google.com>
Tue, 23 Apr 2019 09:45:45 -0700
changeset 4599 93ffedae6ec6
parent 3769 1bc4b0807c37
child 3936 537fd9a86c06
child 5198 cbfd36046969
permissions -rw-r--r--
evolve: _solveunstable() update progress only once There's no need to draw it, then possibly write text over it (with --verbose), and then draw it again.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2045
db617700d318 tests: move "test setup" script into a 'testlib' directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2018
diff changeset
     1
  $ . "$TESTDIR/testlib/topic_setup.sh"
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
  $ cat << EOF >> $HGRCPATH
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
  > [ui]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
  > logtemplate = {rev} {branch} {get(namespaces, "topics")} {phase} {desc|firstline}\n
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
  > ssh =python "$RUNTESTDIR/dummyssh"
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
  > EOF
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
  $ hg init main
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
  $ hg init draft
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
  $ cat << EOF >> draft/.hg/hgrc
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
  > [phases]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
  > publish=False
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
  > EOF
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
  $ hg clone main client
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
  updating to branch default
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
  $ cat << EOF >> client/.hg/hgrc
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
  > [paths]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
  > draft=../draft
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
  > EOF
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
Testing core behavior to make sure we did not break anything
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
============================================================
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
Pushing a first changeset
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
  $ cd client
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
  $ echo aaa > aaa
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
  $ hg add aaa
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
  $ hg commit -m 'CA'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  $ hg outgoing -G
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
    34
  comparing with $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  @  0 default  draft CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  $ hg push
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
    39
  pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  added 1 changesets with 1 changes to 1 files
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
Pushing two heads
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  $ echo aaa > bbb
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  $ hg add bbb
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  $ hg commit -m 'CB'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  $ echo aaa > ccc
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  $ hg up 'desc(CA)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  $ hg add ccc
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  $ hg commit -m 'CC'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  created new head
3397
f7129e3d5a38 topic: suggest using topic when user creates a new head on branch
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3091
diff changeset
    57
  (consider using topic for lightweight branches. See 'hg help topic')
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  $ hg outgoing -G
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
    59
  comparing with $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  @  2 default  draft CC
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  o  1 default  draft CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
  
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  $ hg push
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
    66
  pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  abort: push creates new remote head 9fe81b7f425d!
2018
de3304f76fa6 test: adapt to change in mercurial output
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
    69
  (merge or see 'hg help push' for details about pushing new heads)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  [255]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  $ hg outgoing -r 'desc(CB)' -G
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
    72
  comparing with $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  o  1 default  draft CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
  $ hg push -r 'desc(CB)'
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
    77
  pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  added 1 changesets with 1 changes to 1 files
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
Pushing a new branch
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  $ hg branch mountain
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  marked working directory as branch mountain
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  (branches are permanent and global, did you want a bookmark?)
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  $ hg commit --amend
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  $ hg outgoing -G
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
    91
  comparing with $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    92
  searching for changes
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    93
  @  3 mountain  draft CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  $ hg push 
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
    96
  pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  abort: push creates new remote branches: mountain!
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  (use 'hg push --new-branch' to create new remote branches)
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  [255]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
  $ hg push --new-branch
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   102
  pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   104
  adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   105
  adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   107
  added 1 changesets with 1 changes to 1 files (+1 heads)
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   108
  1 new obsolescence markers
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   109
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   110
Including on non-publishing
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   111
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   112
  $ hg push --new-branch draft
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   113
  pushing to $TESTTMP/draft (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   114
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   115
  adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   116
  adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   117
  adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   118
  added 3 changesets with 3 changes to 3 files (+1 heads)
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   119
  1 new obsolescence markers
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   120
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   121
Testing topic behavior
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   122
======================
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   123
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   124
Local peer tests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   125
----------------
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   126
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   127
  $ hg up -r 'desc(CA)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   128
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   129
  $ hg topic babar
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2983
diff changeset
   130
  marked working directory as topic: babar
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   131
  $ echo aaa > ddd
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   132
  $ hg add ddd
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   133
  $ hg commit -m 'CD'
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2985
diff changeset
   134
  active topic 'babar' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3397
diff changeset
   135
  (see 'hg help topics' for more information)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   136
  $ hg log -G # keep track of phase because I saw some strange bug during developement
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   137
  @  4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   138
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   139
  | o  3 mountain  public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   140
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   141
  | o  1 default  public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   142
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   143
  o  0 default  public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   144
  
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   145
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   146
Pushing a new topic to a non publishing server should not be seen as a new head
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   147
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   148
  $ hg push draft
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   149
  pushing to $TESTTMP/draft (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   150
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   151
  adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   152
  adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   153
  adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   154
  added 1 changesets with 1 changes to 1 files (+1 heads)
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   155
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   156
  @  4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   157
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   158
  | o  3 mountain  public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   159
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   160
  | o  1 default  public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   161
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   162
  o  0 default  public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   163
  
2982
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   164
push --topic
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   165
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   166
  $ hg log -G -R $TESTTMP/draft
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   167
  o  3 default babar draft CD
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   168
  |
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   169
  | o  2 mountain  public CC
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   170
  |/
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   171
  | o  1 default  public CB
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   172
  |/
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   173
  o  0 default  public CA
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   174
  
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   175
  $ echo bbb >> aaa
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   176
  $ hg commit -m "C'A"
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   177
  $ hg up 1
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   178
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   179
  $ hg topic --clear
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   180
  $ echo bbb >> bbb
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   181
  $ hg commit -m "C'B"
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   182
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   183
  @  6 default  draft C'B
2982
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   184
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   185
  | o  5 default babar draft C'A
2982
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   186
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   187
  | o  4 default babar draft CD
2982
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   188
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   189
  | | o  3 mountain  public CC
2982
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   190
  | |/
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   191
  o |  1 default  public CB
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   192
  |/
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   193
  o  0 default  public CA
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   194
  
2983
c0de0010ec30 topic: add a --topic option to "outgoing" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2982
diff changeset
   195
  $ hg outgoing draft --topic babar
c0de0010ec30 topic: add a --topic option to "outgoing" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2982
diff changeset
   196
  comparing with $TESTTMP/draft
c0de0010ec30 topic: add a --topic option to "outgoing" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2982
diff changeset
   197
  searching for changes
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   198
  5 default babar draft C'A
2982
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   199
  $ hg push draft --topic babar
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   200
  pushing to $TESTTMP/draft
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   201
  searching for changes
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   202
  adding changesets
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   203
  adding manifests
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   204
  adding file changes
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   205
  added 1 changesets with 1 changes to 1 files
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   206
  $ hg log -G -R $TESTTMP/draft
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   207
  o  4 default babar draft C'A
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   208
  |
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   209
  o  3 default babar draft CD
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   210
  |
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   211
  | o  2 mountain  public CC
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   212
  |/
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   213
  | o  1 default  public CB
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   214
  |/
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   215
  o  0 default  public CA
fef934b7ed86 topic: add a --topic option to "push" command
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 2929
diff changeset
   216
  
3091
c29a19413e92 test: use node instead of rev in topic push tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
   217
  $ hg strip --config extensions.strip= --no-backup -r 7a9e34dbf547: --quiet
c29a19413e92 test: use node instead of rev in topic push tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3013
diff changeset
   218
  $ hg strip --config extensions.strip= -R $TESTTMP/draft --no-backup -r 7a9e34dbf547: --quiet
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   219
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   220
Pushing a new topic to a publishing server should be seen as a new head
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   221
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   222
  $ hg push
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   223
  pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   224
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   225
  abort: push creates new remote head 67f579af159d!
2018
de3304f76fa6 test: adapt to change in mercurial output
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
   226
  (merge or see 'hg help push' for details about pushing new heads)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   227
  [255]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   228
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   229
  @  4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   230
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   231
  | o  3 mountain  public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   232
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   233
  | o  1 default  public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   234
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   235
  o  0 default  public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   236
  
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   237
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   238
wireprotocol tests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   239
------------------
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   240
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   241
  $ hg up -r 'desc(CA)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   242
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   243
  $ hg topic celeste
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2983
diff changeset
   244
  marked working directory as topic: celeste
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   245
  $ echo aaa > eee
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   246
  $ hg add eee
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   247
  $ hg commit -m 'CE'
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2985
diff changeset
   248
  active topic 'celeste' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3397
diff changeset
   249
  (see 'hg help topics' for more information)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   250
  $ hg log -G # keep track of phase because I saw some strange bug during developement
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   251
  @  5 default celeste draft CE
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   252
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   253
  | o  4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   254
  |/
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   255
  | o  3 mountain  public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   256
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   257
  | o  1 default  public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   258
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   259
  o  0 default  public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   260
  
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   261
1903
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   262
Pushing a new topic to a non publishing server without topic -> new head
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   263
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   264
  $ cat << EOF >> ../draft/.hg/hgrc
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   265
  > [extensions]
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   266
  > topic=!
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   267
  > EOF
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   268
  $ hg push ssh://user@dummy/draft
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   269
  pushing to ssh://user@dummy/draft
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   270
  searching for changes
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   271
  abort: push creates new remote head 84eaf32db6c3!
2018
de3304f76fa6 test: adapt to change in mercurial output
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
   272
  (merge or see 'hg help push' for details about pushing new heads)
1903
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   273
  [255]
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   274
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   275
  @  5 default celeste draft CE
1903
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   276
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   277
  | o  4 default babar draft CD
1903
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   278
  |/
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   279
  | o  3 mountain  public CC
1903
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   280
  |/
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   281
  | o  1 default  public CB
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   282
  |/
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   283
  o  0 default  public CA
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   284
  
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   285
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   286
Pushing a new topic to a non publishing server should not be seen as a new head
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   287
1903
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   288
  $ printf "topic=" >> ../draft/.hg/hgrc
58cdf061d49a topic: don't take topic into account when pushing to non-topic repo
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1887
diff changeset
   289
  $ hg config extensions.topic >> ../draft/.hg/hgrc
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   290
  $ hg push ssh://user@dummy/draft
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   291
  pushing to ssh://user@dummy/draft
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   292
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   293
  remote: adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   294
  remote: adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   295
  remote: adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   296
  remote: added 1 changesets with 1 changes to 1 files (+1 heads)
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   297
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   298
  @  5 default celeste draft CE
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   299
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   300
  | o  4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   301
  |/
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   302
  | o  3 mountain  public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   303
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   304
  | o  1 default  public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   305
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   306
  o  0 default  public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   307
  
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   308
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   309
Pushing a new topic to a publishing server should be seen as a new head
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   310
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   311
  $ hg push ssh://user@dummy/main
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   312
  pushing to ssh://user@dummy/main
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   313
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   314
  abort: push creates new remote head 67f579af159d!
2018
de3304f76fa6 test: adapt to change in mercurial output
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
   315
  (merge or see 'hg help push' for details about pushing new heads)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   316
  [255]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   317
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   318
  @  5 default celeste draft CE
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   319
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   320
  | o  4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   321
  |/
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   322
  | o  3 mountain  public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   323
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   324
  | o  1 default  public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   325
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   326
  o  0 default  public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   327
  
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   328
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   329
Check that we reject multiple head on the same topic
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   330
----------------------------------------------------
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   331
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   332
  $ hg up 'desc(CB)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   333
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   334
  $ hg topic babar
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2983
diff changeset
   335
  marked working directory as topic: babar
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   336
  $ echo aaa > fff
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   337
  $ hg add fff
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   338
  $ hg commit -m 'CF'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   339
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   340
  @  6 default babar draft CF
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   341
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   342
  | o  5 default celeste draft CE
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   343
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   344
  | | o  4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   345
  | |/
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   346
  | | o  3 mountain  public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   347
  | |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   348
  o |  1 default  public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   349
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   350
  o  0 default  public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   351
  
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   352
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   353
  $ hg push draft
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   354
  pushing to $TESTTMP/draft (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   355
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   356
  abort: push creates new remote head f0bc62a661be on branch 'default:babar'!
2018
de3304f76fa6 test: adapt to change in mercurial output
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
   357
  (merge or see 'hg help push' for details about pushing new heads)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   358
  [255]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   359
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   360
Multiple head on a branch merged in a topic changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   361
------------------------------------------------------------------------
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   362
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   363
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   364
  $ hg up 'desc(CA)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   365
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   366
  $ echo aaa > ggg
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   367
  $ hg add ggg
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   368
  $ hg commit -m 'CG'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   369
  created new head
3397
f7129e3d5a38 topic: suggest using topic when user creates a new head on branch
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3091
diff changeset
   370
  (consider using topic for lightweight branches. See 'hg help topic')
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   371
  $ hg up 'desc(CF)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   372
  switching to topic babar
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   373
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   374
  $ hg merge 'desc(CG)'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   375
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   376
  (branch merge, don't forget to commit)
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   377
  $ hg commit -m 'CM'
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   378
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   379
  @    8 default babar draft CM
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   380
  |\
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   381
  | o  7 default  draft CG
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   382
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   383
  o |  6 default babar draft CF
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   384
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   385
  | | o  5 default celeste draft CE
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   386
  | |/
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   387
  | | o  4 default babar draft CD
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   388
  | |/
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   389
  | | o  3 mountain  public CC
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   390
  | |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   391
  o |  1 default  public CB
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   392
  |/
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   393
  o  0 default  public CA
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   394
  
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   395
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   396
Reject when pushing to draft
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   397
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   398
  $ hg push draft -r .
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   399
  pushing to $TESTTMP/draft (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   400
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   401
  abort: push creates new remote head 4937c4cad39e!
2018
de3304f76fa6 test: adapt to change in mercurial output
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
   402
  (merge or see 'hg help push' for details about pushing new heads)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   403
  [255]
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   404
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   405
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   406
Reject when pushing to publishing
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   407
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   408
  $ hg push -r .
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
   409
  pushing to $TESTTMP/main (glob)
1886
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   410
  searching for changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   411
  adding changesets
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   412
  adding manifests
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   413
  adding file changes
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   414
  added 3 changesets with 2 changes to 2 files
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   415
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   416
  $ cd ..
0504e76bfbd9 push: allow pushing new topic to non-publishing server by default
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   417
1887
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   418
Test phase move
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   419
==================================
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   420
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   421
setup, two repo knowns about two small topic branch
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   422
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   423
  $ hg init repoA
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   424
  $ hg clone repoA repoB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   425
  updating to branch default
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   426
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   427
  $ cat << EOF >> repoA/.hg/hgrc
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   428
  > [phases]
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   429
  > publish=False
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   430
  > EOF
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   431
  $ cat << EOF >> repoB/.hg/hgrc
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   432
  > [phases]
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   433
  > publish=False
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   434
  > EOF
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   435
  $ cd repoA
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   436
  $ echo aaa > base
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   437
  $ hg add base
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   438
  $ hg commit -m 'CBASE'
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   439
  $ echo aaa > aaa
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   440
  $ hg add aaa
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   441
  $ hg topic topicA
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2983
diff changeset
   442
  marked working directory as topic: topicA
1887
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   443
  $ hg commit -m 'CA'
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2985
diff changeset
   444
  active topic 'topicA' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3397
diff changeset
   445
  (see 'hg help topics' for more information)
1887
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   446
  $ hg up 'desc(CBASE)'
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   447
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   448
  $ echo aaa > bbb
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   449
  $ hg add bbb
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   450
  $ hg topic topicB
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2983
diff changeset
   451
  marked working directory as topic: topicB
1887
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   452
  $ hg commit -m 'CB'
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2985
diff changeset
   453
  active topic 'topicB' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3397
diff changeset
   454
  (see 'hg help topics' for more information)
1887
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   455
  $ cd ..
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   456
  $ hg push -R repoA repoB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   457
  pushing to repoB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   458
  searching for changes
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   459
  adding changesets
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   460
  adding manifests
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   461
  adding file changes
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   462
  added 3 changesets with 3 changes to 3 files (+1 heads)
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   463
  $ hg log -G -R repoA
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   464
  @  2 default topicB draft CB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   465
  |
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   466
  | o  1 default topicA draft CA
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   467
  |/
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   468
  o  0 default  draft CBASE
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   469
  
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   470
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   471
We turn different topic to public on each side,
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   472
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   473
  $ hg -R repoA phase --public topicA
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   474
  $ hg -R repoB phase --public topicB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   475
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   476
Pushing should complain because it create to heads on default
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   477
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   478
  $ hg push -R repoA repoB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   479
  pushing to repoB
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   480
  searching for changes
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   481
  no changes found
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   482
  abort: push create a new head on branch "default"
68125d026b07 push: hackish handeling of new branch head from phase move
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1886
diff changeset
   483
  [255]