Commit Graph

21 Commits

Author SHA1 Message Date
timeless@mozdev.org
b359440d1b spelling: doesn't/does not 2012-08-17 13:58:18 -07:00
Mads Kiilerich
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +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
5bbf1ec751 merge with stable 2011-11-22 17:34:22 -06:00
Augie Fackler
ca0638e3d0 clone: don't save user's password in .hg/hgrc (Issue3122) 2011-11-22 12:06:42 -06:00
Mads Kiilerich
8415df7277 tests: use 'hghave serve' to guard tests that requires serve daemon management 2011-11-07 03:24:53 +01:00
Martin Geisler
5a0135a6ca tests: remove redundant mkdir
There are still many tests that check that a bare 'hg init'
initializes the current directory.
2011-04-19 12:04:44 +02:00
Brodie Rao
3a43fa887e url: refactor util.drop_scheme() and hg.localpath() into url.localpath()
This replaces util.drop_scheme() with url.localpath(), using url.url for
parsing instead of doing it on its own. The function is moved from
util to url to avoid an import cycle.

hg.localpath() is removed in favor of using url.localpath(). This
provides more consistent behavior between "hg clone" and other
commands.

To preserve backwards compatibility, URLs like bundle://../foo still
refer to ../foo, not /foo.

If a URL contains a scheme, percent-encoded entities are decoded. When
there's no scheme, all characters are left untouched.

Comparison of old and new behaviors:

URL                      drop_scheme()   hg.localpath()    url.localpath()
===                      =============   ==============    ===============
file://foo/foo           /foo            foo/foo           /foo
file://localhost:80/foo  /foo            localhost:80/foo  /foo
file://localhost:/foo    /foo            localhost:/foo    /foo
file://localhost/foo     /foo            /foo              /foo
file:///foo              /foo            /foo              /foo
file://foo               (empty string)  foo               /
file:/foo                /foo            /foo              /foo
file:foo                 foo             foo               foo
file:foo%23bar           foo%23bar       foo%23bar         foo#bar
foo%23bar                foo%23bar       foo%23bar         foo%23bar
/foo                     /foo            /foo              /foo

Windows-related paths on Windows:

URL                      drop_scheme()   hg.localpath()    url.localpath()
===                      =============   ==============    ===============
file:///C:/foo           C:/C:/foo       /C:/foo           C:/foo
file:///D:/foo           C:/D:/foo       /D:/foo           D:/foo
file://C:/foo            C:/foo          C:/foo            C:/foo
file://D:/foo            C:/foo          D:/foo            D:/foo
file:////foo/bar         //foo/bar       //foo/bar         //foo/bar
//foo/bar                //foo/bar       //foo/bar         //foo/bar
\\foo\bar                //foo/bar       //foo/bar         \\foo\bar

Windows-related paths on other platforms:

file:///C:/foo           C:/C:/foo       /C:/foo           C:/foo
file:///D:/foo           C:/D:/foo       /D:/foo           D:/foo
file://C:/foo            C:/foo          C:/foo            C:/foo
file://D:/foo            C:/foo          D:/foo            D:/foo
file:////foo/bar         //foo/bar       //foo/bar         //foo/bar
//foo/bar                //foo/bar       //foo/bar         //foo/bar
\\foo\bar                //foo/bar       //foo/bar         \\foo\bar

For more information about file:// URL handling, see:
http://www-archive.mozilla.org/quality/networking/testing/filetests.html

Related issues:

- issue1153: File URIs aren't handled correctly in windows

  This patch should preserve the fix implemented in
  5c92d05b064e. However, it goes a step further and "promotes"
  Windows-style drive letters from being interpreted as host names to
  being part of the path.

- issue2154: Cannot escape '#' in Mercurial URLs (#1172 in THG)

  The fragment is still interpreted as a revision or a branch, even in
  paths to bundles. However, when file: is used, percent-encoded
  entities are decoded, so file:test%23bundle.hg can refer to
  test#bundle.hg ond isk.
2011-03-30 20:03:05 -07:00
Brodie Rao
9b6a7577e1 hg: look up schemes using url.url 2011-03-30 20:02:07 -07:00
Brodie Rao
80fd2713db url: abort on file:// URLs with non-localhost hosts 2011-03-30 20:01:31 -07:00
Gilles Moris
dcdc58f0a5 rollback: clarifies the message about the reverted state (issue2628)
Previously, when rolling back a transaction, some users could be confused
between the level to which the store is rolled back, and the new parents
of the working directory.

  $ hg rollback
  rolling back to revision 4 (undo commit)

With this change:
  $ hg rollback
  repository tip rolled back to tip revision 4 (undo commit)
  working directory now based on revision 2 and 1

So now the user can realize that the store has been rolled back to an older
tip, but also that the working directory may not on the tip (here we are
rolling back the merge of the heads 2 and 1)
2011-02-10 09:03:06 +01:00
Mads Kiilerich
e490eeec3f tests: reintroduce ":$HGPORT" in test output
This reduces the number of patterns that must be adjusted when writing tests.
2010-10-08 22:36:11 -05:00
Brodie Rao
b469322e9a test-pull: convert regexes to globs 2010-09-26 16:01:13 -05:00
Martin Geisler
3d112b3042 tests: added a short description to issue numbers
Many tests already had a short line to describe what IssueXXX is
about. I find that quite useful when reading a test.
2010-09-24 10:13:49 +02:00
Matt Mackall
430e769c2b tests: various fixes for new unified test pattern format 2010-09-22 18:20:47 -05:00
Matt Mackall
5d9fc42983 tests: drop a bunch of sed calls from unified tests 2010-09-21 16:44:13 -05:00
Matt Mackall
200e89394d tests: fix a bunch of pointless #s in unified tests 2010-09-17 17:03:08 -05:00
Matt Mackall
08439e0f2d tests: add exit codes to unified tests 2010-09-16 17:51:32 -05:00
Sune Foldager
843894f4b3 tests: remove exec bit from .t files 2010-09-14 16:03:10 +02:00
Adrian Buehlmann
79059e20c1 combine tests 2010-09-14 12:20:51 +02:00