Commit Graph

40 Commits

Author SHA1 Message Date
Matt Mackall
a0edb788ff test-clone.t: drop message about listing bookmarks with no hardlinks 2014-10-27 16:53:01 -05:00
FUJIWARA Katsunori
31d0ede415 tests: add "(glob)" for l10n messages in test-clone.t for Windows
This patch follows the style of other tests avoiding same kind of issue.
2014-10-20 22:08:08 +09:00
Augie Fackler
a5ddb1dcfe tests: use $PYTHON instead of hardcoding python
This makes running the testsuite with pypy possible.
2014-10-15 15:35:59 -04:00
Pierre-Yves David
f84dab4656 clone: remove duplicated bookmark pulling
Now that all clone methods (copy, pull and push) also transport bookmarks, we can
safely drop the manual pulling that was performed during clone.
2014-09-26 13:56:20 -07:00
Siddharth Agarwal
8f7105eac1 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Local clones copy/hardlink over files directly, so the branchcaches should all
be valid. There's a slight chance that a read operation would update one of the
branchcaches, but we hold a lock over the source repo so they shouldn't cause
an invalid branchcache to be copied over, just a different, valid one.
2014-08-21 16:05:29 -07:00
FUJIWARA Katsunori
c52b73121a hg: use "os.path.join()" to join path components which may be empty (issue4203)
Changset 39a4d61c40d6 rewriting "hg.copystore()" with vfs uses
'dstbase + "/lock"' instead of "os.path.join()", because target files
given from "store.copyfiles()" already uses "/" as path separator

But in the repository using revlog format 0, "dstbase" becomes empty
("data" directory is located under ".hg" directly), and 'dstbase +
"/lock"' is treated as "/lock": in almost all cases, write access to
"/lock" causes "permission denied".

This patch uses "os.path.join()" to join path components which may be
empty in "hg.copystore()".
2014-03-25 19:34:17 +09:00
Matt Mackall
280eec0087 tests: skip tests that require not having root (issue4089)
This adds a new root hghave to test against. Almost all of these are a
subset of unix-permissions, but that is also used for checking exec
bit handling.
2013-11-14 18:07:43 -06:00
Mads Kiilerich
5584e7ca16 dispatch: show empty filename in OSError aborts
Mercurial would sometimes exit with:
  abort: No such file or directory
where str of the actual OSError exception was the more helpful:
  [Errno 2] No such file or directory: ''

The exception will now always show the filename and quote it:
  abort: No such file or directory: ''
2013-01-07 02:00:29 +01:00
Adrian Buehlmann
ba8bb9b602 clone: show status "updating to bookmark @"
if bookmark @ is not on the default branch, we show

  updating to bookmark @ on branch <name>
2012-10-29 14:02:30 +01:00
Adrian Buehlmann
38a6491671 test-clone: fix directory level
c1644655c164 inserted a "cd a" but didn't restore the previous directory.
2012-10-28 14:16:16 +01:00
Matt Mackall
1433ad1921 bookmarks: backed out new message from changeset ce6f3f8fb8a2
Not strictly a bugfix, hasn't achieved consensus yet.
2012-10-27 16:39:47 -05:00
Thomas Arendsen Hein
34208f8c42 clone: print bookmark name when clone activates a bookmark
Similar to the message that prints the checked out branch name.
Without this, the user might accidentally move the @ bookmark.
2012-10-26 14:53:31 +02:00
Thomas Arendsen Hein
d7ce500f26 test-clone.t: check that branch "@" is not automatically checked out
This verifies that 7b0bf61addc9 fixes the second problem mentioned in
issue3677.
2012-10-26 13:20:44 +02:00
Kevin Bullock
6012647380 clone: update to @ bookmark if it exists 2012-03-21 16:53:39 -05:00
Mads Kiilerich
2f4504e446 fix trivial spelling errors 2012-08-15 22:38:42 +02:00
Mads Kiilerich
9cddfd19ab check-code: fix check for trailing whitespace on sh command lines
The $ has been without necessary escaping since introduced in c4ecbbd282fe.
2012-08-08 18:10:16 +02:00
Adrian Buehlmann
f20b1788fc test-clone: fix for vfat
fixes http://hgbuildbot.kublai.com/builders/vfat%20hg%20tests%20%28stable%29/builds/65
2012-07-31 19:47:54 +02:00
Pierre-Yves David
a4bba98ab8 pushkey: add more verbose debug output regarding pushkey
Very few data are displayed now, making it hard to debug phases and obsolete
related issues.
2012-07-28 12:28:35 +02:00
FUJIWARA Katsunori
204c7d4046 localrepo: use the path relative to "self.vfs" instead of "path" argument
As a part of migration to vfs, this patch uses "self.root", which can
be recognized as the path relative to "self.vfs", instead of "path"
argument.

This fix allows to make invocations of "util.makedirs()" and
"os.path.exists()" while ensuring repository directory in
"localrepository.__init__()" ones indirectly via vfs.

But this fix also raises issue 2528: "hg clone" with empty destination.

"path" argument is empty in many cases, so this issue can't be fixed
in the view of "localrepository.__init__()".

Before this patch, it is fixed by empty-ness check ("not name") of
exception handler in "util.makedirs()".

    try:
        os.mkdir(name)
    except OSError, err:
        if err.errno == errno.EEXIST:
            return
        if err.errno != errno.ENOENT or not name:
            raise

This requires "localrepository.__init__()" to invoke "util.makedirs()"
with "path" instead of "self.root", because empty "path" is treated as
"current directory" and "self.root" becomes valid path.

But "hg clone" with empty destination can be detected also in
"hg.clone()" before "localrepository.__init__()" invocation, so this
patch re-fixes issue2528 by checking it in "hg.clone()".
2012-07-06 18:45:27 +09:00
Bryan O'Sullivan
c15e05c67a test-clone: load extensions before doing anything
This makes it possible to run this test using
"--extra-config-opt=extensions.myext=" and have the extension be
loaded as intended.
2012-07-11 15:34:32 -07:00
Mads Kiilerich
bf6fb79f83 tests: introduce hghave hardlinks
Some tests can't be run on FAT filesystems because it doesn't support
hardlinks.
2012-06-15 00:02:27 +02:00
Mads Kiilerich
1df3d48d73 tests: change odd uses of 'if hghave' to #if 2012-06-10 13:01:40 +02:00
Adrian Buehlmann
64ff78f040 tests: roll test-clone-failure.t into test-clone.t 2012-06-04 19:05:22 +02:00
Matt Mackall
a968007692 merge with stable 2011-12-08 16:01:44 -06:00
Matt Mackall
a69962e18c branch: warn on branching 2011-12-08 14:32:44 -06:00
Mads Kiilerich
786be21bbb tests: don't use stdout redirection for test data
Stdout redirection is not binary safe everywhere - for example not on windows
with msys.
2011-11-16 03:45:14 +01:00
Mads Kiilerich
637e2ecde2 tests: hide 'No such file or directory' messages
Windows will use a different and localized message.
2011-11-16 03:45:14 +01:00
Mads Kiilerich
9c95d62a3d tests: add missing '(glob)'s to match '\' in paths in test output on windows 2011-11-16 03:45:14 +01:00
Peter Arrenbrecht
d836ee3cea hg: add opts argument to clone for internal remoteui 2011-06-08 18:24:33 +02: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
Adrian Buehlmann
54665801ad test-clone.t: add basic cases for destination ''
The case

  $ hg clone a ''

already aborted before c1e68cd8cfa8, whereas

  $ hg clone --pull a ''

tripped the fixed issue2528.

Both basic cases are expected to fail with an abort.
2010-12-01 04:21:47 +01:00
Kevin Bullock
15da3ac7f2 pull: silence spurious 'requesting all changes' message
When issuing `hg pull -r REV` in a repo with no common ancestor with the
remote repo, the message 'requesting all changes' is printed, even though only
the changese that are ancestors of REV are actually requested. This can be
confusing for users (see
http://www.selenic.com/pipermail/mercurial/2010-October/035508.html).

This silences the message if (and only if) the '-r' option was passed.
2010-10-20 17:38:21 -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
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
Brodie Rao
b5fe0d906e tests: add glob matching for unified tests
This adds a " (glob)" marker that works like a simpler version of
(re): "*" is converted to ".*", and "?" is converted to ".".

Both special characters can be escaped using "\", and the backslash
itself can be escaped as well.

Other glob-style syntax, like "**", "[chars]", or "[!chars]", isn't
supported.
2010-09-22 16:06:02 -05:00
Brodie Rao
7d7d96bd74 tests: require regexes in unified tests to be marked with " (re)"
Consider this test:

  $ hg glog --template '{rev}:{node|short} "{desc}"\n'
  @  2:20c4f79fd7ac "3"
  |
  | o  1:38f24201dcab "2"
  |/
  o  0:2a18120dc1c9 "1"

Because each line beginning with "|" can be compiled as a regular
expression (equivalent to ".*|"), they will match any output.

Similarly:

  $ echo foo


The blank output line can be compiled as a regular expression and will
also match any output.

With this patch, none of the above output lines will be matched as
regular expressions. A line must end in " (re)" in order to be matched
as one.

Lines are still matched literally first, so the following will pass:

  $ echo 'foo (re)'
  foo (re)
2010-09-22 16:06:00 -05:00
Matt Mackall
08439e0f2d tests: add exit codes to unified tests 2010-09-16 17:51:32 -05:00
Martin Geisler
e59a7b4489 test-clone: 0a537dab3c97 lost changes from 78317c48fc40 2010-08-13 11:12:37 +02:00
Martin Geisler
85a18f4c0c Merge with stable 2010-08-12 18:30:24 +02:00
Adrian Buehlmann
6a1422f607 tests: unify test-clone 2010-08-10 13:21:28 +02:00