Mercurial > public > mercurial-scm > hg-stable
diff tests/test-subrepo.t @ 40440:69d4c8c5c25e stable
subrepo: print the status line before creating the peer for better diagnostics
I ran into a problem where I tried updating to a different branch, and the
process appeared to hang. It turned out that the subrepo revision wasn't
available locally, and I must have originally cloned it from an `hg serve -S` on
a machine that currently wasn't serving anything. It took 2+ minutes to
timeout, and didn't mention what it was connecting to even then.
There are a couple of other issues in this scenario too.
- The repo is dirty after the failed checkout because the top level repo is
updated first. We should probably make 2 passes- top down to pull
everything needed, and then do an update once everything is in place.
- Something must be reading .hgsubstate from wdir because if the same merge
command is run after the timeout, a prompt is issued that the local and
remote subrepo diverged, instead of hanging. But it lists the local version
and remote version as having the same hash.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 16 Nov 2018 18:37:26 -0500 |
parents | 34ba47117164 |
children | 47e3f554df35 |
line wrap: on
line diff
--- a/tests/test-subrepo.t Wed Nov 14 11:52:13 2018 -0500 +++ b/tests/test-subrepo.t Fri Nov 16 18:37:26 2018 -0500 @@ -1889,6 +1889,7 @@ $ cd .. $ hg clone malicious-proxycommand malicious-proxycommand-clone updating to branch default + cloning subrepo s from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' (in subrepository "s") [255] @@ -1901,6 +1902,7 @@ $ rm -r malicious-proxycommand-clone $ hg clone malicious-proxycommand malicious-proxycommand-clone updating to branch default + cloning subrepo s from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' (in subrepository "s") [255] @@ -1913,6 +1915,7 @@ $ rm -r malicious-proxycommand-clone $ hg clone malicious-proxycommand malicious-proxycommand-clone updating to branch default + cloning subrepo s from ssh://fakehost%7Ctouch%24%7BIFS%7Downed/path abort: no suitable response from remote hg! [255] $ [ ! -f owned ] || echo 'you got owned' @@ -1926,6 +1929,7 @@ $ rm -r malicious-proxycommand-clone $ hg clone malicious-proxycommand malicious-proxycommand-clone updating to branch default + cloning subrepo s from ssh://fakehost%7Ctouch%20owned/path abort: no suitable response from remote hg! [255] $ [ ! -f owned ] || echo 'you got owned' @@ -1938,6 +1942,7 @@ $ rm -r malicious-proxycommand-clone $ hg clone malicious-proxycommand malicious-proxycommand-clone updating to branch default + cloning subrepo s from ssh://-oProxyCommand%3Dtouch%20owned@example.com/path abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned@example.com/path' (in subrepository "s") [255]