Commit Graph

15428 Commits

Author SHA1 Message Date
Thomas Arendsen Hein
e0dfb62c23 tests: check for svn >= 1.3 and >= 1.5 in tests that require those versions 2011-10-23 21:22:55 +02:00
Thomas Arendsen Hein
846f225a93 convert: add missing import of util, needed for svn < 1.6 2011-10-22 23:42:48 +02:00
Thomas Arendsen Hein
e30c56ef39 run-tests: make sure no_proxy/NO_PROXY are empty to fix test-http-proxy.t
If no_proxy (or NO_PROXY) includes localhost, the test for detecting an
unreachable proxy fails, because the proxy setting is ignored.
2011-10-22 23:21:38 +02:00
Greg Ward
520457ceba largefiles: test "lfconvert --to-normal" with rename/remove/merge
This gets us very close to full test coverage of lfconvert. The only
features not tested are:
- .hgtags conversion
- abort when largefile becomes symlink
2011-10-22 15:39:51 -04:00
Greg Ward
a9c8718766 largefiles: test lfconvert with rename, remove, and merge 2011-10-22 15:16:52 -04:00
Greg Ward
ce40a4d923 largefiles: beef up test-lfconvert.t so it's more thorough
- instead of converting a single changeset with a single file, convert
  two changesets which each add a mix of normal and large files
- make one of the large files not-so-large, but identified as large
  by filename
- use shorter, simpler filenames
- put some files in a subdirectory
- test that file contents are correctly converted
- drop unnecessary cleanup step
2011-10-22 14:52:05 -04:00
Greg Ward
04bcf1ecd1 largefiles: rearrange how lfconvert detects non-local repos
Mainly this is so we can test that code; it has the side benefit of not
requiring network I/O to reject non-local repo URLs.
2011-10-22 14:20:17 -04:00
Greg Ward
8c2e55bcd4 largefiles: test lfconvert error handling; remove redundant code 2011-10-22 14:17:19 -04:00
Greg Ward
48b00ec7da largefiles: extract test-lfconvert.t from test-largefiles.t
test-largefiles.t is getting pretty big, and there's lots more to test
in lfconvert. And lfconvert is a fairly orthogonal feature to the
rest of largefiles.
2011-10-22 13:48:56 -04:00
Matt Mackall
3044265f69 windows: recompute flags when committing a merge (issue1802)
Before this patch, Windows always did the wrong thing with exec bits
when committing a merge: consult the flags in first parent.

Now we manually recompute the result of merging flags at commit time,
which almost always does the right thing (except when there are
conflicts between symlink and exec flags).

To do this, we:

- pull flag synthesis out into its own function
- delay building this function unless it's needed
- add a merge case that compares flags in local and other against the ancestor

This has been tested in multiple ways on Linux:

- running the whole test suite with both old and new code in place,
  checking for differences in each flags() result
- running the whole test suite while comparing real on-disk flags
  against synthetic ones for merges
- test-issue1802 (from Martin Geisler) which disables exec bit
  checking on Unix
2011-10-22 16:12:33 -05:00
Andrew Pritchard
f08a46d761 largefiles: test interaction between largefiles and vanilla clients and servers
This reintroduces tests for the case described by issue3066, among others:
- vanilla clients and servers should still be able to talk to largefiles
  clients and servers about vanilla repos
- vanilla clients should not attempt to clone largefiles repos over http and
  should report a useful error message (issue3066; this appears to work
  correctly)
- vanilla clients should not attempt to clone largefiles repos over ssh, again
  with a useful error message
- largefiles clients should not attempt to push largefile changes to vanilla
  servers
2011-10-21 15:09:33 -05:00
Matt Mackall
0e1a6951ac tests: darcs > 2.5 got "smart" about encoding, disable encoding tests
We can no longer convert a repo with mixed encodings, nor can I even
figure out how to get Darcs to display such messages.
2011-10-22 11:21:00 -05:00
Matt Mackall
b7430f065a check-code: catch BaseException and os.path.relpath 2011-10-21 16:52:23 -05:00
Matt Mackall
be346e0be1 largefiles: py2.4 doesn't have BaseException
..and it's the wrong base class anyway.
2011-10-21 16:52:16 -05:00
Greg Ward
a3607c833a largefiles: rename lfconvert --tonormal option to --to-normal 2011-10-20 21:56:30 -04:00
Greg Ward
f8ef8e5ee3 largefiles: test lfconvert --tonormal 2011-10-20 22:01:05 -04:00
Greg Ward
e5f3dc74a5 largefiles: use smaller files in test script 2011-10-20 22:24:24 -04:00
Greg Ward
0413d50966 largefiles: test that minimum size can be a float
This allows us to drop the existing test of --lfsize, since it's
redundant with the new test.
2011-10-20 22:22:24 -04:00
Greg Ward
b4d623e019 largefiles: polish comments in test script 2011-10-20 22:14:11 -04:00
Kevin Bullock
dd00f9e122 import: abort usefully if no patch name given 2011-10-21 11:10:43 -05:00
Pierre-Yves David
4d3328f835 revset: disambiguous the node variable
The module could be confused with the function.
2011-10-21 14:15:58 +02:00
Matt Mackall
01c8789013 revset: deal with empty lists in formatspec 2011-10-21 12:12:21 -05:00
Christian Ebert
81060c2149 keyword: correct grammar in iskwfile docstring 2011-10-21 12:07:27 +01:00
Benjamin Pollack
2e57592170 largefiles: remove all uses of os.path.relpath for 2.4 compatibility 2011-10-20 17:40:25 -04:00
Hao Lian
1705e29378 largefiles: replace tempfile.NamedTemporaryFile with tempfile.mkstemp
This is consistent with the rest of Mercurial's code, mirroring the
try-finally-unlink structure elsewhere. Furthermore, it fixes the case where
largefiles throws an IOError on Windows when the temporary file is opened a
second time by copytocacheabsolute.

This patch creates the temporary file in the repo's largefiles store rather than
/tmp, which might be a different filesystem.
2011-10-20 17:24:59 -04:00
Matt Mackall
bbf72a4e6e util: allow sha1() with no args
Normally this works because we replace util.sha1 with hashlib.sha1
after first use, but if the first user doesn't provide an arg, it
breaks.
2011-10-31 14:22:11 -05:00
Matt Mackall
a5d3d42e92 tests: use md5sum.py instead of sha1sum, add check 2011-10-31 14:22:11 -05:00
Yuya Nishihara
0a388fca31 setup: set whole env for running hg even if .hg doesn't exist (issue3073)
The issue was partially fixed by 4576ace762a0, but there were missing
variables to run build_hgextindex.
2011-10-31 00:42:32 +09:00
Patrick Mezard
0a3c1ef904 mq: avoid data loss upon qfold + qmv (issue3058)
When renaming a patch A as B where B was previously qfolded into A and
therefore marked as removed, a versioned MQ would first restore B before
marking it as a copy of A, thus losing A changes. The undelete() call is
probably a left-over, wctx.copy() explicitely handles the case where the
destination is removed.

Also note that status command represents "hg rm b; hg mv a b" as:

  A b
    a
  R a

which explains the first hunk in test-mq-qrename.t.
2011-10-20 16:43:31 +02:00
Martin Geisler
acfa971cf1 subrepos: abort commit by default if a subrepo is dirty (BC)
This changeset flips the default value of ui.commitsubrepos setting
from True to False and adds a --subrepos flag to commit.

The commit, status, and diff commands behave like this with regard to
recusion and the ui.commitsubrepos setting:

          | recurses      | recurses
          | by default    | with --subrepos
  --------+---------------+----------------
  commit: | commitsubrepo | True
  status: | False         | True
  diff:   | False         | True

By changing the default from True to False, the table becomes
consistent in the two columns:

* without --subrepos on the command line, commit will abort if a
  subrepo is dirty and status/diff wont show changes inside subrepos.

* with --subrepos, all three commands will recurse.

A --subrepos flag on the command line overrides the config settin.g
2011-10-21 00:33:08 +02:00
Benjamin Pollack
8d2d1f2b4b largefiles: use XDG and OS X-specific cache locations by default (issue3067) 2011-10-20 17:05:13 -04:00
Benjamin Pollack
164bde4288 largefiles: remove redundant any_ function 2011-10-19 20:40:55 -04:00
Eli Carter
e9e5e67cfe largefiles: testcase to simulate inter-user clone on local machine 2011-10-20 09:35:37 -05:00
Benjamin Pollack
ec794ad869 largefiles: make the store primary, and the user cache secondary
This uses the now-properly-named functions and methods from the previous
patch to actually deliver the desired behavior
2011-10-20 13:24:11 -04:00
Benjamin Pollack
417391117f largefiles: rename functions and methods to match desired behavior
The original intent was that the largefiles would primarily be in the
repository, with the global cache being only that--a cache.  The naming
conventions and actual intent have both strayed.  In this first patch, the
naming conventions are switched to match the actual intent, as are the
configuration options.
2011-10-20 13:24:09 -04:00
Benjamin Pollack
8e3ea85821 largefiles: fix documentation to match desired behavior 2011-10-20 13:24:08 -04:00
Martin Geisler
1c39113f99 runrst: improve error message when Docutils is missing
Peter Toft told me he had installed a 'python-doc' package instead of
the correct 'python-docutils' and he suggested that we add the URL to
Docutils in our error message.
2011-10-20 17:47:33 +02:00
Yann E. MORIN
cb4376f349 bisect: remove superfluous parameter in label()
The argument is not used.  This is a left-over of non-published
iterations, and it passed through.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-20 00:37:34 +02:00
Matt Mackall
44b7e0d151 log: hide some low-utility options 2011-11-02 15:06:40 -05:00
Eli Carter
5a07405554 largefiles: fix newline for lfconverted repos 2011-10-18 17:28:26 -05:00
Eli Carter
d76a96462f largefiles: remove 1.9 compat code 2011-10-19 15:37:03 -05:00
Matt Mackall
26888db1d9 merge with i18n 2011-10-19 17:16:25 -05:00
Wagner Bruna
f2b64fb6ce i18n-pt_BR: synchronized with 59fbc42ee79d 2011-10-18 09:51:02 -02:00
Wagner Bruna
1294bcff07 i18n-pt_BR: msgmerge with 59fbc42ee79d 2011-10-18 09:50:57 -02:00
Wagner Bruna
7a521d704e bisect: add i18n contexts 2011-10-18 09:38:14 -02:00
Wagner Bruna
d4e8e13b0d import: add i18n context 2011-10-18 09:38:10 -02:00
Matt Mackall
b22c536335 check-code: report suspicious string joins
This detects patterns of the form:

ui.write("this is missing"
         "a space at the join\n")
2011-10-17 17:27:33 -05:00
Wagner Bruna
2177ac62f8 largefiles: fix typo 2011-10-17 19:10:28 -02:00
Wagner Bruna
663e6b1cd3 largefiles: make parameter more i18n-friendly 2011-10-17 19:10:42 -02:00
Mads Kiilerich
4578a9a76b tests: don't use 'test -e'
On Solaris 10:

  $ test -e f
  test: argument expected
2011-10-17 00:11:56 +02:00