Mercurial > hg
annotate tests/test-ssh-repoerror.t @ 40417:49c7b701fdc2 stable
phase: add an archived phase
This phase allows for hidden changesets in the "user space". It differs from
the "internal" phase which is intended for internal by-product only. There
have been discussions at the 4.8 sprint to use such phase to speedup cleanup
after history rewriting operation.
Shipping it in the same release as the 'internal-phase' groups the associated
`requires` entry. The important bit is to have support for this phase in the
earliest version of mercurial possible. Adding the UI to manipulate this new
phase later seems fine.
The current plan for archived usage and user interface are as follow. On a
repository with internal-phase on and evolution off:
* history rewriting command set rewritten changeset in the archived phase.
(This mean updating the cleanupnodes method).
* keep `hg unbundle .hg/strip-backup/X.hg` as a way to restore changeset for
now
(backup bundle need to contains phase data)
* [maybe] add a `hg strip --soft` advance flag
(a light way to expose the feature without getting in the way of a better
UI)
Mercurial 4.8 freeze is too close to get the above in by then.
We don't introduce a new repository `requirement` as we reuse the one
introduced with the 'archived' phase during the 4.8 cycle.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 17 Oct 2018 14:47:01 +0200 |
parents | f4893b59230f |
children | b6673e9bdcf6 |
rev | line source |
---|---|
39382
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
1 #require unix-permissions no-root |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
2 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
3 initial setup |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
4 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
5 $ cat << EOF >> $HGRCPATH |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
6 > [ui] |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39382
diff
changeset
|
7 > ssh="$PYTHON" "$TESTDIR/dummyssh" |
39382
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
8 > EOF |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
9 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
10 repository itself is non-readable |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
11 --------------------------------- |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
12 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
13 $ hg init no-read |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
14 $ hg id ssh://user@dummy/no-read |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
15 000000000000 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
16 $ chmod a-rx no-read |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
17 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
18 $ hg id ssh://user@dummy/no-read |
40227
f4893b59230f
py3: more globing of things to make output compatible between py2 and py3
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
39707
diff
changeset
|
19 remote: abort: Permission denied: *$TESTTMP/no-read/.hg* (glob) |
39382
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
20 abort: no suitable response from remote hg! |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
21 [255] |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
22 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
23 special case files are visible, but unreadable |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
24 ---------------------------------------------- |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
25 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
26 This is "similar" to the test above, but the directory is "traversable". This |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
27 seems an unexpected case in real life, but we test it anyway. |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
28 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
29 $ hg init other |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
30 $ hg id ssh://user@dummy/other |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
31 000000000000 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
32 $ for item in `find other | sort -r` ; do |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
33 > chmod a-r $item |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
34 > done |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
35 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
36 $ hg id ssh://user@dummy/other |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
37 remote: abort: Permission denied: $TESTTMP/other/.hg/requires |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
38 abort: no suitable response from remote hg! |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
39 [255] |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
40 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
41 directory toward the repository is read only |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
42 -------------------------------------------- |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
43 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
44 $ mkdir deep |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
45 $ hg init deep/nested |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
46 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
47 $ hg id ssh://user@dummy/deep/nested |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
48 000000000000 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
49 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
50 $ chmod a-rx deep |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
51 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
52 $ hg id ssh://user@dummy/deep/nested |
40227
f4893b59230f
py3: more globing of things to make output compatible between py2 and py3
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
39707
diff
changeset
|
53 remote: abort: Permission denied: *$TESTTMP/deep/nested/.hg* (glob) |
39382
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
54 abort: no suitable response from remote hg! |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
55 [255] |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
56 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
57 repository has wrong requirement |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
58 -------------------------------- |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
59 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
60 $ hg init repo-future |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
61 $ hg id ssh://user@dummy/repo-future |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
62 000000000000 |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
63 $ echo flying-car >> repo-future/.hg/requires |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
64 $ hg id ssh://user@dummy/repo-future |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
65 remote: abort: repository requires features unknown to this Mercurial: flying-car! |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
66 remote: (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
67 abort: no suitable response from remote hg! |
a7e22dd31f54
test: add a test file that displays ssh behavior in front of various errors
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
68 [255] |