Commit Graph

45 Commits

Author SHA1 Message Date
Mads Kiilerich
8cb1e5208b debugpushkey: list keys sorted 2012-12-16 20:50:57 +01:00
Matt Mackall
86c978bc2c clone: don't %-escape the default destination (issue3145) 2012-10-19 14:47:55 -05:00
Pierre-Yves David
fd393b84f3 pushkey: do not exchange obsole markers if feature is disabled
This apply to both push and pull both when client or server.
2012-07-28 13:33:06 +02:00
Brad Hall
6b8032746f tag: don't allow tagging the null revision (issue1915)
Also fixed the tests that were doing this and expected it to work
2012-06-05 17:00:13 -07:00
Pierre-Yves.David@ens-lyon.org
d60eedc2d6 obsolete: exchange obsolete marker over pushkey
For a version of the exchange, all markers are exchange. This won't
scale and we will need a better protocol later.
2012-06-07 19:21:59 +02:00
Mads Kiilerich
a8107f523f tests: consistently use printenv.py the same MSYS/Windows-compatible way
This will remove some reasons some tests are disabled on Windows.
2012-06-21 03:05:02 +02:00
Mads Kiilerich
ccfffc07ba tests: add missing no-outer-repo requirements
Outer repos (if any) will now never be touched by the tests. But it is better
to run without any repos around the tmp directory.
2012-06-20 23:41:21 +02:00
Adrian Buehlmann
b761076e81 tests/printenv.py: eliminate trailing spaces on output 2012-06-17 00:27:31 +02:00
Martin Geisler
a06bcd028f serve: lowercase "no repo here" message 2012-06-12 14:18:18 +02:00
Adrian Buehlmann
cc8d5d2d8e tests/run-tests: avoid C:/ in arguments
MSYS replaces C:/... in arguments with C;... as it interprets the C:/ as a
colon separated POSIX path list. The colon is replaced with ; (path separator
on Windows) according to

  http://www.mingw.org/wiki/Posix_path_conversion

So we must not replace \ with / for neither $TESTTMP nor $TESTDIR, but we
have to keep replacing \ with / for the Popen4 call of function hghave. If we
don't do the latter, test-run-tests.t will fail with

  $ python run-tests.py --local test-run-tests.t

  --- C:\Users\adi\hgrepos\hg-main\tests\test-run-tests.t
  +++ C:\Users\adi\hgrepos\hg-main\tests\test-run-tests.t.err
  @@ -70,6 +70,7 @@
     tested
   #else
     $ echo skipped
  +  skipped
   #endif

   #if false


An additional tweak in test-ssh.t is needed that globs away an encoded path,
as it can't be translated back to $TESTTMP, because the backslashes in the
output have been already encoded as %5C.

This patch makes test-ssh.t pass in MSYS on Windows.
2012-06-10 03:05:59 +02:00
David Schleimer
499f4df5a8 hg-ssh: read-only flag
Allows you to restrict a ssh key to have read-only access to a set of
repos by passing the --read-only flag to hg-ssh.

This is useful in an environment where the number of unix users you
can or are willing to create is limited.  In such an environment,
multiple users or applications will share a single unix account.  Some
of those applications will likely need read-only access to the
repository.  This change makes it possible to grant them such access
without requiring that they use a separate unix account.
2012-05-22 15:17:37 -07:00
Mads Kiilerich
64a9bbd95b tests: improve test of hg-ssh and make the test pass on windows 2012-05-07 00:52:11 +02:00
Mads Kiilerich
91529dce53 hg-ssh: use %s for printing paths in error messages
This avoids \\ if this ever is run on windows - for example in the test suite.
2012-05-07 00:49:01 +02:00
Mads Kiilerich
8564a7de60 tests: quote dummyssh in a way that works on windows too
Don't depend on $environmentvariableexpansion and 'quote' handling in system()
2012-04-28 02:00:04 +02:00
Mads Kiilerich
d94d866bcb tests: add missing accept of native pathname separator 2012-04-28 01:55:39 +02:00
Thomas Arendsen Hein
21bb7c4cdc tests: make tests work if directory contains special characters
With this quoting tests will work e.g. in "/tmp/foo bar/mercurial/".
2012-04-03 19:06:35 +02:00
Matt Mackall
31ad230c52 pull: backout change to return code
This bit a number of people.
2012-02-10 16:09:30 -06:00
Matt Mackall
902bee47a8 pull: return 1 when no changes found (BC)
Currently we have the following return codes if nothing is found:

                commit   incoming    outgoing      pull     push
intended           1        1           1            1       1
documented         1        1           1            0       1
actual             1        1           1            0       1

This makes pull agree with the rest of the table and makes it easy to
detect "nothing was pulled" in scripts.
2012-01-30 16:01:54 -06:00
Matt Mackall
1c8e8627b0 push: don't treat bookmark as a found change
Treating bookmarks as a found change results in confusing
documentation or output and is less useful for scripting.
2012-01-30 15:56:35 -06:00
Matt Mackall
2157179ce3 push: return 1 if no changes found (issue3228)
Currently we have the following return codes if nothing is found:

                commit   incoming    outgoing      pull     push
intended           1        1           1            1       1
documented         1        1           1            0       1
actual             1        1           1            0       0

This fixes the lower-right entry.
2012-01-30 11:32:09 -06:00
Mads Kiilerich
80b4f15548 hg-ssh: use shlex for shell-like parsing of SSH_ORIGINAL_COMMAND
The Mercurial ssh protocol is defined as if it was ssh-ing to a shell account on
an ordinary ssh server, and where hg was available in $PATH and it executed
the command "hg -R REPOPATH serve --stdio".

The Mercurial ssh client can in most cases just pass REPOPATH to the shell, but
if it contains unsafe characters the client will have to quote it so the shell
will pass the right -R value to hg. Correct quoting of repopaths was introduced
in 7bec00a7d7a6 and tweaked in c3194121de6c.

hg-ssh doesn't create the command via a shell and used a simple parser instead.
It worked fine for simple paths without any quoting, but if any kind of quoting
was used it failed to parse the command like the shell would do it.

This makes hg-ssh behave more like a normal shell with hg in the path would do.
2011-12-08 16:28:18 +01:00
Pierre-Yves David
a6373d74dc phases: add basic pushkey support 2011-12-15 11:24:26 +01:00
Mads Kiilerich
2ee0e99705 sshrepo: don't quote obviously safe strings (issue2983)
This restores compatibility with hg-over-ssh servers that don't parse
commandlines as sh does but works ok in the most common cases.
2011-12-08 16:39:00 +01:00
Mads Kiilerich
c4feda7dd3 ssh: quote remote paths (issue2983) 2011-11-26 00:10:31 +01:00
Mads Kiilerich
adf83aa0ff tests: share dummyssh 2011-05-05 01:47:46 +02:00
Mads Kiilerich
d0fd430b35 tests: fix test-ssh.t after c77f1a86a050 2011-05-05 01:47:46 +02:00
Peter Arrenbrecht
75fa0e5ea9 discovery: add new set-based discovery
Adds a new discovery method based on repeatedly sampling the still
undecided subset of the local node graph to determine the set of nodes
common to both the client and the server.

For small differences between client and server, it uses about the same
or slightly fewer roundtrips than the old tree-based discovery. For
larger differences, it typically reduces the number of roundtrips
drastically (from 150 to 4, for instance).

The old discovery code now lives in treediscovery.py, the new code is
in setdiscovery.py.

Still missing is a hook for extensions to contribute nodes to the
initial sample. For instance, Augie's remotebranches could contribute
the last known state of the server's heads.

Credits for the actual sampler and computing common heads instead of
bases go to Benoit Boissinot.
2011-05-02 19:21:30 +02:00
Matt Mackall
8a9a6325b4 ssh: fix password test
We don't support passwords in ssh URLs, and neither do some versions
of Python's urllib. Since we don't actually care much here, punt with
a glob in the test.
2011-03-24 15:12:51 -05:00
Lee Cantey
6816acddec Fix expected url to match test. 2011-03-24 08:51:58 -07:00
Matt Mackall
9bb3fa8c69 merge with stable 2011-03-17 17:08:13 -05:00
Miloš Hadžić
b3d3d7aa76 push/outgoing: print remote target path even if there's an error (issue2561)
This is a simple patch to make hg push/hg outgoing print their remote target
path even if the operation fails. I'm not sure if the original behavior was by
design.

This patch also changes one test to reflect the changed behaviour.
2011-03-17 22:55:02 +01:00
David Soria Parra
d5ce5f0e0b hg: add support for cloning bookmarks 2011-03-13 12:24:17 +01:00
David Soria Parra
6b3204aa84 tests: remove bookmark extension configuration 2011-02-24 03:13:48 +01:00
Adrian Buehlmann
b9288e15e7 sshrepo: catch passwords in ssh urls
see also d0162aaab5fc
2011-02-23 11:42:41 +01:00
Mads Kiilerich
3e84017cf0 tests: use printenv.py where it is - don't copy it around 2011-02-15 02:17:43 +01:00
Matt Mackall
d27d1fae16 bookmarks: move push/pull command features to core 2011-02-10 13:46:28 -06:00
Matt Mackall
776084cff3 pushkey: use UTF-8 2010-11-28 18:21:47 -06:00
Matt Mackall
509a829041 pushkey: force HTTP POST on push and add tests (issue2489) 2010-11-12 01:21:45 -06:00
timeless
8a61a96909 test-ssh: handle very slow ssh transfer rate 2010-10-14 10:56:39 +03:00
Mads Kiilerich
a8aa4fec4a tests: remove the last traces of $HGTMP
$HGTMP isn't needed - and if we need something like that then $TESTTMP is more
appropriate.
2010-10-08 22:36:11 -05:00
Mads Kiilerich
3174ff376b tests: remove redundant globs
Many globs now just match $TESTTMP and is no longer needed.
2010-10-08 22:36:10 -05:00
Erik Zielke
512d0992fc tests: removed test names in tests
The name of the test files is replaced with a glob * expression,
thereby the tests does not depend on the filename of the file they are
in.
2010-09-30 09:49:40 +02:00
Brodie Rao
709f38fa67 test-ssh: test absolute path that exists 2010-09-26 14:35:52 -05:00
Matt Mackall
092e9a2cb5 tests: unify test-ssh 2010-09-26 13:44:49 -05:00
Matt Mackall
49a96309a7 tests: unify test-ssh 2010-09-26 13:41:32 -05:00