tests/test-lfs-serve.t
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 14 Apr 2018 21:16:35 -0400
changeset 37765 ab04972a33ef
parent 37764 5e67c20915a7
child 38021 538e850ae737
child 38178 3790efb388ca
permissions -rw-r--r--
lfs: enable the final download count status message At this point, I think all of the core commands are prefetching, except grep and verify. Verify will need some special handling, in case the revlogs are corrupt. Grep has an issue that still needs to be debugged, but we probably need to give the behavior some thought too- it would be a shame to have to download everything in order to search. I think the benefit of having this info for all commands outweighs extra printing in a command that is arguably not well behaved in this context 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
37348
f4e84dfc06fd tests: skip largefiles and lfs tests when using simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35506
diff changeset
     2
#require serve no-reposimplestore
35503
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
37562
e5cd8d1a094d lfs: special case the null:// usercache instead of treating it as a url
Matt Harbison <matt_harbison@yahoo.com>
parents: 37518
diff changeset
    36
  > [experimental]
e5cd8d1a094d lfs: special case the null:// usercache instead of treating it as a url
Matt Harbison <matt_harbison@yahoo.com>
parents: 37518
diff changeset
    37
  > lfs.disableusercache = True
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    38
  > [lfs]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    39
  > threshold=10
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    40
  > [web]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    41
  > allow_push=*
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    42
  > push_ssl=False
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    43
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    44
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    45
#if lfsremote-on
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    46
  $ hg --config extensions.lfs= -R server \
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    47
  >    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
    48
#else
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    49
  $ hg --config extensions.lfs=! -R server \
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    50
  >    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
    51
#endif
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    52
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    53
  $ cat hg.pid >> $DAEMON_PIDS
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    54
  $ hg clone -q http://localhost:$HGPORT client
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    55
  $ grep 'lfs' client/.hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    56
  [1]
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
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    59
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
    60
non-lfs content, and the extension enabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    61
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    62
  $ cd client
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    63
  $ echo 'non-lfs' > nonlfs.txt
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    64
  $ hg ci -Aqm 'non-lfs'
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    65
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    66
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    67
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    68
#if lfsremote-on
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    69
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    70
  $ hg push -q
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    71
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    72
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    73
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    74
  $ 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
    75
  $ grep 'lfs' $TESTTMP/client1_clone/.hg/requires $SERVER_REQUIRES
35505
2526579a30e0 lfs: allow non-lfs exchanges when the extension is only enabled on one side
Matt Harbison <matt_harbison@yahoo.com>
parents: 35504
diff changeset
    76
  [1]
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    77
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    78
  $ hg init $TESTTMP/client1_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    79
  $ 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
    80
  $ 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
    81
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    82
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    83
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    84
  d437e1d24fbd
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    85
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    86
#endif
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    87
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    88
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    89
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
    90
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
    91
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    92
  $ cat >> $HGRCPATH <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    93
  > [extensions]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    94
  > lfs =
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    95
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    96
  $ echo 'non-lfs' > nonlfs2.txt
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    97
  $ 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
    98
35505
2526579a30e0 lfs: allow non-lfs exchanges when the extension is only enabled on one side
Matt Harbison <matt_harbison@yahoo.com>
parents: 35504
diff changeset
    99
Since no lfs content has been added yet, the push is allowed, even when the
2526579a30e0 lfs: allow non-lfs exchanges when the extension is only enabled on one side
Matt Harbison <matt_harbison@yahoo.com>
parents: 35504
diff changeset
   100
extension is not enabled remotely.
2526579a30e0 lfs: allow non-lfs exchanges when the extension is only enabled on one side
Matt Harbison <matt_harbison@yahoo.com>
parents: 35504
diff changeset
   101
2526579a30e0 lfs: allow non-lfs exchanges when the extension is only enabled on one side
Matt Harbison <matt_harbison@yahoo.com>
parents: 35504
diff changeset
   102
  $ hg push -q
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   103
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   104
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   105
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   106
  $ 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
   107
  $ 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
   108
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   109
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   110
  $ hg init $TESTTMP/client2_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   111
  $ 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
   112
  $ 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
   113
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   114
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   115
  $ hg identify http://localhost:$HGPORT
35505
2526579a30e0 lfs: allow non-lfs exchanges when the extension is only enabled on one side
Matt Harbison <matt_harbison@yahoo.com>
parents: 35504
diff changeset
   116
  1477875038c6
35503
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
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   119
Case #3: client with lfs content and the extension enabled; server with
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   120
non-lfs content, and the extension state controlled by #testcases.  The server
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   121
should have an 'lfs' requirement after it picks up its first commit with a blob.
35503
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
  $ 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
   124
  $ hg ci -Aqm 'lfs'
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   125
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   126
  .hg/requires:lfs
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   127
35506
fa865878a849 lfs: show a friendly message when pushing lfs to a server without lfs enabled
Matt Harbison <matt_harbison@yahoo.com>
parents: 35505
diff changeset
   128
#if lfsremote-off
fa865878a849 lfs: show a friendly message when pushing lfs to a server without lfs enabled
Matt Harbison <matt_harbison@yahoo.com>
parents: 35505
diff changeset
   129
  $ hg push -q
fa865878a849 lfs: show a friendly message when pushing lfs to a server without lfs enabled
Matt Harbison <matt_harbison@yahoo.com>
parents: 35505
diff changeset
   130
  abort: required features are not supported in the destination: lfs
fa865878a849 lfs: show a friendly message when pushing lfs to a server without lfs enabled
Matt Harbison <matt_harbison@yahoo.com>
parents: 35505
diff changeset
   131
  (enable the lfs extension on the server)
fa865878a849 lfs: show a friendly message when pushing lfs to a server without lfs enabled
Matt Harbison <matt_harbison@yahoo.com>
parents: 35505
diff changeset
   132
  [255]
fa865878a849 lfs: show a friendly message when pushing lfs to a server without lfs enabled
Matt Harbison <matt_harbison@yahoo.com>
parents: 35505
diff changeset
   133
#else
fa865878a849 lfs: show a friendly message when pushing lfs to a server without lfs enabled
Matt Harbison <matt_harbison@yahoo.com>
parents: 35505
diff changeset
   134
  $ hg push -q
fa865878a849 lfs: show a friendly message when pushing lfs to a server without lfs enabled
Matt Harbison <matt_harbison@yahoo.com>
parents: 35505
diff changeset
   135
#endif
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   136
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   137
  .hg/requires:lfs
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   138
  $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   139
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   140
  $ hg clone -q http://localhost:$HGPORT $TESTTMP/client3_clone
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   141
  $ grep 'lfs' $TESTTMP/client3_clone/.hg/requires $SERVER_REQUIRES || true
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   142
  $TESTTMP/client3_clone/.hg/requires:lfs (lfsremote-on !)
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   143
  $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   144
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   145
  $ hg init $TESTTMP/client3_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   146
  $ hg -R $TESTTMP/client3_pull pull -q http://localhost:$HGPORT
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   147
  $ grep 'lfs' $TESTTMP/client3_pull/.hg/requires $SERVER_REQUIRES || true
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   148
  $TESTTMP/client3_pull/.hg/requires:lfs (lfsremote-on !)
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   149
  $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   150
35505
2526579a30e0 lfs: allow non-lfs exchanges when the extension is only enabled on one side
Matt Harbison <matt_harbison@yahoo.com>
parents: 35504
diff changeset
   151
The difference here is the push failed above when the extension isn't
2526579a30e0 lfs: allow non-lfs exchanges when the extension is only enabled on one side
Matt Harbison <matt_harbison@yahoo.com>
parents: 35504
diff changeset
   152
enabled on the server.
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   153
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   154
  8374dc4052cb (lfsremote-on !)
35505
2526579a30e0 lfs: allow non-lfs exchanges when the extension is only enabled on one side
Matt Harbison <matt_harbison@yahoo.com>
parents: 35504
diff changeset
   155
  1477875038c6 (lfsremote-off !)
35503
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
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
   158
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
   159
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   160
#if lfsremote-on
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   161
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   162
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   163
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
   164
lfs content, and the extension enabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   165
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   166
  $ cat >> $HGRCPATH <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   167
  > [extensions]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   168
  > lfs = !
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   169
  > EOF
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
  $ hg init $TESTTMP/client4
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   172
  $ cd $TESTTMP/client4
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   173
  $ cat >> .hg/hgrc <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   174
  > [paths]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   175
  > default = http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   176
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   177
  $ echo 'non-lfs' > nonlfs2.txt
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   178
  $ hg ci -Aqm 'non-lfs'
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   179
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   180
  $TESTTMP/server/.hg/requires:lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   181
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   182
  $ hg push -q --force
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   183
  warning: repository is unrelated
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   184
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   185
  $TESTTMP/server/.hg/requires:lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   186
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   187
TODO: fail more gracefully.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   188
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   189
  $ 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
   190
  abort: HTTP Error 500: Internal Server Error
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   191
  [255]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   192
  $ 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
   193
  grep: $TESTTMP/client4_clone/.hg/requires: $ENOENT$
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   194
  $TESTTMP/server/.hg/requires:lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   195
  [2]
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
TODO: fail more gracefully.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   198
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   199
  $ hg init $TESTTMP/client4_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   200
  $ 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
   201
  abort: HTTP Error 500: Internal Server Error
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   202
  [255]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   203
  $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   204
  $TESTTMP/server/.hg/requires:lfs
35503
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 identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   207
  03b080fa9d93
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   208
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   209
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   210
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
   211
lfs content, and the extension enabled.
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
  $ cat >> $HGRCPATH <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   214
  > [extensions]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   215
  > lfs =
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   216
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   217
  $ echo 'non-lfs' > nonlfs3.txt
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   218
  $ 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
   219
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   220
  $ hg push -q
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   221
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   222
  $TESTTMP/server/.hg/requires:lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   223
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   224
  $ 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
   225
  $ grep 'lfs' $TESTTMP/client5_clone/.hg/requires $SERVER_REQUIRES
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   226
  $TESTTMP/client5_clone/.hg/requires:lfs
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   227
  $TESTTMP/server/.hg/requires:lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   228
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   229
  $ hg init $TESTTMP/client5_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   230
  $ 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
   231
  $ grep 'lfs' $TESTTMP/client5_pull/.hg/requires $SERVER_REQUIRES
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   232
  $TESTTMP/client5_pull/.hg/requires:lfs
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   233
  $TESTTMP/server/.hg/requires:lfs
35503
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 identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   236
  c729025cc5e3
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   237
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   238
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   239
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
   240
lfs content, and the extension enabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   241
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   242
  $ 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
   243
  $ 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
   244
37564
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   245
  $ hg --config paths.default= push -v http://localhost:$HGPORT
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   246
  pushing to http://localhost:$HGPORT/
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   247
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   248
  searching for changes
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   249
  remote has heads on branch 'default' that are not known locally: 8374dc4052cb
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   250
  lfs: uploading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   251
  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   252
  lfs: uploaded 1 files (25 bytes)
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   253
  1 changesets found
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   254
  uncompressed size of bundle content:
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   255
       206 (changelog)
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   256
       172 (manifests)
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   257
       275  lfs2.txt
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   258
  remote: adding changesets
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   259
  remote: adding manifests
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   260
  remote: adding file changes
31a4ea773369 lfs: infer the blob store URL from an explicit push dest or default-push
Matt Harbison <matt_harbison@yahoo.com>
parents: 37563
diff changeset
   261
  remote: added 1 changesets with 1 changes to 1 files
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   262
  $ grep 'lfs' .hg/requires $SERVER_REQUIRES
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   263
  .hg/requires:lfs
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   264
  $TESTTMP/server/.hg/requires:lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   265
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   266
  $ 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
   267
  $ grep 'lfs' $TESTTMP/client6_clone/.hg/requires $SERVER_REQUIRES
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   268
  $TESTTMP/client6_clone/.hg/requires:lfs
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   269
  $TESTTMP/server/.hg/requires:lfs
35503
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 init $TESTTMP/client6_pull
37563
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   272
  $ hg -R $TESTTMP/client6_pull pull -u -v http://localhost:$HGPORT
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   273
  pulling from http://localhost:$HGPORT/
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   274
  requesting all changes
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   275
  adding changesets
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   276
  adding manifests
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   277
  adding file changes
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   278
  added 6 changesets with 5 changes to 5 files (+1 heads)
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   279
  calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   280
  new changesets d437e1d24fbd:d3b84d50eacb
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   281
  resolving manifests
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   282
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   283
  lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   284
  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
37765
ab04972a33ef lfs: enable the final download count status message
Matt Harbison <matt_harbison@yahoo.com>
parents: 37764
diff changeset
   285
  lfs: downloaded 1 files (25 bytes)
37563
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   286
  getting lfs2.txt
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   287
  lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   288
  getting nonlfs2.txt
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   289
  getting nonlfs3.txt
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   290
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   291
  updated to "d3b84d50eacb: lfs file with lfs client"
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   292
  1 other heads for branch "default"
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   293
  $ grep 'lfs' $TESTTMP/client6_pull/.hg/requires $SERVER_REQUIRES
35504
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   294
  $TESTTMP/client6_pull/.hg/requires:lfs
6bb940de4c4c lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35503
diff changeset
   295
  $TESTTMP/server/.hg/requires:lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   296
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   297
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   298
  d3b84d50eacb
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   299
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   300
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   301
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
   302
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   303
  $ hg --config extensions.lfs=! summary
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   304
  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
   305
  (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
   306
  [255]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   307
37763
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   308
  $ echo 'this is an lfs file' > $TESTTMP/client6_clone/lfspair1.bin
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   309
  $ echo 'this is an lfs file too' > $TESTTMP/client6_clone/lfspair2.bin
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   310
  $ hg -R $TESTTMP/client6_clone ci -Aqm 'add lfs pair'
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   311
  $ hg -R $TESTTMP/client6_clone push -q
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   312
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   313
  $ hg clone -qU http://localhost:$HGPORT $TESTTMP/bulkfetch
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   314
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   315
Export will prefetch all needed files across all needed revisions
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   316
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   317
  $ hg -R $TESTTMP/bulkfetch -v export -r 0:tip -o all.export
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   318
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   319
  exporting patches:
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   320
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   321
  lfs: need to transfer 4 objects (92 bytes)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   322
  lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   323
  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   324
  lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   325
  lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   326
  lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   327
  lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   328
  lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   329
  lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
37765
ab04972a33ef lfs: enable the final download count status message
Matt Harbison <matt_harbison@yahoo.com>
parents: 37764
diff changeset
   330
  lfs: downloaded 4 files (92 bytes)
37763
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   331
  all.export
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   332
  lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   333
  lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   334
  lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   335
  lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   336
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   337
Export with selected files is used with `extdiff --patch`
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   338
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   339
  $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   340
  $ hg --config extensions.extdiff= \
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   341
  >    -R $TESTTMP/bulkfetch -v extdiff -r 2:tip --patch $TESTTMP/bulkfetch/lfs.bin
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   342
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   343
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   344
  lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   345
  lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
37765
ab04972a33ef lfs: enable the final download count status message
Matt Harbison <matt_harbison@yahoo.com>
parents: 37764
diff changeset
   346
  lfs: downloaded 1 files (23 bytes)
37763
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   347
  */hg-8374dc4052cb.patch (glob)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   348
  lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   349
  */hg-9640b57e77b1.patch (glob)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   350
  --- */hg-8374dc4052cb.patch	* (glob)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   351
  +++ */hg-9640b57e77b1.patch	* (glob)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   352
  @@ -2,12 +2,7 @@
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   353
   # User test
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   354
   # Date 0 0
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   355
   #      Thu Jan 01 00:00:00 1970 +0000
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   356
  -# Node ID 8374dc4052cbd388e79d9dc4ddb29784097aa354
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   357
  -# Parent  1477875038c60152e391238920a16381c627b487
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   358
  -lfs
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   359
  +# Node ID 9640b57e77b14c3a0144fb4478b6cc13e13ea0d1
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   360
  +# Parent  d3b84d50eacbd56638e11abce6b8616aaba54420
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   361
  +add lfs pair
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   362
   
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   363
  -diff -r 1477875038c6 -r 8374dc4052cb lfs.bin
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   364
  ---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   365
  -+++ b/lfs.bin	Thu Jan 01 00:00:00 1970 +0000
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   366
  -@@ -0,0 +1,1 @@
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   367
  -+this is a big lfs file
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   368
  cleaning up temp directory
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   369
  [1]
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   370
37764
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   371
Diff will prefetch files
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   372
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   373
  $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   374
  $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   375
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   376
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   377
  lfs: need to transfer 4 objects (92 bytes)
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   378
  lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   379
  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   380
  lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   381
  lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   382
  lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   383
  lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   384
  lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   385
  lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
37765
ab04972a33ef lfs: enable the final download count status message
Matt Harbison <matt_harbison@yahoo.com>
parents: 37764
diff changeset
   386
  lfs: downloaded 4 files (92 bytes)
37764
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   387
  lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   388
  lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   389
  lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   390
  lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   391
  diff -r 8374dc4052cb -r 9640b57e77b1 lfs.bin
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   392
  --- a/lfs.bin	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   393
  +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   394
  @@ -1,1 +0,0 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   395
  -this is a big lfs file
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   396
  diff -r 8374dc4052cb -r 9640b57e77b1 lfs2.txt
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   397
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   398
  +++ b/lfs2.txt	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   399
  @@ -0,0 +1,1 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   400
  +this is another lfs file
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   401
  diff -r 8374dc4052cb -r 9640b57e77b1 lfspair1.bin
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   402
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   403
  +++ b/lfspair1.bin	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   404
  @@ -0,0 +1,1 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   405
  +this is an lfs file
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   406
  diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   407
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   408
  +++ b/lfspair2.bin	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   409
  @@ -0,0 +1,1 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   410
  +this is an lfs file too
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   411
  diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs.txt
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   412
  --- a/nonlfs.txt	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   413
  +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   414
  @@ -1,1 +0,0 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   415
  -non-lfs
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   416
  diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs3.txt
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   417
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   418
  +++ b/nonlfs3.txt	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   419
  @@ -0,0 +1,1 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   420
  +non-lfs
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   421
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   422
Only the files required by diff are prefetched
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   423
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   424
  $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   425
  $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip $TESTTMP/bulkfetch/lfspair2.bin
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   426
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   427
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   428
  lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   429
  lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
37765
ab04972a33ef lfs: enable the final download count status message
Matt Harbison <matt_harbison@yahoo.com>
parents: 37764
diff changeset
   430
  lfs: downloaded 1 files (24 bytes)
37764
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   431
  lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   432
  diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   433
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   434
  +++ b/lfspair2.bin	Thu Jan 01 00:00:00 1970 +0000
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   435
  @@ -0,0 +1,1 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   436
  +this is an lfs file too
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   437
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   438
#endif
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   439
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   440
  $ $PYTHON $TESTDIR/killdaemons.py $DAEMON_PIDS
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   441
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   442
#if lfsremote-on
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   443
  $ cat $TESTTMP/errors.log | grep '^[A-Z]'
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   444
  Traceback (most recent call last):
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   445
  ValueError: no common changegroup version
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   446
  Traceback (most recent call last):
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   447
  ValueError: no common changegroup version
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   448
#else
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   449
  $ cat $TESTTMP/errors.log
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   450
#endif