tests/test-bookmarks-pushpull.t
author Matt Mackall <mpm@selenic.com>
Thu, 10 Feb 2011 13:46:28 -0600
changeset 13368 d4ab9486e514
parent 12969 6bd9778ae749
child 13388 a184dbd9b2c5
permissions -rw-r--r--
bookmarks: move push/pull command features to core
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12303
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
     1
  $ echo "[extensions]" >> $HGRCPATH
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
     2
  $ echo "bookmarks=" >> $HGRCPATH
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
     3
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
     4
  $ echo "[bookmarks]" >> $HGRCPATH
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
     5
  $ echo "track.current = True" >> $HGRCPATH
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
     6
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
     7
initialize
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
     8
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
     9
  $ hg init a
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    10
  $ cd a
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    11
  $ echo 'test' > test
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    12
  $ hg commit -Am'test'
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    13
  adding test
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    14
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    15
set bookmarks
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    16
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    17
  $ hg bookmark X
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    18
  $ hg bookmark Y
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    19
  $ hg bookmark Z
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    20
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    21
import bookmark by name
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    22
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    23
  $ hg init ../b
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    24
  $ cd ../b
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    25
  $ hg book Y
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    26
  $ hg book
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    27
   * Y                         -1:000000000000
12303
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    28
  $ hg pull ../a
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    29
  pulling from ../a
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    30
  requesting all changes
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    31
  adding changesets
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    32
  adding manifests
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    33
  adding file changes
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    34
  added 1 changesets with 1 changes to 1 files
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    35
  (run 'hg update' to get a working copy)
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    36
  $ hg bookmarks
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    37
     Y                         0:4e3505fd9583
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    38
  $ hg debugpushkey ../a namespaces
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    39
  bookmarks	
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    40
  namespaces	
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    41
  $ hg debugpushkey ../a bookmarks
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    42
  Y	4e3505fd95835d721066b76e75dbb8cc554d7f77
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    43
  X	4e3505fd95835d721066b76e75dbb8cc554d7f77
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    44
  Z	4e3505fd95835d721066b76e75dbb8cc554d7f77
12303
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    45
  $ hg pull -B X ../a
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    46
  pulling from ../a
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    47
  searching for changes
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    48
  no changes found
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    49
  importing bookmark X
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    50
  $ hg bookmark
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    51
     Y                         0:4e3505fd9583
12303
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    52
     X                         0:4e3505fd9583
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    53
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    54
export bookmark by name
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    55
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    56
  $ hg bookmark W
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    57
  $ hg bookmark foo
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    58
  $ hg bookmark foobar
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    59
  $ hg push -B W ../a
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    60
  pushing to ../a
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    61
  searching for changes
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    62
  no changes found
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    63
  exporting bookmark W
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    64
  $ hg -R ../a bookmarks
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    65
     Y                         0:4e3505fd9583
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    66
     X                         0:4e3505fd9583
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    67
   * Z                         0:4e3505fd9583
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    68
     W                         -1:000000000000
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    69
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    70
delete a remote bookmark
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    71
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    72
  $ hg book -d W
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    73
  $ hg push -B W ../a
13368
d4ab9486e514 bookmarks: move push/pull command features to core
Matt Mackall <mpm@selenic.com>
parents: 12969
diff changeset
    74
  pushing to ../a
d4ab9486e514 bookmarks: move push/pull command features to core
Matt Mackall <mpm@selenic.com>
parents: 12969
diff changeset
    75
  searching for changes
d4ab9486e514 bookmarks: move push/pull command features to core
Matt Mackall <mpm@selenic.com>
parents: 12969
diff changeset
    76
  no changes found
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    77
  deleting remote bookmark W
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    78
12303
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    79
push/pull name that doesn't exist
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    80
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    81
  $ hg push -B badname ../a
13368
d4ab9486e514 bookmarks: move push/pull command features to core
Matt Mackall <mpm@selenic.com>
parents: 12969
diff changeset
    82
  pushing to ../a
d4ab9486e514 bookmarks: move push/pull command features to core
Matt Mackall <mpm@selenic.com>
parents: 12969
diff changeset
    83
  searching for changes
d4ab9486e514 bookmarks: move push/pull command features to core
Matt Mackall <mpm@selenic.com>
parents: 12969
diff changeset
    84
  no changes found
12303
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    85
  bookmark badname does not exist on the local or remote repository!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12303
diff changeset
    86
  [2]
12303
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    87
  $ hg pull -B anotherbadname ../a
13368
d4ab9486e514 bookmarks: move push/pull command features to core
Matt Mackall <mpm@selenic.com>
parents: 12969
diff changeset
    88
  pulling from ../a
12303
4ab87473029d tests: add test for bookmark push/pull
Will Maier <willmaier@ml1.net>
parents:
diff changeset
    89
  abort: remote bookmark anotherbadname not found!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12303
diff changeset
    90
  [255]
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    91
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    92
divergent bookmarks
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    93
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    94
  $ cd ../a
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    95
  $ echo c1 > f1
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    96
  $ hg ci -Am1
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    97
  adding f1
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    98
  $ hg book -f X
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
    99
  $ hg book
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   100
     Y                         0:4e3505fd9583
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   101
   * X                         1:0d2164f0ce0d
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   102
     Z                         1:0d2164f0ce0d
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   103
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   104
  $ cd ../b
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   105
  $ hg up
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   106
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   107
  $ echo c2 > f2
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   108
  $ hg ci -Am2
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   109
  adding f2
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   110
  $ hg book -f X
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   111
  $ hg book
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   112
     Y                         0:4e3505fd9583
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   113
   * X                         1:9b140be10808
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   114
     foo                       -1:000000000000
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   115
     foobar                    -1:000000000000
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   116
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   117
  $ hg pull ../a
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   118
  pulling from ../a
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   119
  searching for changes
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   120
  adding changesets
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   121
  adding manifests
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   122
  adding file changes
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   123
  added 1 changesets with 1 changes to 1 files (+1 heads)
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   124
  not updating divergent bookmark X
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   125
  (run 'hg heads' to see heads, 'hg merge' to merge)
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   126
  $ hg book
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   127
     Y                         0:4e3505fd9583
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   128
   * X                         1:9b140be10808
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   129
     foo                       -1:000000000000
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   130
     foobar                    -1:000000000000
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   131
  $ hg push -f ../a
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   132
  pushing to ../a
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   133
  searching for changes
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   134
  adding changesets
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   135
  adding manifests
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   136
  adding file changes
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   137
  added 1 changesets with 1 changes to 1 files (+1 heads)
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   138
  $ hg -R ../a book
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   139
     Y                         0:4e3505fd9583
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   140
   * X                         1:0d2164f0ce0d
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   141
     Z                         1:0d2164f0ce0d
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   142
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   143
hgweb
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   144
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   145
  $ cat <<EOF > .hg/hgrc
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   146
  > [web]
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   147
  > push_ssl = false
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   148
  > allow_push = *
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   149
  > EOF
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   150
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   151
  $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   152
  $ cat ../hg.pid >> $DAEMON_PIDS
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   153
  $ cd ../a
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   154
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   155
  $ hg debugpushkey http://localhost:$HGPORT/ namespaces 
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   156
  bookmarks	
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   157
  namespaces	
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   158
  $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   159
  Y	4e3505fd95835d721066b76e75dbb8cc554d7f77
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   160
  X	9b140be1080824d768c5a4691a564088eede71f9
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   161
  foo	0000000000000000000000000000000000000000
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   162
  foobar	0000000000000000000000000000000000000000
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   163
  $ hg out -B http://localhost:$HGPORT/
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   164
  comparing with http://localhost:$HGPORT/
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   165
  searching for changed bookmarks
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   166
     Z                         0d2164f0ce0d
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   167
  $ hg push -B Z http://localhost:$HGPORT/
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   168
  pushing to http://localhost:$HGPORT/
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   169
  searching for changes
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   170
  no changes found
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   171
  exporting bookmark Z
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   172
  $ hg book -d Z
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   173
  $ hg in -B http://localhost:$HGPORT/
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   174
  comparing with http://localhost:$HGPORT/
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   175
  searching for changed bookmarks
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   176
     Z                         0d2164f0ce0d
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   177
     foo                       000000000000
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   178
     foobar                    000000000000
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   179
  $ hg pull -B Z http://localhost:$HGPORT/
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   180
  pulling from http://localhost:$HGPORT/
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   181
  searching for changes
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   182
  no changes found
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   183
  not updating divergent bookmark X
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   184
  importing bookmark Z
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   185
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12346
diff changeset
   186
  $ kill `cat ../hg.pid`