Commit Graph

19104 Commits

Author SHA1 Message Date
Matt Mackall
fde01215f9 run-tests: fix a path existence check 2013-05-24 13:52:05 -05:00
Matt Mackall
8bd32fc6fa run-tests: regroup some variable initialization 2013-05-24 13:51:20 -05:00
Matt Mackall
037d2bf78a run-tests: regroup nested functions 2013-05-24 13:48:25 -05:00
Matt Mackall
f100d35303 run-tests: regroup temp dir creation 2013-05-24 13:47:17 -05:00
Matt Mackall
2180875dae run-tests: pull hgrc creation out as function 2013-05-24 13:41:20 -05:00
Matt Mackall
027e99d223 tests: simplify handling of unknown test types 2013-05-24 13:34:22 -05:00
Matt Mackall
506ab062fd run-tests: filter out non-tests from default list 2013-05-24 13:31:44 -05:00
Matt Mackall
a7060ace56 run-tests: make a table of test types 2013-05-24 13:23:19 -05:00
Matt Mackall
8448d1f531 run-tests: don't need to test shebang any more 2013-05-24 13:02:00 -05:00
Matt Mackall
57fba70118 merge with stable 2013-05-23 17:53:38 -05:00
Matt Mackall
644d0a2d40 merge with i18n 2013-05-23 17:53:19 -05:00
Matt Mackall
ae59675587 merge with stable 2013-05-23 17:52:21 -05:00
Matt Mackall
666687bde2 amend: complain more comprehensibly about subrepos 2013-05-23 17:39:33 -05:00
Durham Goode
7689f31a9c blackbox: fix blackbox causing exceptions in tests
In the tests some scripts call reposetup with the base ui instead of the
one the extensions have modified.  This causes an exception in
blackbox.reposetup since it expected a method to be there. So I just
check for it first. This only happened when the blackbox extension
was enabled during tests.
2013-05-22 17:38:24 -07:00
Durham Goode
1e38cba77a blackbox: fix recording exit codes (issue3938)
Previously the blackbox wrapped runcommand, but this failed to see the error
codes that were created if an exception occurred. I moved that logging to now
wrap _runcatch, so it can observe and log the actual error code (such as when
a user ctrl+c's during a command).

Updated the tests as well. Tested the change by running all the tests with the
blackbox extension enabled and verifying nothing broke (aside from things that
printed what extensions were enabeld).

The progress tests are affected by calls to time.time() so they needed to be
updated to pass.
2013-05-22 17:31:47 -07:00
Wagner Bruna
8a84a93c2b i18n-pt_BR: synchronized with a77682ca878b 2013-05-21 19:36:23 -03:00
Matt Mackall
244790ddf3 merge with i18n 2013-05-21 15:31:56 -05:00
Matt Mackall
a4827aaeac tests: backport some glob fixups 2013-05-21 15:29:53 -05:00
Matt Mackall
10bc3570e7 help: fix role/option confusion in RST
RST's role syntax means something different sometimes when it's in
some places that are poorly documented and vary betwen minirst and
docutils. Line wrapping will thus sometimes break everything.
2013-05-21 15:23:50 -05:00
Alexander Sauta
abbcc2fe8b i18n-ru: merge with Nikolaj Sjujskij fixes 2013-05-21 14:10:55 +01:00
Matt Mackall
870fe2303d dirstate: don't overnormalize for ui.slash
This should fix the issue exposed by debugpathcomplete on the buildbot.
2013-05-17 14:31:06 -05:00
Kevin Bullock
b425486325 i18n: fix untranslated prompts with translated responses (issue3936) 2013-05-15 21:36:19 -05:00
Mike Williams
946c7811c1 help: stop documentation markup appearing in generated help
Markup for links to mercurial commands is appearing in the help
documentation.

This patch fixes the markup so mercurial command reference links are
correctly generated in the help documentation.
2013-05-15 22:19:12 +01:00
Takumi IINO
b0aea72ba7 gendoc: extract print help topics into a dedicated function
This will be used in an upcoming patch.
2013-05-15 15:44:59 +09:00
Takumi IINO
9b959d84eb gendoc: make commnd __doc__ and extension __doc__ as translatable
Before this patch, commnd __doc__ and extension __doc__ are not translatable.
But other messages, like doc of helptalbe, section headers, are translatable.

This patch makes commnd __doc__ and extension __doc__ translatable.
2013-05-15 15:44:55 +09:00
Matt Mackall
755e6ec02a Added signature for changeset 65e164a79896 2013-05-14 18:43:53 -05:00
Nikolaj Sjujskij
357c9c33b1 i18n-ru: update po-file for further translation (from 65e164a79896) 2013-05-14 23:09:40 +04:00
Nikolaj Sjujskij
f193945c24 merge in i18n-ru 2013-05-14 23:04:23 +04:00
Matt Mackall
405bf2af35 i18n: fix partially-translated prompts (issue3928) (issue3929) 2013-05-13 17:44:35 -05:00
Matt Mackall
2cb70ec6bd merge with i18n 2013-05-13 17:36:06 -05:00
Nikolaj Sjujskij
daff3ffc87 i18n-ru: fix patchbomb confirmation prompt (issue3929)
Recognize y(es) and (n)o as valid input, for user not to have to switch
keyboard layout twice (`hg email -o ...` is Latin, whereas д(а)/н(ет) are not).
Use capital Y/N letters in prompt, otherwise y could be mistaken for у, and n
- for п.
2013-05-12 15:35:53 +04:00
Wagner Bruna
f42f14ca88 i18n-pt_BR: synchronized with 3dab6b95b689 2013-05-10 14:39:09 -03:00
Matt Mackall
474d52f0c3 pathencode: grow buffers to increase safety margin 2013-05-10 11:23:50 -05:00
Mike Williams
1ed1aa66a2 help/config: note 64-bit Windows registry key used with 32-bit Python
Before this patch the only place that documented the use of a different
registry key was on the wiki page for installing on Windows from
sources, while most users will use a pre-packaged installer and the
supplied help files.

This patch documents in the supplied help files that an alternate
registry key is used for the installation/system configuration file when
using 32-bit Python on a 64-bit Windows.
2013-05-12 10:09:34 +01:00
Alexander Plavin
f31c563383 highlight: fix page layout with empty first and last lines
Repeated newlines were stripped by pygmentize, now give the option not to do so.
2013-05-10 00:26:39 +04:00
Matt Mackall
43b6b506f1 tests: quiet strip to avoid commandserver pathsep issue 2013-05-09 15:17:29 -05:00
Matt Mackall
d2d6316f27 tests: fix another Windows path issue 2013-05-09 15:09:36 -05:00
Matt Mackall
fe27efdab6 tests: fix unionrepo path issue on msys (issue3927) 2013-05-09 15:01:11 -05:00
Takumi IINO
97e34bea4f blackbox: fix literal block syntax 2013-05-09 11:37:20 +09:00
Yuya Nishihara
7976fca292 branch: strip whitespace before testing known branch name
Because dirstate._branch() strips leading/trailing spaces from .hg/branch,
"hg branch ' foo '" should abort if branch "foo" exists in another head.

tag command had a similar bug and fixed by 11d102903884.
2013-05-07 23:49:03 +09:00
FUJIWARA Katsunori
72d4082125 largefiles: check unknown files with case awareness of the filesystem
Before this patch, largefiles extension checks unknown files in the
working directory always case sensitively.

This causes failure in updating from the revision X consisting of
'.hglf/A' (and "A" implicitly) to the revision Y consisting of 'a'
(not ".hglf/A") on case insensitive filesystem, because "A" in the
working directory is treated as colliding against and different from
'a' on the revision Y.

This patch uses "repo.dirstate.normalize()" to check unknown files
with case awareness of the filesystem.
2013-05-07 05:04:11 +09:00
FUJIWARA Katsunori
1d7c1875df largefiles: check existence of the file with case awareness of the filesystem
Before this patch, largefiles extension always unlinks largefiles
untracked on the target context in merging/updating after updating
working directory.

For example, it is assumed that the revision X consists of ".hglf/A"
(and "A" implicitly) and revision Y consists of "a" (not ".hglf/A").

In the case of updating from X to Y, largefiles extension tries to
unlink "A" after updating "a" in working directory. This causes
unexpected unlinking "a" on the case insensitive filesystem.

This patch checks existence of the file in the working context with
case awareness of the filesystem to prevent from such unexpected
unlinking.

"lfcommands._updatelfile()" also unlinks target file in the case
"largefile is tracked in the target context, but fails to be fetched".

This patch doesn't apply "repo.dirstate.normalize()" in this case,
because it should be already ensured in the manifest merging that
there is no normal file colliding against any largefiles.
2013-05-07 05:04:11 +09:00
FUJIWARA Katsunori
79e0e8b442 windows: check target type before actual unlinking to follow POSIX semantics
Creation and writing into target file via vfs (a.k.a opener) is done
after "unlink()" target file, if it exists.

For example, it is assumed that the revision X consists of file 'A',
and the revision Y consists of file 'A/B'. Merging revision X into Y
tries to "unlink()" on directory 'A' of 'A/B', before creation of file
'A'.

On POSIX environment, directories should be removed by "rmdir(2)", and
"unlink(2)" on directories fails. "unlink()" of Mercurial (and Python)
uses "unlink(2)" directly, so unlinking in the merge case above would
fail.

In the other hand, on Windows environment, "unlink()" of Mercurial
tries to rename before actual unlinking, to follow POSIX semantics:
already opened file can be unlinked safely.

This causes unexpected success in unlinking in the merge case above,
even though directory 'A' is renamed to another. This confuses users.

This patch checks whether target is directory or not before renaming,
and raises IOError(errno.EPERM) if so, to follow POSIX semantics.
2013-05-07 05:04:11 +09:00
FUJIWARA Katsunori
66873eefc0 subrepo: open files in 'rb' mode to read exact data in (issue3926)
Before this patch, "subrepo._calcfilehash()" opens files by "open()"
without any mode specification. This implies "text mode" on Windows.

When target file contains '\x00' byte, "read()" in "text mode" reads
file contents in without data after '\x00'.

This causes invalid SHA1 hash calculation in "subrepo._calcfilehash()".

This patch opens files in 'rb' mode to read exact data in.
2013-05-09 21:09:58 +09:00
Blesso hrvoje1212@gmail.com
36f0d7039a convert: fix bug of wrong CVS path parsing without port number (issue3678)
The cvsps.py:getrepopath suffers from a string parsing bug (it returns
"user@server/path/to/repository" if the CVSROOT is given like this:
":pserver:user@server/path/to/repository" ), which gives returnes the wrong
value becouse cvsps.py fails to strip the prefix from filenames.
With this patch for the same input we get the correct repo path that is:
"/path/to/repository"
2013-05-03 19:34:59 +02:00
Matt Mackall
3a8df7d53a hfs+: rewrite percent-escaper (issue3918)
The original code was a bit too clever and got confused by some cp949
Korean text. This rewrite bytes the bullet and manually decodes UTF-8
sequences. Adds some doctests.
2013-05-04 14:51:21 -05:00
Bryan O'Sullivan
c787225d04 revert: ensure that copies and renames are honored (issue3920)
Previously, we restored the states of files, but not the additional
information the dirstate uses to track copies and renames.
2013-05-03 12:40:17 -07:00
Durham Goode
c5a04c46b0 hgignore: fix regression with hgignore directory matches (issue3921)
If a directory matched a regex in hgignore but the files inside the directory
did not match the regex, they would appear as deleted in hg status. This
change fixes them to appear normally in hg status.

Removing the ignore(nf) conditional here is ok because it just means we might
stat more files than we had before. My testing on a large repo shows this
causes no performance regression since the only additional files being stat'd
are the ones that are missing (i.e. status=!), which are generally rare.
2013-05-03 09:44:50 -07:00
Brendan Cully
5fda2ba23f tests: sprinkle globs over largefiles/subrepo tests for Windows 2013-05-02 11:26:43 -07:00
Brendan Cully
09d28ec44c tests: skip permissions tests in test-phases-exchange when fs lacks permissions 2013-05-02 11:17:18 -07:00