tests/test-largefiles-wireproto.t
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 16 Dec 2017 11:32:10 -0500
changeset 35450 991e4404e910
parent 35400 4441705b7111
child 35847 e3c228b4510d
child 36255 1ee1a42bfdae
permissions -rw-r--r--
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution The rule only triggered on non Windows platforms, even though Windows also required an adjustment. Automatic seems better. The aggressive globbing in test-subrepo-svn.t was found and rewritten by the substitution.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23139
e53f6b72a0e4 spelling: fixes from proofreading of spell checker issues
Mads Kiilerich <madski@unity3d.com>
parents: 21424
diff changeset
     1
This file contains testcases that tend to be related to the wire protocol part
e53f6b72a0e4 spelling: fixes from proofreading of spell checker issues
Mads Kiilerich <madski@unity3d.com>
parents: 21424
diff changeset
     2
of largefiles.
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
  $ USERCACHE="$TESTTMP/cache"; export USERCACHE
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
  $ mkdir "${USERCACHE}"
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
  $ cat >> $HGRCPATH <<EOF
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
  > [extensions]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
  > largefiles=
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
  > purge=
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
  > rebase=
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
  > transplant=
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
  > [phases]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
  > publish=False
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
  > [largefiles]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
  > minsize=2
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
  > patterns=glob:**.dat
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
  > usercache=${USERCACHE}
26417
9a466b9f9792 largefiles: restore archiving largefiles with hgweb (issue4859)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25495
diff changeset
    18
  > [web]
9a466b9f9792 largefiles: restore archiving largefiles with hgweb (issue4859)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25495
diff changeset
    19
  > allow_archive = zip
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
  > [hooks]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
  > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
  > EOF
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
#if serve
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
vanilla clients not locked out from largefiles servers on vanilla repos
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
  $ mkdir r1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
  $ cd r1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
  $ hg init
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
  $ echo c1 > f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
  $ hg add f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
  $ hg commit -m "m1"
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  Invoking status precommit hook
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  A f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  $ cd ..
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  $ cat hg.pid >> $DAEMON_PIDS
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  requesting all changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  adding changesets
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  adding manifests
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  adding file changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  added 1 changesets with 1 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33981
diff changeset
    44
  new changesets b6eb3a2e2efe
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  updating to branch default
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
largefiles clients still work with vanilla servers
28549
e01bd7385f4f tests: reorder hg serve commands
Jun Wu <quark@fb.com>
parents: 28463
diff changeset
    49
  $ hg serve --config extensions.largefiles=! -R r1 -d -p $HGPORT1 --pid-file hg.pid
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  $ cat hg.pid >> $DAEMON_PIDS
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  $ hg clone http://localhost:$HGPORT1 r3
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  requesting all changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  adding changesets
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  adding manifests
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  adding file changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  added 1 changesets with 1 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33981
diff changeset
    57
  new changesets b6eb3a2e2efe
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  updating to branch default
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
#endif
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
vanilla clients locked out from largefiles http repos
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  $ mkdir r4
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
  $ cd r4
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  $ hg init
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
  $ echo c1 > f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  $ hg add --large f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  $ hg commit -m "m1"
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  Invoking status precommit hook
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  A f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  $ cd ..
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
largefiles can be pushed locally (issue3583)
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  $ hg init dest
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  $ cd r4
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
  $ hg outgoing ../dest
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  comparing with ../dest
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  searching for changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  changeset:   0:639881c12b4c
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  tag:         tip
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  user:        test
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  date:        Thu Jan 01 00:00:00 1970 +0000
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
  summary:     m1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
  
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
  $ hg push ../dest
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  pushing to ../dest
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  searching for changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  adding changesets
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  adding manifests
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  adding file changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
  added 1 changesets with 1 changes to 1 files
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    92
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    93
exit code with nothing outgoing (issue3611)
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  $ hg outgoing ../dest
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  comparing with ../dest
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  searching for changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  no changes found
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  [1]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  $ cd ..
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
#if serve
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103
  $ cat hg.pid >> $DAEMON_PIDS
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   104
  $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   105
  abort: remote error:
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   107
  This repository uses the largefiles extension.
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   108
  
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   109
  Please enable it in your Mercurial config file.
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   110
  [255]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   111
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   112
used all HGPORTs, kill all daemons
25474
8c14f87bd0ae tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
   113
  $ killdaemons.py
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   114
#endif
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   115
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   116
vanilla clients locked out from largefiles ssh repos
33335
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 33286
diff changeset
   117
  $ hg --config extensions.largefiles=! clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
25243
d65243d28749 sshpeer: break "OutOfBandError" feature for ssh (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25125
diff changeset
   118
  remote: 
d65243d28749 sshpeer: break "OutOfBandError" feature for ssh (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25125
diff changeset
   119
  remote: This repository uses the largefiles extension.
d65243d28749 sshpeer: break "OutOfBandError" feature for ssh (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25125
diff changeset
   120
  remote: 
d65243d28749 sshpeer: break "OutOfBandError" feature for ssh (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25125
diff changeset
   121
  remote: Please enable it in your Mercurial config file.
d65243d28749 sshpeer: break "OutOfBandError" feature for ssh (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25125
diff changeset
   122
  remote: 
d65243d28749 sshpeer: break "OutOfBandError" feature for ssh (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25125
diff changeset
   123
  remote: -
d65243d28749 sshpeer: break "OutOfBandError" feature for ssh (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25125
diff changeset
   124
  abort: remote error
d65243d28749 sshpeer: break "OutOfBandError" feature for ssh (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25125
diff changeset
   125
  (check previous remote output)
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   126
  [255]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   127
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   128
#if serve
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   129
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   130
largefiles clients refuse to push largefiles repos to vanilla servers
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   131
  $ mkdir r6
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   132
  $ cd r6
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   133
  $ hg init
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   134
  $ echo c1 > f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   135
  $ hg add f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   136
  $ hg commit -m "m1"
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   137
  Invoking status precommit hook
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   138
  A f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   139
  $ cat >> .hg/hgrc <<!
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   140
  > [web]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   141
  > push_ssl = false
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   142
  > allow_push = *
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   143
  > !
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   144
  $ cd ..
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   145
  $ hg clone r6 r7
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   146
  updating to branch default
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   147
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   148
  $ cd r7
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   149
  $ echo c2 > f2
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   150
  $ hg add --large f2
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   151
  $ hg commit -m "m2"
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   152
  Invoking status precommit hook
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   153
  A f2
29421
ecbbf4d56ee8 largefiles: check file in the repo store before checking remotely (issue5257)
liscju <piotr.listkiewicz@gmail.com>
parents: 29379
diff changeset
   154
  $ hg verify --large
ecbbf4d56ee8 largefiles: check file in the repo store before checking remotely (issue5257)
liscju <piotr.listkiewicz@gmail.com>
parents: 29379
diff changeset
   155
  checking changesets
ecbbf4d56ee8 largefiles: check file in the repo store before checking remotely (issue5257)
liscju <piotr.listkiewicz@gmail.com>
parents: 29379
diff changeset
   156
  checking manifests
ecbbf4d56ee8 largefiles: check file in the repo store before checking remotely (issue5257)
liscju <piotr.listkiewicz@gmail.com>
parents: 29379
diff changeset
   157
  crosschecking files in changesets and manifests
ecbbf4d56ee8 largefiles: check file in the repo store before checking remotely (issue5257)
liscju <piotr.listkiewicz@gmail.com>
parents: 29379
diff changeset
   158
  checking files
ecbbf4d56ee8 largefiles: check file in the repo store before checking remotely (issue5257)
liscju <piotr.listkiewicz@gmail.com>
parents: 29379
diff changeset
   159
  2 files, 2 changesets, 2 total revisions
ecbbf4d56ee8 largefiles: check file in the repo store before checking remotely (issue5257)
liscju <piotr.listkiewicz@gmail.com>
parents: 29379
diff changeset
   160
  searching 1 changesets for largefiles
ecbbf4d56ee8 largefiles: check file in the repo store before checking remotely (issue5257)
liscju <piotr.listkiewicz@gmail.com>
parents: 29379
diff changeset
   161
  verified existence of 1 revisions of 1 largefiles
28549
e01bd7385f4f tests: reorder hg serve commands
Jun Wu <quark@fb.com>
parents: 28463
diff changeset
   162
  $ hg serve --config extensions.largefiles=! -R ../r6 -d -p $HGPORT --pid-file ../hg.pid
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   163
  $ cat ../hg.pid >> $DAEMON_PIDS
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   164
  $ hg push http://localhost:$HGPORT
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   165
  pushing to http://localhost:$HGPORT/
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   166
  searching for changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   167
  abort: http://localhost:$HGPORT/ does not appear to be a largefile store
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   168
  [255]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   169
  $ cd ..
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   170
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   171
putlfile errors are shown (issue3123)
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   172
Corrupt the cached largefile in r7 and move it out of the servers usercache
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   173
  $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 .
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   174
  $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   175
  $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8"
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   176
  $ hg init empty
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   177
  $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   178
  >   --config 'web.allow_push=*' --config web.push_ssl=False
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   179
  $ cat hg.pid >> $DAEMON_PIDS
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   180
  $ hg push -R r7 http://localhost:$HGPORT1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   181
  pushing to http://localhost:$HGPORT1/
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   182
  searching for changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   183
  remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35173
diff changeset
   184
  abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   185
  [255]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   186
  $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   187
Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   188
  $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   189
  $ hg push -R r7 http://localhost:$HGPORT1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   190
  pushing to http://localhost:$HGPORT1/
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   191
  searching for changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   192
  remote: adding changesets
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   193
  remote: adding manifests
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   194
  remote: adding file changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   195
  remote: added 2 changesets with 2 changes to 2 files
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   196
  $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   197
  server side corruption
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   198
  $ rm -rf empty
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   199
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   200
Push a largefiles repository to a served empty repository
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   201
  $ hg init r8
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   202
  $ echo c3 > r8/f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   203
  $ hg add --large r8/f1 -R r8
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   204
  $ hg commit -m "m1" -R r8
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   205
  Invoking status precommit hook
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   206
  A f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   207
  $ hg init empty
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   208
  $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   209
  >   --config 'web.allow_push=*' --config web.push_ssl=False
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   210
  $ cat hg.pid >> $DAEMON_PIDS
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   211
  $ rm "${USERCACHE}"/*
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   212
  $ hg push -R r8 http://localhost:$HGPORT2/#default
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   213
  pushing to http://localhost:$HGPORT2/
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   214
  searching for changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   215
  remote: adding changesets
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   216
  remote: adding manifests
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   217
  remote: adding file changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   218
  remote: added 1 changesets with 1 changes to 1 files
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   219
  $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   220
  $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   221
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   222
Clone over http, no largefiles pulled on clone.
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   223
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   224
  $ hg clone http://localhost:$HGPORT2/#default http-clone -U
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   225
  adding changesets
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   226
  adding manifests
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   227
  adding file changes
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   228
  added 1 changesets with 1 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33981
diff changeset
   229
  new changesets cf03e5bb9936
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   230
26417
9a466b9f9792 largefiles: restore archiving largefiles with hgweb (issue4859)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25495
diff changeset
   231
Archive contains largefiles
33981
9a0f33f497cd tests: update test-largefiles-wireproto to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33335
diff changeset
   232
  >>> import os
9a0f33f497cd tests: update test-largefiles-wireproto to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33335
diff changeset
   233
  >>> import urllib2
26417
9a466b9f9792 largefiles: restore archiving largefiles with hgweb (issue4859)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25495
diff changeset
   234
  >>> u = 'http://localhost:%s/archive/default.zip' % os.environ['HGPORT2']
9a466b9f9792 largefiles: restore archiving largefiles with hgweb (issue4859)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25495
diff changeset
   235
  >>> with open('archive.zip', 'w') as f:
9a466b9f9792 largefiles: restore archiving largefiles with hgweb (issue4859)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25495
diff changeset
   236
  ...     f.write(urllib2.urlopen(u).read())
9a466b9f9792 largefiles: restore archiving largefiles with hgweb (issue4859)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25495
diff changeset
   237
  $ unzip -t archive.zip
9a466b9f9792 largefiles: restore archiving largefiles with hgweb (issue4859)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25495
diff changeset
   238
  Archive:  archive.zip
29562
cda10ff3175a tests: glob whitespace between path and OK in unzip(1) output
Augie Fackler <augie@google.com>
parents: 29421
diff changeset
   239
      testing: empty-default/.hg_archival.txt*OK (glob)
cda10ff3175a tests: glob whitespace between path and OK in unzip(1) output
Augie Fackler <augie@google.com>
parents: 29421
diff changeset
   240
      testing: empty-default/f1*OK (glob)
26417
9a466b9f9792 largefiles: restore archiving largefiles with hgweb (issue4859)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25495
diff changeset
   241
  No errors detected in compressed data of archive.zip.
9a466b9f9792 largefiles: restore archiving largefiles with hgweb (issue4859)
Matt Harbison <matt_harbison@yahoo.com>
parents: 25495
diff changeset
   242
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   243
test 'verify' with remotestore:
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   244
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   245
  $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   246
  $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   247
  $ hg -R http-clone verify --large --lfa
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   248
  checking changesets
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   249
  checking manifests
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   250
  crosschecking files in changesets and manifests
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   251
  checking files
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   252
  1 files, 1 changesets, 1 total revisions
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   253
  searching 1 changesets for largefiles
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   254
  changeset 0:cf03e5bb9936: f1 missing
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   255
  verified existence of 1 revisions of 1 largefiles
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   256
  [1]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   257
  $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   258
  $ hg -R http-clone -q verify --large --lfa
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   259
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   260
largefiles pulled on update - a largefile missing on the server:
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   261
  $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   262
  $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   263
  getting changed largefiles
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   264
  f1: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 not available from http://localhost:$HGPORT2/
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   265
  0 largefiles updated, 0 removed
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   266
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   267
  $ hg -R http-clone st
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   268
  ! f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   269
  $ hg -R http-clone up -Cqr null
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   270
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   271
largefiles pulled on update - a largefile corrupted on the server:
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   272
  $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   273
  $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   274
  getting changed largefiles
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   275
  f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27)
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   276
  0 largefiles updated, 0 removed
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   277
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   278
  $ hg -R http-clone st
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   279
  ! f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   280
  $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   281
  $ [ ! -f http-clone/f1 ]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   282
  $ [ ! -f http-clone-usercache ]
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   283
  $ hg -R http-clone verify --large --lfc
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   284
  checking changesets
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   285
  checking manifests
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   286
  crosschecking files in changesets and manifests
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   287
  checking files
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   288
  1 files, 1 changesets, 1 total revisions
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   289
  searching 1 changesets for largefiles
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   290
  verified contents of 1 revisions of 1 largefiles
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   291
  $ hg -R http-clone up -Cqr null
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   292
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   293
largefiles pulled on update - no server side problems:
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   294
  $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
25125
bd625cd4e5e7 progress: get the extremely verbose output out of default debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23139
diff changeset
   295
  $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache --config progress.debug=true
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   296
  resolving manifests
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   297
   branchmerge: False, force: False, partial: False
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   298
   ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   299
   .hglf/f1: remote created -> g
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   300
  getting .hglf/f1
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   301
  updating: .hglf/f1 1/1 files (100.00%)
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   302
  getting changed largefiles
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   303
  using http://localhost:$HGPORT2/
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   304
  sending capabilities command
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   305
  sending batch command
28463
19b4a2087dfc largefiles: specify unit for ui.progress when operating on files
Anton Shestakov <av6@dwimlabs.net>
parents: 26417
diff changeset
   306
  getting largefiles: 0/1 files (0.00%)
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   307
  getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   308
  sending getlfile command
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   309
  found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   310
  1 largefiles updated, 0 removed
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   311
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   312
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   313
  $ ls http-clone-usercache/*
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   314
  http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   315
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   316
  $ rm -rf empty http-clone*
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   317
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   318
used all HGPORTs, kill all daemons
25474
8c14f87bd0ae tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
   319
  $ killdaemons.py
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   320
29068
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   321
largefiles should batch verify remote calls
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   322
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   323
  $ hg init batchverifymain
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   324
  $ cd batchverifymain
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   325
  $ echo "aaa" >> a
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   326
  $ hg add --large a
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   327
  $ hg commit -m "a"
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   328
  Invoking status precommit hook
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   329
  A a
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   330
  $ echo "bbb" >> b
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   331
  $ hg add --large b
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   332
  $ hg commit -m "b"
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   333
  Invoking status precommit hook
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   334
  A b
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   335
  $ cd ..
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   336
  $ hg serve -R batchverifymain -d -p $HGPORT --pid-file hg.pid \
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   337
  > -A access.log
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   338
  $ cat hg.pid >> $DAEMON_PIDS
29218
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   339
  $ hg clone --noupdate http://localhost:$HGPORT batchverifyclone
29068
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   340
  requesting all changes
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   341
  adding changesets
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   342
  adding manifests
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   343
  adding file changes
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   344
  added 2 changesets with 2 changes to 2 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33981
diff changeset
   345
  new changesets 567253b0f523:04d19c27a332
29218
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   346
  $ hg -R batchverifyclone verify --large --lfa
29068
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   347
  checking changesets
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   348
  checking manifests
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   349
  crosschecking files in changesets and manifests
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   350
  checking files
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   351
  2 files, 2 changesets, 2 total revisions
29218
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   352
  searching 2 changesets for largefiles
29068
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   353
  verified existence of 2 revisions of 2 largefiles
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   354
  $ tail -1 access.log
35173
c1b94f34a11a tests: re-add (glob) for $LOCALIP matches
Augie Fackler <augie@google.com>
parents: 35097
diff changeset
   355
  $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3D972a1a11f19934401291cc99117ec614933374ce%3Bstatlfile+sha%3Dc801c9cfe94400963fcb683246217d5db77f9a9a x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob)
29218
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   356
  $ hg -R batchverifyclone update
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   357
  getting changed largefiles
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   358
  2 largefiles updated, 0 removed
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   359
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   360
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   361
Clear log file before next test
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   362
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   363
  $ printf "" > access.log
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   364
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   365
Verify should check file on remote server only when file is not
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   366
available locally.
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   367
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   368
  $ echo "ccc" >> batchverifymain/c
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   369
  $ hg -R batchverifymain status
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   370
  ? c
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   371
  $ hg -R batchverifymain add --large batchverifymain/c
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   372
  $ hg -R batchverifymain commit -m "c"
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   373
  Invoking status precommit hook
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   374
  A c
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   375
  $ hg -R batchverifyclone pull
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   376
  pulling from http://localhost:$HGPORT/
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   377
  searching for changes
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   378
  adding changesets
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   379
  adding manifests
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   380
  adding file changes
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   381
  added 1 changesets with 1 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33981
diff changeset
   382
  new changesets 6bba8cb6935d
29218
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   383
  (run 'hg update' to get a working copy)
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   384
  $ hg -R batchverifyclone verify --lfa
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   385
  checking changesets
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   386
  checking manifests
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   387
  crosschecking files in changesets and manifests
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   388
  checking files
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   389
  3 files, 3 changesets, 3 total revisions
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   390
  searching 3 changesets for largefiles
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   391
  verified existence of 3 revisions of 3 largefiles
fd288d118074 largefiles: send statlfile remote calls only for nonexisting locally files
liscju <piotr.listkiewicz@gmail.com>
parents: 29068
diff changeset
   392
  $ tail -1 access.log
35173
c1b94f34a11a tests: re-add (glob) for $LOCALIP matches
Augie Fackler <augie@google.com>
parents: 35097
diff changeset
   393
  $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3Dc8559c3c9cfb42131794b7d8009230403b9b454c x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob)
29068
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   394
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   395
  $ killdaemons.py
305f9c36a0f5 largefiles: makes verify batching stat calls to remote
liscju <piotr.listkiewicz@gmail.com>
parents: 28549
diff changeset
   396
30342
318a24b52eeb spelling: fixes of non-dictionary words
Mads Kiilerich <madski@unity3d.com>
parents: 29562
diff changeset
   397
largefiles should not ask for password again after successful authorization
29379
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   398
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   399
  $ hg init credentialmain
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   400
  $ cd credentialmain
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   401
  $ echo "aaa" >> a
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   402
  $ hg add --large a
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   403
  $ hg commit -m "a"
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   404
  Invoking status precommit hook
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   405
  A a
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   406
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   407
Before running server clear the user cache to force clone to download
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   408
a large file from the server rather than to get it from the cache
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   409
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   410
  $ rm "${USERCACHE}"/*
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   411
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   412
  $ cd ..
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   413
  $ cat << EOT > userpass.py
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   414
  > import base64
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   415
  > from mercurial.hgweb import common
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   416
  > def perform_authentication(hgweb, req, op):
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   417
  >     auth = req.env.get('HTTP_AUTHORIZATION')
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   418
  >     if not auth:
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   419
  >         raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   420
  >                 [('WWW-Authenticate', 'Basic Realm="mercurial"')])
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   421
  >     if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   422
  >         raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   423
  > def extsetup():
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   424
  >     common.permhooks.insert(0, perform_authentication)
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   425
  > EOT
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   426
  $ hg serve --config extensions.x=userpass.py -R credentialmain \
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   427
  >          -d -p $HGPORT --pid-file hg.pid -A access.log
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   428
  $ cat hg.pid >> $DAEMON_PIDS
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   429
  $ cat << EOF > get_pass.py
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   430
  > import getpass
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   431
  > def newgetpass(arg):
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   432
  >   return "pass"
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   433
  > getpass.getpass = newgetpass
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   434
  > EOF
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   435
  $ hg clone --config ui.interactive=true --config extensions.getpass=get_pass.py \
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   436
  >          http://user@localhost:$HGPORT credentialclone
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   437
  requesting all changes
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   438
  http authorization required for http://localhost:$HGPORT/
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   439
  realm: mercurial
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   440
  user: user
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   441
  password: adding changesets
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   442
  adding manifests
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   443
  adding file changes
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   444
  added 1 changesets with 1 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33981
diff changeset
   445
  new changesets 567253b0f523
29379
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   446
  updating to branch default
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   447
  getting changed largefiles
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   448
  1 largefiles updated, 0 removed
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   449
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   450
31773
3ed26ba54685 test-serve: kill daemons before deleting the access and error logs
Matt Harbison <matt_harbison@yahoo.com>
parents: 31028
diff changeset
   451
  $ killdaemons.py
29379
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   452
  $ rm hg.pid access.log
fc777c855d66 largefiles: make cloning not ask two times about password (issue4883)
liscju <piotr.listkiewicz@gmail.com>
parents: 29218
diff changeset
   453
21424
d13b4ecdb680 test: split test-largefile.t in multiple file
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   454
#endif