tests/test-lfs-serve.t
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 23 Dec 2017 15:07:24 -0500
changeset 35503 bbcd2e478391
child 35504 6bb940de4c4c
permissions -rw-r--r--
test-lfs: add tests covering http exchanges This tries to test every combination of having the extension enabled/disabled on each side, and then push/pull/clone/identify lfs and non-lfs content. SSH is ignored here, because there's enough going on as it is. The root issue here is again that requirements are not exchanged and preserved on push/pull/clone. Doing so should eliminate the cryptic error messages when using `hg serve`. The 500 server error is triggered by "ValueError: no common changegroup version", because the extension forces changegroup3. Or, if changegroup3 is enabled manually, it is triggered by "abort: missing processor for flag '0x2000'!". Sadly, run-tests.py doesn't support conditionalizing the exit code like it does lines of output. Therefore, a couple of tests blot out the exit code by appending "|| true", since these failures will go away shortly anyway.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
     1
#testcases lfsremote-on lfsremote-off
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
     2
#require serve
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
     3
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
     4
This test splits `hg serve` with and without using the extension into separate
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
     5
tests cases.  The tests are broken down as follows, where "LFS"/"No-LFS"
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
     6
indicates whether or not there are commits that use an LFS file, and "D"/"E"
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
     7
indicates whether or not the extension is loaded.  The "X" cases are not tested
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
     8
individually, because the lfs requirement causes the process to bail early if
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
     9
the extension is disabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    10
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    11
.                        Server
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    12
.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    13
.                    No-LFS        LFS
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    14
.            +----------------------------+
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    15
.            |   ||  D  |  E  |  D  |  E  |
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    16
.            |---++=======================|
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    17
.  C         | D || N/A | #1  |  X  | #4  |
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    18
.  l    No   +---++-----------------------|
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    19
.  i    LFS  | E || #2  | #2  |  X  | #5  |
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    20
.  e         +---++-----------------------|
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    21
.  n         | D ||  X  |  X  |  X  |  X  |
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    22
.  t    LFS  |---++-----------------------|
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    23
.            | E || #3  | #3  |  X  | #6  |
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    24
.            |---++-----------------------+
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    25
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    26
  $ hg init server
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    27
  $ SERVER_REQUIRES="$TESTTMP/server/.hg/requires"
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    28
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    29
Skip the experimental.changegroup3=True config.  Failure to agree on this comes
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    30
first, and causes a "ValueError: no common changegroup version" or "abort:
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    31
HTTP Error 500: Internal Server Error", if the extension is only loaded on one
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    32
side.  If that *is* enabled, the subsequent failure is "abort: missing processor
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    33
for flag '0x2000'!" if the extension is only loaded on one side (possibly also
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    34
masked by the Internal Server Error message).
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    35
  $ cat >> $HGRCPATH <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    36
  > [lfs]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    37
  > url=file:$TESTTMP/dummy-remote/
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    38
  > threshold=10
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    39
  > [web]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    40
  > allow_push=*
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    41
  > push_ssl=False
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    42
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    43
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    44
#if lfsremote-on
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    45
  $ hg --config extensions.lfs= -R server \
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    46
  >    serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    47
#else
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    48
  $ hg --config extensions.lfs=! -R server \
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    49
  >    serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    50
#endif
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    51
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    52
  $ cat hg.pid >> $DAEMON_PIDS
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    53
  $ hg clone -q http://localhost:$HGPORT client
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    54
  $ grep 'lfs' client/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    55
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    56
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    57
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    58
Case #1: client with non-lfs content and the extension disabled; server with
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    59
non-lfs content, and the extension enabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    60
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    61
  $ cd client
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    62
  $ echo 'non-lfs' > nonlfs.txt
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    63
  $ hg ci -Aqm 'non-lfs'
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    64
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    65
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    66
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    67
#if lfsremote-on
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    68
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    69
  $ hg push -q
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    70
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    71
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    72
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    73
TODO: fail more gracefully, or don't mandate changegroup3 for non-lfs repos.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    74
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    75
  $ hg clone -q http://localhost:$HGPORT $TESTTMP/client1_clone
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    76
  abort: HTTP Error 500: Internal Server Error
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    77
  [255]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    78
  $ grep 'lfs' $TESTTMP/client1_clone/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    79
  grep: $TESTTMP/client1_clone/.hg/requires: $ENOENT$
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    80
  [2]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    81
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    82
TODO: fail more gracefully, or don't mandate changegroup3 for non-lfs repos.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    83
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    84
  $ hg init $TESTTMP/client1_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    85
  $ hg -R $TESTTMP/client1_pull pull -q http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    86
  abort: HTTP Error 500: Internal Server Error
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    87
  [255]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    88
  $ grep 'lfs' $TESTTMP/client1_pull/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    89
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    90
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    91
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    92
  d437e1d24fbd
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    93
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    94
#endif
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    95
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    96
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    97
Case #2: client with non-lfs content and the extension enabled; server with
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    98
non-lfs content, and the extension state controlled by #testcases.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    99
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   100
  $ cat >> $HGRCPATH <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   101
  > [extensions]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   102
  > lfs =
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   103
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   104
  $ echo 'non-lfs' > nonlfs2.txt
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   105
  $ hg ci -Aqm 'non-lfs file with lfs client'
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   106
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   107
TODO: fail more gracefully here
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   108
  $ hg push -q 2>&1 | grep '^[A-Z]' || true
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   109
  Traceback (most recent call last): (lfsremote-off !)
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   110
  ValueError: no common changegroup version (lfsremote-off !)
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   111
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   112
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   113
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   114
  $ hg clone -q http://localhost:$HGPORT $TESTTMP/client2_clone
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   115
  $ grep 'lfs' $TESTTMP/client2_clone/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   116
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   117
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   118
  $ hg init $TESTTMP/client2_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   119
  $ hg -R $TESTTMP/client2_pull pull -q http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   120
  $ grep 'lfs' $TESTTMP/client2_pull/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   121
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   122
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   123
XXX: The difference here is the push failed above when the extension isn't
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   124
enabled on the server.  The extension shouldn't need to mess with changegroup
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   125
versions if there is no lfs content.  But the requirement needs to be
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   126
consistently added before that can be ratcheted back.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   127
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   128
  1477875038c6 (lfsremote-on !)
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   129
  000000000000 (lfsremote-off !)
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   130
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   131
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   132
Case #3: client with lfs content and the extension enabled; server with
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   133
non-lfs content, and the extension state controlled by #testcases.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   134
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   135
TODO: add the 'lfs' requirement on the server for each test in lfsremote-on
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   136
  $ echo 'this is a big lfs file' > lfs.bin
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   137
  $ hg ci -Aqm 'lfs'
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   138
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   139
  .hg/requires:lfs
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   140
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   141
TODO: fail more gracefully here
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   142
  $ hg push -q 2>&1 | grep '^[A-Z]' || true
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   143
  Traceback (most recent call last): (lfsremote-off !)
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   144
  ValueError: no common changegroup version (lfsremote-off !)
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   145
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   146
  .hg/requires:lfs
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   147
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   148
  $ hg clone -q http://localhost:$HGPORT $TESTTMP/client3_clone
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   149
  $ grep 'lfs' $TESTTMP/client3_clone/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   150
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   151
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   152
  $ hg init $TESTTMP/client3_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   153
  $ hg -R $TESTTMP/client3_pull pull -q http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   154
  $ grep 'lfs' $TESTTMP/client3_pull/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   155
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   156
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   157
XXX: The difference here is the push failed above when the extension isn't
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   158
enabled on the server.  The extension shouldn't need to mess with changegroup
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   159
versions if there is no lfs content.  But the requirement needs to be
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   160
consistently added before that can be ratcheted back.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   161
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   162
  8374dc4052cb (lfsremote-on !)
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   163
  000000000000 (lfsremote-off !)
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   164
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   165
Don't bother testing the lfsremote-off cases- the server won't be able
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   166
to launch if there's lfs content and the extension is disabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   167
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   168
#if lfsremote-on
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   169
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   170
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   171
Case #4: client with non-lfs content and the extension disabled; server with
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   172
lfs content, and the extension enabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   173
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   174
  $ cat >> $HGRCPATH <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   175
  > [extensions]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   176
  > lfs = !
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   177
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   178
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   179
  $ hg init $TESTTMP/client4
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   180
  $ cd $TESTTMP/client4
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   181
  $ cat >> .hg/hgrc <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   182
  > [paths]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   183
  > default = http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   184
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   185
  $ echo 'non-lfs' > nonlfs2.txt
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   186
  $ hg ci -Aqm 'non-lfs'
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   187
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   188
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   189
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   190
  $ hg push -q --force
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   191
  warning: repository is unrelated
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   192
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   193
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   194
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   195
TODO: fail more gracefully.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   196
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   197
  $ hg clone -q http://localhost:$HGPORT $TESTTMP/client4_clone
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   198
  abort: HTTP Error 500: Internal Server Error
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   199
  [255]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   200
  $ grep 'lfs' $TESTTMP/client4_clone/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   201
  grep: $TESTTMP/client4_clone/.hg/requires: $ENOENT$
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   202
  [2]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   203
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   204
TODO: fail more gracefully.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   205
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   206
  $ hg init $TESTTMP/client4_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   207
  $ hg -R $TESTTMP/client4_pull pull -q http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   208
  abort: HTTP Error 500: Internal Server Error
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   209
  [255]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   210
  $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   211
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   212
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   213
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   214
  03b080fa9d93
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   215
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   216
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   217
Case #5: client with non-lfs content and the extension enabled; server with
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   218
lfs content, and the extension enabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   219
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   220
  $ cat >> $HGRCPATH <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   221
  > [extensions]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   222
  > lfs =
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   223
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   224
  $ echo 'non-lfs' > nonlfs3.txt
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   225
  $ hg ci -Aqm 'non-lfs file with lfs client'
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   226
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   227
  $ hg push -q
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   228
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   229
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   230
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   231
  $ hg clone -q http://localhost:$HGPORT $TESTTMP/client5_clone
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   232
  $ grep 'lfs' $TESTTMP/client5_clone/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   233
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   234
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   235
  $ hg init $TESTTMP/client5_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   236
  $ hg -R $TESTTMP/client5_pull pull -q http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   237
  $ grep 'lfs' $TESTTMP/client5_pull/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   238
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   239
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   240
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   241
  c729025cc5e3
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   242
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   243
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   244
Case #6: client with lfs content and the extension enabled; server with
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   245
lfs content, and the extension enabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   246
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   247
TODO: add the 'lfs' requirement on the server for each test
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   248
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   249
  $ echo 'this is another lfs file' > lfs2.txt
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   250
  $ hg ci -Aqm 'lfs file with lfs client'
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   251
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   252
  $ hg push -q
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   253
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   254
  .hg/requires:lfs
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   255
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   256
  $ hg clone -q http://localhost:$HGPORT $TESTTMP/client6_clone
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   257
  $ grep 'lfs' $TESTTMP/client6_clone/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   258
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   259
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   260
  $ hg init $TESTTMP/client6_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   261
  $ hg -R $TESTTMP/client6_pull pull -q http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   262
  $ grep 'lfs' $TESTTMP/client6_pull/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   263
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   264
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   265
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   266
  d3b84d50eacb
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   267
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   268
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   269
Misc: process dies early if a requirement exists and the extension is disabled
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   270
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   271
  $ hg --config extensions.lfs=! summary
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   272
  abort: repository requires features unknown to this Mercurial: lfs!
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   273
  (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   274
  [255]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   275
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   276
#endif
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   277
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   278
  $ $PYTHON $TESTDIR/killdaemons.py $DAEMON_PIDS
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   279
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   280
#if lfsremote-on
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   281
  $ cat $TESTTMP/errors.log | grep '^[A-Z]'
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   282
  Traceback (most recent call last):
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   283
  ValueError: no common changegroup version
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   284
  Traceback (most recent call last):
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   285
  ValueError: no common changegroup version
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   286
  Traceback (most recent call last):
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   287
  ValueError: no common changegroup version
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   288
  Traceback (most recent call last):
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   289
  ValueError: no common changegroup version
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   290
#else
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   291
  $ cat $TESTTMP/errors.log
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   292
#endif