tests/test-lfs-serve.t
author Sandu Turcan <idlsoft@gmail.com>
Tue, 03 May 2022 21:44:30 -0400
branchstable
changeset 49241 6b10151b9621
parent 48657 68b7faeb6ef3
child 48879 9987d14ad63f
permissions -rw-r--r--
narrow_widen_acl: enforce narrowacl in narrow_widen (SEC) Reviewer note: this was sent by the author as a simple bugfix, but can be considered a security patch, since it allows users to access things outside of the ACL, hence the (SEC) prefix. However, this affects the `narrow` extention which is still marked as experimental and has relatively few users aside from large companies with their own security layers on top from what we can gather. We feel (Alphare: or at least, I feel) like pinging the packaging list is enough in this case.
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
38021
538e850ae737 tests: mark tests that fail when using chg as #require no-chg
Kyle Lippincott <spectral@google.com>
parents: 37765
diff changeset
     2
#require serve no-reposimplestore no-chg
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
38178
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    26
make command server magic visible
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    27
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    28
#if windows
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    29
  $ PYTHONPATH="$TESTDIR/../contrib;$PYTHONPATH"
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    30
#else
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    31
  $ PYTHONPATH="$TESTDIR/../contrib:$PYTHONPATH"
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    32
#endif
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    33
  $ export PYTHONPATH
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    34
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    35
  $ hg init server
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    36
  $ SERVER_REQUIRES="$TESTTMP/server/.hg/requires"
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
    37
  $ SERVER_PATH="$TESTTMP/server/"
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    38
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    39
  $ cat > $TESTTMP/debugprocessors.py <<EOF
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    40
  > from mercurial import (
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    41
  >     cmdutil,
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    42
  >     commands,
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    43
  >     pycompat,
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    44
  >     registrar,
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    45
  > )
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    46
  > cmdtable = {}
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    47
  > command = registrar.command(cmdtable)
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    48
  > @command(b'debugprocessors', [], b'FILE')
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    49
  > def debugprocessors(ui, repo, file_=None, **opts):
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    50
  >     opts = pycompat.byteskwargs(opts)
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    51
  >     opts[b'changelog'] = False
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    52
  >     opts[b'manifest'] = False
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    53
  >     opts[b'dir'] = False
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    54
  >     rl = cmdutil.openrevlog(repo, b'debugprocessors', file_, opts)
41357
dafd13c7237b py3: use dict.items() instead of dict.iteritems() in tests/test-lfs-server.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41356
diff changeset
    55
  >     for flag, proc in rl._flagprocessors.items():
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    56
  >         ui.status(b"registered processor '%#x'\n" % (flag))
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    57
  > EOF
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    58
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    59
Skip the experimental.changegroup3=True config.  Failure to agree on this comes
41704
3b0ba4575c8c exchange: raise error.Abort instead of ValueError
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41703
diff changeset
    60
first, and causes an "abort: no common changegroup version" if the extension is
3b0ba4575c8c exchange: raise error.Abort instead of ValueError
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41703
diff changeset
    61
only loaded on one side. If that *is* enabled, the subsequent failure is "abort:
3b0ba4575c8c exchange: raise error.Abort instead of ValueError
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41703
diff changeset
    62
missing processor for flag '0x2000'!" if the extension is only loaded on one side
3b0ba4575c8c exchange: raise error.Abort instead of ValueError
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41703
diff changeset
    63
(possibly also masked by the Internal Server Error message).
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    64
  $ cat >> $HGRCPATH <<EOF
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    65
  > [extensions]
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    66
  > debugprocessors = $TESTTMP/debugprocessors.py
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
    67
  > [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
    68
  > lfs.disableusercache = True
44274
87167caa2989 lfs: enable workers by default
Matt Harbison <matt_harbison@yahoo.com>
parents: 43138
diff changeset
    69
  > lfs.worker-enable = False
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    70
  > [lfs]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    71
  > threshold=10
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    72
  > [web]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    73
  > allow_push=*
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    74
  > push_ssl=False
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    75
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    76
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    77
  $ cp $HGRCPATH $HGRCPATH.orig
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
    78
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    79
#if lfsremote-on
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    80
  $ hg --config extensions.lfs= -R server \
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    81
  >    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
    82
#else
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    83
  $ hg --config extensions.lfs=! -R server \
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    84
  >    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
    85
#endif
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    86
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    87
  $ cat hg.pid >> $DAEMON_PIDS
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    88
  $ hg clone -q http://localhost:$HGPORT client
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
    89
  $ hg debugrequires -R client | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
    90
  [1]
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
    91
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs'
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    92
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
    93
38178
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    94
This trivial repo will force commandserver to load the extension, but not call
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    95
reposetup() on another repo actually being operated on.  This gives coverage
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    96
that wrapper functions are not assuming reposetup() was called.
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    97
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    98
  $ hg init $TESTTMP/cmdservelfs
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
    99
  $ cat >> $TESTTMP/cmdservelfs/.hg/hgrc << EOF
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   100
  > [extensions]
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   101
  > lfs =
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   102
  > EOF
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   103
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   104
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   105
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
   106
non-lfs content, and the extension enabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   107
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   108
  $ cd client
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   109
  $ echo 'non-lfs' > nonlfs.txt
38178
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   110
  >>> from __future__ import absolute_import
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   111
  >>> from hgclient import check, readchannel, runcommand
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   112
  >>> @check
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   113
  ... def diff(server):
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   114
  ...     readchannel(server)
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   115
  ...     # run an arbitrary command in the repo with the extension loaded
41356
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   116
  ...     runcommand(server, [b'id', b'-R', b'../cmdservelfs'])
38178
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   117
  ...     # now run a command in a repo without the extension to ensure that
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   118
  ...     # files are added safely..
41356
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   119
  ...     runcommand(server, [b'ci', b'-Aqm', b'non-lfs'])
38178
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   120
  ...     # .. and that scmutil.prefetchfiles() safely no-ops..
41356
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   121
  ...     runcommand(server, [b'diff', b'-r', b'.~1'])
38178
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   122
  ...     # .. and that debugupgraderepo safely no-ops.
41356
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   123
  ...     runcommand(server, [b'debugupgraderepo', b'-q', b'--run'])
38178
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   124
  *** runcommand id -R ../cmdservelfs
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   125
  000000000000 tip
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   126
  *** runcommand ci -Aqm non-lfs
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   127
  *** runcommand diff -r .~1
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   128
  diff -r 000000000000 nonlfs.txt
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   129
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   130
  +++ b/nonlfs.txt	Thu Jan 01 00:00:00 1970 +0000
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   131
  @@ -0,0 +1,1 @@
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   132
  +non-lfs
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   133
  *** runcommand debugupgraderepo -q --run
3790efb388ca lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902)
Matt Harbison <matt_harbison@yahoo.com>
parents: 37765
diff changeset
   134
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   135
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs'
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   136
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   137
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   138
#if lfsremote-on
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 push -q
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   141
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs'
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   142
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   143
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   144
  $ hg clone -q http://localhost:$HGPORT $TESTTMP/client1_clone
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   145
  $ hg debugrequires -R $TESTTMP/client1_clone/ | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   146
  [1]
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   147
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs'
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
   148
  [1]
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   149
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   150
  $ hg init $TESTTMP/client1_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   151
  $ hg -R $TESTTMP/client1_pull pull -q http://localhost:$HGPORT
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   152
  $ hg debugrequires -R $TESTTMP/client1_pull/ | grep 'lfs'
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   153
  [1]
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   154
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   155
  [1]
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   156
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   157
  d437e1d24fbd
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   158
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   159
#endif
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   160
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
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
   163
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
   164
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   165
  $ cat >> $HGRCPATH <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   166
  > [extensions]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   167
  > lfs =
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   168
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   169
  $ echo 'non-lfs' > nonlfs2.txt
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   170
  $ 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
   171
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
   172
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
   173
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
   174
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
   175
  $ hg push -q
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   176
  $ hg debugrequires | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   177
  [1]
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   178
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs'
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   179
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   180
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   181
  $ hg clone -q http://localhost:$HGPORT $TESTTMP/client2_clone
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   182
  $ hg debugrequires -R $TESTTMP/client2_clone/ | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   183
  [1]
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   184
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs'
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   185
  [1]
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
  $ hg init $TESTTMP/client2_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   188
  $ hg -R $TESTTMP/client2_pull pull -q http://localhost:$HGPORT
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   189
  $ hg debugrequires -R $TESTTMP/client2_pull/ | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   190
  [1]
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   191
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs'
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   192
  [1]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   193
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   194
  $ 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
   195
  1477875038c6
35503
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
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   198
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
   199
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
   200
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
   201
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   202
  $ 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
   203
  $ hg ci -Aqm 'lfs'
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   204
  $ hg debugrequires | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   205
  lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   206
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   207
  [1]
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   208
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
   209
#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
   210
  $ 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
   211
  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
   212
  (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
   213
  [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
   214
#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
   215
  $ 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
   216
#endif
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   217
  $ hg debugrequires | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   218
  lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   219
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs' || true
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   220
  lfs (lfsremote-on !)
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   221
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   222
  $ hg clone -q http://localhost:$HGPORT $TESTTMP/client3_clone
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   223
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   224
  $ hg debugrequires -R $TESTTMP/client3_clone/ | grep 'lfs' || true
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   225
  lfs (lfsremote-on !)
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   226
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs' || true
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   227
  lfs (lfsremote-on !)
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/client3_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   230
  $ hg -R $TESTTMP/client3_pull pull -q http://localhost:$HGPORT
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   231
  $ hg debugrequires -R $TESTTMP/client3_pull/ | grep 'lfs' || true
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   232
  lfs (lfsremote-on !)
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   233
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs' || true
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   234
  lfs (lfsremote-on !)
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   235
40131
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   236
Test that the commit/changegroup requirement check hook can be run multiple
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   237
times.
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   238
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   239
  $ hg clone -qr 0 http://localhost:$HGPORT $TESTTMP/cmdserve_client3
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   240
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   241
  $ cd ../cmdserve_client3
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   242
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   243
  >>> from __future__ import absolute_import
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   244
  >>> from hgclient import check, readchannel, runcommand
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   245
  >>> @check
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   246
  ... def addrequirement(server):
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   247
  ...     readchannel(server)
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   248
  ...     # change the repo in a way that adds the lfs requirement
41356
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   249
  ...     runcommand(server, [b'pull', b'-qu'])
40131
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   250
  ...     # Now cause the requirement adding hook to fire again, without going
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   251
  ...     # through reposetup() again.
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   252
  ...     with open('file.txt', 'wb') as fp:
41356
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   253
  ...         fp.write(b'data')
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   254
  ...     runcommand(server, [b'ci', b'-Aqm', b'non-lfs'])
40131
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   255
  *** runcommand pull -qu
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   256
  *** runcommand ci -Aqm non-lfs
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   257
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   258
  $ cd ../client
535fc8a22365 lfs: avoid a potential variable reference before assignment error in cmdserver
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   259
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
   260
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
   261
enabled on the server.
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   262
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   263
  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
   264
  1477875038c6 (lfsremote-off !)
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
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
   267
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
   268
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   269
#if lfsremote-on
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
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   272
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
   273
lfs content, and the extension enabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   274
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   275
  $ cat >> $HGRCPATH <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   276
  > [extensions]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   277
  > lfs = !
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   278
  > EOF
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
  $ hg init $TESTTMP/client4
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   281
  $ cd $TESTTMP/client4
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   282
  $ cat >> .hg/hgrc <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   283
  > [paths]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   284
  > default = http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   285
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   286
  $ echo 'non-lfs' > nonlfs2.txt
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   287
  $ hg ci -Aqm 'non-lfs'
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   288
  $ hg debugrequires -R $SERVER_PATH --config extensions.lfs= | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   289
  lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   290
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   291
  $ hg push -q --force
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   292
  warning: repository is unrelated
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   293
  $ hg debugrequires -R $SERVER_PATH --config extensions.lfs= | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   294
  lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   295
40324
6637b079ae45 lfs: autoload the extension when cloning from repo with lfs enabled
Matt Harbison <matt_harbison@yahoo.com>
parents: 40313
diff changeset
   296
  $ hg clone http://localhost:$HGPORT $TESTTMP/client4_clone
6637b079ae45 lfs: autoload the extension when cloning from repo with lfs enabled
Matt Harbison <matt_harbison@yahoo.com>
parents: 40313
diff changeset
   297
  (remote is using large file support (lfs), but it is explicitly disabled in the local configuration)
45906
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45671
diff changeset
   298
  abort: repository requires features unknown to this Mercurial: lfs
40324
6637b079ae45 lfs: autoload the extension when cloning from repo with lfs enabled
Matt Harbison <matt_harbison@yahoo.com>
parents: 40313
diff changeset
   299
  (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   300
  [255]
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   301
  $ hg debugrequires -R $TESTTMP/client4_clone/ | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   302
  abort: repository $TESTTMP/client4_clone/ not found
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   303
  [1]
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   304
  $ hg debugrequires -R $SERVER_PATH --config extensions.lfs= | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   305
  lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   306
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   307
TODO: fail more gracefully.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   308
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   309
  $ hg init $TESTTMP/client4_pull
41703
47c4ac5035a6 tests: remove -q from test-lfs-serve.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41433
diff changeset
   310
  $ hg -R $TESTTMP/client4_pull pull http://localhost:$HGPORT
47c4ac5035a6 tests: remove -q from test-lfs-serve.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41433
diff changeset
   311
  pulling from http://localhost:$HGPORT/
47c4ac5035a6 tests: remove -q from test-lfs-serve.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41433
diff changeset
   312
  requesting all changes
41704
3b0ba4575c8c exchange: raise error.Abort instead of ValueError
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41703
diff changeset
   313
  remote: abort: no common changegroup version
3b0ba4575c8c exchange: raise error.Abort instead of ValueError
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41703
diff changeset
   314
  abort: pull failed on remote
46977
3f87d2af0bd6 errors: raise RemoteError in some places in exchange.py
Martin von Zweigbergk <martinvonz@google.com>
parents: 46674
diff changeset
   315
  [100]
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   316
  $ hg debugrequires -R $TESTTMP/client4_pull/ | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   317
  [1]
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   318
  $ hg debugrequires -R $SERVER_PATH --config extensions.lfs= | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   319
  lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   320
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   321
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   322
  03b080fa9d93
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   323
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   324
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   325
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
   326
lfs content, and the extension enabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   327
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   328
  $ cat >> $HGRCPATH <<EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   329
  > [extensions]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   330
  > lfs =
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   331
  > EOF
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   332
  $ echo 'non-lfs' > nonlfs3.txt
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   333
  $ 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
   334
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   335
  $ hg push -q
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   336
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   337
  lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   338
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   339
  $ hg clone -q http://localhost:$HGPORT $TESTTMP/client5_clone
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   340
  $ hg debugrequires -R $TESTTMP/client5_clone/ | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   341
  lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   342
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   343
  lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   344
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   345
  $ hg init $TESTTMP/client5_pull
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   346
  $ hg -R $TESTTMP/client5_pull pull -q http://localhost:$HGPORT
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   347
  $ hg debugrequires -R $TESTTMP/client5_pull/ | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   348
  lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   349
  $ hg debugrequires -R $SERVER_PATH | grep 'lfs'
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   350
  lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   351
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   352
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   353
  c729025cc5e3
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   354
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   355
  $ mv $HGRCPATH $HGRCPATH.tmp
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   356
  $ cp $HGRCPATH.orig $HGRCPATH
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   357
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   358
  >>> from __future__ import absolute_import
41433
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   359
  >>> from hgclient import bprint, check, readchannel, runcommand, stdout
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   360
  >>> @check
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   361
  ... def checkflags(server):
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   362
  ...     readchannel(server)
41433
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   363
  ...     bprint(b'')
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   364
  ...     bprint(b'# LFS required- both lfs and non-lfs revlogs have 0x2000 flag')
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   365
  ...     stdout.flush()
41356
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   366
  ...     runcommand(server, [b'debugprocessors', b'lfs.bin', b'-R',
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   367
  ...                b'../server'])
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   368
  ...     runcommand(server, [b'debugprocessors', b'nonlfs2.txt', b'-R',
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   369
  ...                b'../server'])
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   370
  ...     runcommand(server, [b'config', b'extensions', b'--cwd',
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   371
  ...                b'../server'])
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   372
  ... 
41433
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   373
  ...     bprint(b"\n# LFS not enabled- revlogs don't have 0x2000 flag")
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   374
  ...     stdout.flush()
41356
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   375
  ...     runcommand(server, [b'debugprocessors', b'nonlfs3.txt'])
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   376
  ...     runcommand(server, [b'config', b'extensions'])
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   377
  
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   378
  # LFS required- both lfs and non-lfs revlogs have 0x2000 flag
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   379
  *** runcommand debugprocessors lfs.bin -R ../server
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   380
  registered processor '0x8000'
47077
119790e1c67c cg4: introduce protocol flag to signify the presence of sidedata
Raphaël Gomès <rgomes@octobus.net>
parents: 46977
diff changeset
   381
  registered processor '0x1000'
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   382
  registered processor '0x2000'
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   383
  *** runcommand debugprocessors nonlfs2.txt -R ../server
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   384
  registered processor '0x8000'
47077
119790e1c67c cg4: introduce protocol flag to signify the presence of sidedata
Raphaël Gomès <rgomes@octobus.net>
parents: 46977
diff changeset
   385
  registered processor '0x1000'
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   386
  registered processor '0x2000'
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   387
  *** runcommand config extensions --cwd ../server
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   388
  extensions.debugprocessors=$TESTTMP/debugprocessors.py
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   389
  extensions.lfs=
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   390
  
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   391
  # LFS not enabled- revlogs don't have 0x2000 flag
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   392
  *** runcommand debugprocessors nonlfs3.txt
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   393
  registered processor '0x8000'
47077
119790e1c67c cg4: introduce protocol flag to signify the presence of sidedata
Raphaël Gomès <rgomes@octobus.net>
parents: 46977
diff changeset
   394
  registered processor '0x1000'
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   395
  *** runcommand config extensions
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   396
  extensions.debugprocessors=$TESTTMP/debugprocessors.py
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   397
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   398
  $ rm $HGRCPATH
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   399
  $ mv $HGRCPATH.tmp $HGRCPATH
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   400
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   401
  $ hg clone $TESTTMP/client $TESTTMP/nonlfs -qr 0 --config extensions.lfs=
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   402
  $ cat >> $TESTTMP/nonlfs/.hg/hgrc <<EOF
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   403
  > [extensions]
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   404
  > lfs = !
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   405
  > EOF
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   406
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   407
  >>> from __future__ import absolute_import, print_function
41433
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   408
  >>> from hgclient import bprint, check, readchannel, runcommand, stdout
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   409
  >>> @check
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   410
  ... def checkflags2(server):
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   411
  ...     readchannel(server)
41433
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   412
  ...     bprint(b'')
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   413
  ...     bprint(b'# LFS enabled- both lfs and non-lfs revlogs have 0x2000 flag')
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   414
  ...     stdout.flush()
41356
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   415
  ...     runcommand(server, [b'debugprocessors', b'lfs.bin', b'-R',
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   416
  ...                b'../server'])
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   417
  ...     runcommand(server, [b'debugprocessors', b'nonlfs2.txt', b'-R',
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   418
  ...                b'../server'])
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   419
  ...     runcommand(server, [b'config', b'extensions', b'--cwd',
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   420
  ...                b'../server'])
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   421
  ... 
41433
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   422
  ...     bprint(b'\n# LFS enabled without requirement- revlogs have 0x2000 flag')
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   423
  ...     stdout.flush()
41356
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   424
  ...     runcommand(server, [b'debugprocessors', b'nonlfs3.txt'])
23c80ce166f1 py3: add b'' prefixes in tests/test-lfs-serve.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40919
diff changeset
   425
  ...     runcommand(server, [b'config', b'extensions'])
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   426
  ... 
41433
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   427
  ...     bprint(b"\n# LFS disabled locally- revlogs don't have 0x2000 flag")
3757a968d63a py3: stabilize the output of lfs commandserver tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41423
diff changeset
   428
  ...     stdout.flush()
41423
2a1bb442593b py3: add b'' and r'' prefixes to LFS tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41357
diff changeset
   429
  ...     runcommand(server, [b'debugprocessors', b'nonlfs.txt', b'-R',
2a1bb442593b py3: add b'' and r'' prefixes to LFS tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41357
diff changeset
   430
  ...                b'../nonlfs'])
2a1bb442593b py3: add b'' and r'' prefixes to LFS tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41357
diff changeset
   431
  ...     runcommand(server, [b'config', b'extensions', b'--cwd',
2a1bb442593b py3: add b'' and r'' prefixes to LFS tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 41357
diff changeset
   432
  ...                b'../nonlfs'])
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   433
  
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   434
  # LFS enabled- both lfs and non-lfs revlogs have 0x2000 flag
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   435
  *** runcommand debugprocessors lfs.bin -R ../server
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   436
  registered processor '0x8000'
47077
119790e1c67c cg4: introduce protocol flag to signify the presence of sidedata
Raphaël Gomès <rgomes@octobus.net>
parents: 46977
diff changeset
   437
  registered processor '0x1000'
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   438
  registered processor '0x2000'
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   439
  *** runcommand debugprocessors nonlfs2.txt -R ../server
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   440
  registered processor '0x8000'
47077
119790e1c67c cg4: introduce protocol flag to signify the presence of sidedata
Raphaël Gomès <rgomes@octobus.net>
parents: 46977
diff changeset
   441
  registered processor '0x1000'
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   442
  registered processor '0x2000'
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   443
  *** runcommand config extensions --cwd ../server
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   444
  extensions.debugprocessors=$TESTTMP/debugprocessors.py
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   445
  extensions.lfs=
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   446
  
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   447
  # LFS enabled without requirement- revlogs have 0x2000 flag
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   448
  *** runcommand debugprocessors nonlfs3.txt
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   449
  registered processor '0x8000'
47077
119790e1c67c cg4: introduce protocol flag to signify the presence of sidedata
Raphaël Gomès <rgomes@octobus.net>
parents: 46977
diff changeset
   450
  registered processor '0x1000'
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   451
  registered processor '0x2000'
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   452
  *** runcommand config extensions
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   453
  extensions.debugprocessors=$TESTTMP/debugprocessors.py
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   454
  extensions.lfs=
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   455
  
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   456
  # LFS disabled locally- revlogs don't have 0x2000 flag
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   457
  *** runcommand debugprocessors nonlfs.txt -R ../nonlfs
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   458
  registered processor '0x8000'
47077
119790e1c67c cg4: introduce protocol flag to signify the presence of sidedata
Raphaël Gomès <rgomes@octobus.net>
parents: 46977
diff changeset
   459
  registered processor '0x1000'
40268
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   460
  *** runcommand config extensions --cwd ../nonlfs
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   461
  extensions.debugprocessors=$TESTTMP/debugprocessors.py
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   462
  extensions.lfs=!
9c4cbbb0fc51 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com>
parents: 40034
diff changeset
   463
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   464
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   465
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
   466
lfs content, and the extension enabled.
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   467
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   468
  $ 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
   469
  $ 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
   470
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
   471
  $ 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
   472
  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
   473
  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
   474
  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
   475
  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
   476
  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
   477
  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
   478
  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
   479
  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
   480
  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
   481
       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
   482
       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
   483
       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
   484
  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
   485
  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
   486
  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
   487
  remote: added 1 changesets with 1 changes to 1 files
46674
79cfe18c20b5 test: update expected output in test-http.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46663
diff changeset
   488
  (sent 8 HTTP requests and * bytes; received * bytes in responses) (glob) (?)
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   489
  $ hg debugrequires | grep lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   490
  lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   491
  $ hg debugrequires -R $SERVER_PATH | grep lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   492
  lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   493
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   494
  $ hg clone -q http://localhost:$HGPORT $TESTTMP/client6_clone
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   495
  $ hg debugrequires -R $TESTTMP/client6_clone/ | grep lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   496
  lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   497
  $ hg debugrequires -R $SERVER_PATH | grep lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   498
  lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   499
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   500
  $ 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
   501
  $ 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
   502
  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
   503
  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
   504
  adding changesets
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   505
  adding manifests
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   506
  adding file changes
42897
d7304434390f changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42478
diff changeset
   507
  calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs
37563
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   508
  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
   509
  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
   510
  resolving manifests
be1cc65bdb1c lfs: infer the blob store URL from an explicit pull source
Matt Harbison <matt_harbison@yahoo.com>
parents: 37562
diff changeset
   511
  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
   512
  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
   513
  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
37765
ab04972a33ef lfs: enable the final download count status message
Matt Harbison <matt_harbison@yahoo.com>
parents: 37764
diff changeset
   514
  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
   515
  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
   516
  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
   517
  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
   518
  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
   519
  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
   520
  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
   521
  1 other heads for branch "default"
40034
393e44324037 httppeer: report http statistics
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39857
diff changeset
   522
  (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
48657
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   523
  $ hg debugrequires -R $TESTTMP/client6_pull/ | grep lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   524
  lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   525
  $ hg debugrequires -R $SERVER_PATH | grep lfs
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47077
diff changeset
   526
  lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   527
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   528
  $ hg identify http://localhost:$HGPORT
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   529
  d3b84d50eacb
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   530
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   531
--------------------------------------------------------------------------------
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   532
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
   533
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   534
  $ hg --config extensions.lfs=! summary
45906
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45671
diff changeset
   535
  abort: repository requires features unknown to this Mercurial: lfs
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   536
  (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
   537
  [255]
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   538
37763
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   539
  $ 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
   540
  $ 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
   541
  $ 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
   542
  $ hg -R $TESTTMP/client6_clone push -q
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   543
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   544
  $ 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
   545
42478
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   546
Cat doesn't prefetch unless data is needed (e.g. '-T {rawdata}' doesn't need it)
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   547
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   548
  $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair1.bin -T '{rawdata}\n{path}\n'
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   549
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   550
  version https://git-lfs.github.com/spec/v1
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   551
  oid sha256:cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   552
  size 20
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   553
  x-is-binary 0
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   554
  
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   555
  lfspair1.bin
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   556
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   557
  $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair1.bin -T json
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   558
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   559
  [lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   560
  lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   561
  lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   562
  lfs: downloaded 1 files (20 bytes)
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   563
  lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   564
  
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   565
   {
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   566
    "data": "this is an lfs file\n",
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   567
    "path": "lfspair1.bin",
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   568
    "rawdata": "version https://git-lfs.github.com/spec/v1\noid sha256:cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782\nsize 20\nx-is-binary 0\n"
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   569
   }
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   570
  ]
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   571
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   572
  $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   573
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   574
  $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair1.bin -T '{data}\n'
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   575
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   576
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   577
  lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   578
  lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   579
  lfs: downloaded 1 files (20 bytes)
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   580
  lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   581
  this is an lfs file
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   582
  
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   583
  $ hg --cwd $TESTTMP/bulkfetch cat -vr tip lfspair2.bin
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   584
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   585
  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   586
  lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   587
  lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   588
  lfs: downloaded 1 files (24 bytes)
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   589
  lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   590
  this is an lfs file too
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   591
37763
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   592
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
   593
42478
561cd02c58ff cat: don't prefetch files unless the output requires it
Matt Harbison <matt_harbison@yahoo.com>
parents: 41704
diff changeset
   594
  $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
37763
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   595
  $ 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
   596
  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
   597
  exporting patches:
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   598
  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
   599
  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
   600
  lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   601
  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   602
  lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   603
  lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   604
  lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   605
  lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   606
  lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   607
  lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
37765
ab04972a33ef lfs: enable the final download count status message
Matt Harbison <matt_harbison@yahoo.com>
parents: 37764
diff changeset
   608
  lfs: downloaded 4 files (92 bytes)
37763
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   609
  all.export
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   610
  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
   611
  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
   612
  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
   613
  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
   614
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   615
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
   616
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   617
  $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   618
  $ hg --config extensions.extdiff= \
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   619
  >    -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
   620
  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
   621
  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
   622
  lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   623
  lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
37765
ab04972a33ef lfs: enable the final download count status message
Matt Harbison <matt_harbison@yahoo.com>
parents: 37764
diff changeset
   624
  lfs: downloaded 1 files (23 bytes)
37763
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   625
  */hg-8374dc4052cb.patch (glob)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   626
  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
   627
  */hg-9640b57e77b1.patch (glob)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   628
  --- */hg-8374dc4052cb.patch	* (glob)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   629
  +++ */hg-9640b57e77b1.patch	* (glob)
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   630
  @@ -2,12 +2,7 @@
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   631
   # User test
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   632
   # Date 0 0
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   633
   #      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
   634
  -# Node ID 8374dc4052cbd388e79d9dc4ddb29784097aa354
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   635
  -# Parent  1477875038c60152e391238920a16381c627b487
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   636
  -lfs
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   637
  +# Node ID 9640b57e77b14c3a0144fb4478b6cc13e13ea0d1
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   638
  +# Parent  d3b84d50eacbd56638e11abce6b8616aaba54420
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   639
  +add lfs pair
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   640
   
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   641
  -diff -r 1477875038c6 -r 8374dc4052cb lfs.bin
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   642
  ---- /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
   643
  -+++ 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
   644
  -@@ -0,0 +1,1 @@
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   645
  -+this is a big lfs file
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   646
  cleaning up temp directory
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   647
  [1]
b54404d66f7e export: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37564
diff changeset
   648
37764
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   649
Diff will prefetch files
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   650
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   651
  $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   652
  $ 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
   653
  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
   654
  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
   655
  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
   656
  lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   657
  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   658
  lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   659
  lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   660
  lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   661
  lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   662
  lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   663
  lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
37765
ab04972a33ef lfs: enable the final download count status message
Matt Harbison <matt_harbison@yahoo.com>
parents: 37764
diff changeset
   664
  lfs: downloaded 4 files (92 bytes)
37764
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   665
  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
   666
  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
   667
  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
   668
  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
   669
  diff -r 8374dc4052cb -r 9640b57e77b1 lfs.bin
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   670
  --- 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
   671
  +++ /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
   672
  @@ -1,1 +0,0 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   673
  -this is a big lfs file
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   674
  diff -r 8374dc4052cb -r 9640b57e77b1 lfs2.txt
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   675
  --- /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
   676
  +++ 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
   677
  @@ -0,0 +1,1 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   678
  +this is another lfs file
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   679
  diff -r 8374dc4052cb -r 9640b57e77b1 lfspair1.bin
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   680
  --- /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
   681
  +++ 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
   682
  @@ -0,0 +1,1 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   683
  +this is an lfs file
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   684
  diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   685
  --- /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
   686
  +++ 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
   687
  @@ -0,0 +1,1 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   688
  +this is an lfs file too
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   689
  diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs.txt
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   690
  --- 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
   691
  +++ /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
   692
  @@ -1,1 +0,0 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   693
  -non-lfs
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   694
  diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs3.txt
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   695
  --- /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
   696
  +++ 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
   697
  @@ -0,0 +1,1 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   698
  +non-lfs
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   699
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   700
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
   701
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   702
  $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   703
  $ 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
   704
  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
   705
  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
   706
  lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   707
  lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
37765
ab04972a33ef lfs: enable the final download count status message
Matt Harbison <matt_harbison@yahoo.com>
parents: 37764
diff changeset
   708
  lfs: downloaded 1 files (24 bytes)
37764
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   709
  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
   710
  diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   711
  --- /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
   712
  +++ 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
   713
  @@ -0,0 +1,1 @@
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   714
  +this is an lfs file too
5e67c20915a7 diff: invoke the file prefetch hook
Matt Harbison <matt_harbison@yahoo.com>
parents: 37763
diff changeset
   715
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   716
#endif
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   717
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 38239
diff changeset
   718
  $ "$PYTHON" $TESTDIR/killdaemons.py $DAEMON_PIDS
35503
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   719
bbcd2e478391 test-lfs: add tests covering http exchanges
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff changeset
   720
  $ cat $TESTTMP/errors.log