##// END OF EJS Templates
copies: add config option for writing copy metadata to file and/or changset...
copies: add config option for writing copy metadata to file and/or changset This introduces a config option that lets you choose to write copy metadata to the changeset extras instead of to filelog. There's also an option to write it to both places. I imagine that may possibly be useful when transitioning an existing repo. The copy metadata is stored as two fields in extras: one for copies since p1 and one for copies since p2. I may need to add more information later in order to make copy tracing faster. Specifically, I'm thinking out recording which files were added or removed so that copies._chaincopies() doesn't have to look at the manifest for that. But that would just be an optimization and that can be added once we know if it's necessary. I have also considered saving space by using replacing the destination file path by an index into the "files" list, but that can also be changed later (but before the feature is ready to release). Differential Revision: https://phab.mercurial-scm.org/D6183

File last commit:

r41465:b6673e9b default
r42317:0e41f40b default
Show More
test-ssh-repoerror.t
68 lines | 1.8 KiB | text/troff | Tads3Lexer
/ tests / test-ssh-repoerror.t
Boris Feld
test: add a test file that displays ssh behavior in front of various errors...
r39418 #require unix-permissions no-root
initial setup
$ cat << EOF >> $HGRCPATH
> [ui]
Matt Harbison
tests: quote PYTHON usage...
r39743 > ssh="$PYTHON" "$TESTDIR/dummyssh"
Boris Feld
test: add a test file that displays ssh behavior in front of various errors...
r39418 > EOF
repository itself is non-readable
---------------------------------
$ hg init no-read
$ hg id ssh://user@dummy/no-read
000000000000
$ chmod a-rx no-read
$ hg id ssh://user@dummy/no-read
Pulkit Goyal
py3: more globing of things to make output compatible between py2 and py3...
r40263 remote: abort: Permission denied: *$TESTTMP/no-read/.hg* (glob)
Boris Feld
test: add a test file that displays ssh behavior in front of various errors...
r39418 abort: no suitable response from remote hg!
[255]
special case files are visible, but unreadable
----------------------------------------------
This is "similar" to the test above, but the directory is "traversable". This
seems an unexpected case in real life, but we test it anyway.
$ hg init other
$ hg id ssh://user@dummy/other
000000000000
$ for item in `find other | sort -r` ; do
> chmod a-r $item
> done
$ hg id ssh://user@dummy/other
Yuya Nishihara
dispatch: quote filename in IOError as well...
r41465 remote: abort: Permission denied: '$TESTTMP/other/.hg/requires'
Boris Feld
test: add a test file that displays ssh behavior in front of various errors...
r39418 abort: no suitable response from remote hg!
[255]
directory toward the repository is read only
--------------------------------------------
$ mkdir deep
$ hg init deep/nested
$ hg id ssh://user@dummy/deep/nested
000000000000
$ chmod a-rx deep
$ hg id ssh://user@dummy/deep/nested
Pulkit Goyal
py3: more globing of things to make output compatible between py2 and py3...
r40263 remote: abort: Permission denied: *$TESTTMP/deep/nested/.hg* (glob)
Boris Feld
test: add a test file that displays ssh behavior in front of various errors...
r39418 abort: no suitable response from remote hg!
[255]
repository has wrong requirement
--------------------------------
$ hg init repo-future
$ hg id ssh://user@dummy/repo-future
000000000000
$ echo flying-car >> repo-future/.hg/requires
$ hg id ssh://user@dummy/repo-future
remote: abort: repository requires features unknown to this Mercurial: flying-car!
remote: (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
abort: no suitable response from remote hg!
[255]