Commit Graph

5875 Commits

Author SHA1 Message Date
Matt Mackall
cf4605492a merge with stable 2012-11-28 16:15:05 -06:00
André Sintzoff
94ef5e50d6 phases: fix missing "error" module import (issue3707) 2012-11-25 20:39:37 +01:00
Idan Kamara
4ae64fdb03 grep: don't search past the end of the searched string
'*' causes the resulting RE to match 0 or more repetitions of the preceding RE:

>>> bool(re.search('.*', ''))
>>> True

This causes an infinite loop because currently we're only checking if there was
a match without looking at where we are in the searched string.
2012-11-12 19:27:03 +02:00
Pierre-Yves David
cc961a38fb amend: force editor only if old message is reused (issue3698)
This regression was added by 435d13b1e757. It triggered the editor even if
--message or --logfile were provided.
2012-11-13 08:41:56 -08:00
Adrian Buehlmann
fcd58e2e2a test-mq-qrefresh: test that the patch at qtip is indeed empty
...after qrefreshing a non-existent file
2012-11-08 11:54:08 +01:00
Matt Mackall
202783c374 tests: only call check-code once
The accepted warnings list is now empty, let's try to keep it that way.
2012-11-26 15:59:02 -06:00
Julian Cowley
15e470ce7f convert: add config option to use the local time zone
The default for the time zone offset in a converted changeset has
always been 0 (UTC).  With this patch, the converted changeset is
modified so that the local offset from UTC is specified as the time
zone offset.

The option is specified as the boolean convert.localtimezone (default
False).  Example usage:

    hg convert -s cvs --config convert.localtimezone=True example-cvs example-hg

IMPORTANT: the patch only applies to conversions from cvs or svn.
The documentation for the option only appears in those two sections
in the convert help text.
2012-11-18 12:26:50 -10:00
Bryan O'Sullivan
ad58c7ca08 run-tests: fix an unnoticed check-code violation 2012-11-27 13:09:05 -08:00
Bryan O'Sullivan
d0279e495a run-tests: add a --compiler option
Without this option, it is not possible to run the test suite on Windows
using mingw's gcc as the compiler.
2012-11-27 11:18:33 -08:00
Bryan O'Sullivan
6fbbd59476 run-tests: make build command line less intimidating
Use a dict for parameters to the format string, instead of a
ridiculous number of positional parameters.
2012-11-27 11:18:31 -08:00
Adrian Buehlmann
c700586a1f test-subrepo: adapt for Windows after 6e587aaeb4ef
Fixes

  @@ -606,7 +606,7 @@
     issue3276_ok
     $ rm repo/s/b
     $ hg -R repo revert --all
  -  reverting repo/.hgsubstate
  +  reverting repo\.hgsubstate
     reverting subrepo s
     $ hg -R repo update
     1 files updated, 0 files merged, 0 files removed, 0 files unresolved

on Windows
2012-11-02 20:47:03 +01:00
Adrian Buehlmann
e6900cf097 test-mq-qrefresh: adapt for Windows after 94dce4b70643
Fixes

  @@ -208,7 +208,7 @@
     $ echo 'orphan' > orphanchild
     $ hg add orphanchild
     $ hg qrefresh nonexistentfilename # clear patch
  -  nonexistentfilename: No such file or directory
  +  nonexistentfilename: The system cannot find the file specified
     $ hg qrefresh --short 1/base
     $ hg qrefresh --short 2/base

on Windows
2012-11-02 20:22:09 +01:00
Matt Mackall
92926a8771 tests: fix test for issue3581 for vfat on Linux 2012-11-01 14:59:55 -05:00
Keegan Carruthers-Smith
74acb324a1 filemerge: only run test for issue3581 on non-windows environments 2012-10-30 17:23:51 -07:00
Simon Heimberg
b731b379ec subrepo: only do clean update when overwrite is set (issue3276)
Files in a subrepo were overwritten on update. But this should only happen on a
clean update (example: -C is specified).
Use the overwrite parameter introduced for svn subrepos in e3640daa4703 to
decide whether to merge changes (as update) or remove them (as clean).

The new function hg.updaterepo is intruduced to keep all update calls in hg.

test-subrepo.t is extended to test if an untracked file is overwritten
(issue3276). (Update -C is already tested in many places.)
The first two chunks are debugging output which has changed. (Because overwrite
is not always true anymore for subrepos)
All other tests still pass without any change.
2012-10-24 18:45:22 +02:00
FUJIWARA Katsunori
5434449902 i18n: change output of largefiles for summary to distinguish from one for outgoing
Before this patch, largefiles extension uses "largefiles: No remote
repo" message not only for "outgoing" as status report, but also for
"summary" as summarized information.

This sharing prevents message translators from inserting white spaces
between "largefiles:" and "No remote repo" in translated message to
align column position of summarized information.

This patch changes output of largefiles for summary to distinguish
from one for outgoing.

This patch puts "no remote repo" into parentheses, because this is not
summarized information.
2012-10-31 03:59:28 +09:00
FUJIWARA Katsunori
536e35fc32 i18n: make column positioning message of MQ summary output translatable
Before this patch, one of column positioning messages of MQ summary
output is not translatable, and patches are always listed up at fixed
column position like below, when patch queue is not empty:

    mq:     1 applied, 1 unapplied

But column positioning messages for other summarized information are
translatable, so other information may be displayed at different
column position on non-English locale environments.

This patch makes column positioning message of MQ summary output
translatable.
2012-10-31 03:59:28 +09:00
FUJIWARA Katsunori
2cf8855a64 icasefs: make case-folding collision detection as deletion aware (issue3648)
Before this patch, case-folding collision is checked simply between
manifests of each merged revisions.

So, files may be considered as colliding each other, even though one
of them is already deleted on one of merged branches: in such case,
merge causes deleting it, so case-folding collision doesn't occur.

This patch checks whether both of files colliding each other still
remain after merge or not, and ignores collision if at least one of
them is deleted by merge.

In the case that one of colliding files is deleted on one of merged
branches and changed on another, file is considered to still remain
after merge, even though it may be deleted by merge, if "deleting" of
it is chosen in "manifestmerge()".

This avoids fail to merge by case-folding collisions after choices
from "changing" and "deleting" of files.

This patch adds only tests for "removed remotely" code paths in
"_remains()", because other ones are tested by existing tests in
"test-casecollision-merge.t".
2012-10-31 16:50:22 +09:00
Durham Goode
a2ecd990ef mq: fix qrefresh case sensitivity (issue3271)
When calling qrefresh with filenames, the filenames were being
treated as case-sensistive on case-insensitive file systems.
So 'qrefresh foo' would not match file 'Foo', and it failed silently.
This fix makes it work correctly on case-insensitive file systems.

Previously the matching function was applied directly to the filenames.
Now we apply the matching function through repo.status, which handles
the case logic for us. A side effect of using repo.status is that
if the qrefresh file doesn't exist, there is output stating it
doesn't exist.

Adds a test to an existing mq refresh case test.
2012-10-30 13:19:06 -07:00
Keegan Carruthers-Smith
556604a6f0 filemerge: use util.shellquote when calling merge (issue3581) 2012-10-26 12:02:58 -07: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 Harbison
eb56660b19 largefiles: don't copy largefiles from working dir to the store while converting
Previously, if one or more largefiles for a repo being converted were not in the
usercache, the convert would abort with a reference to the largefile being
missing (as opposed to the previous patch, where the standin was referenced as
missing).  This is because commitctx() tries to copy all largefiles to the
local store, first from the user cache, and if the file isn't found there, from
the working directory.  No files will exist in the working directory during a
convert, however.  It is not sufficient to force the source repo to be local
before proceeding, because clone and pull do not download largefiles by default.

This is slightly less than ideal because while the conversion will now complete,
it won't be possible to update to revs with missing largefiles unless the user
intervenes manually, because there is no default path pointing back to the
source repo.  Ideally these files would be cached during the conversion.

This check could have been done in reposetup.commitctx() instead, but this
ensures the local store directory is created, which is necessary to enable the
standin matcher.

The rm -> 'rm -f' change in the test is to temporarily suppress an error
clearing the cache- as noted, the cache is is not repopulated during convert.
When that is fixed, this can be changed back and the verification errors will
disappear too.
2012-10-23 21:32:19 -04:00
Matt Harbison
8973167c73 largefiles: respect the rev when reading standins in copytostore() (issue3630)
When the rev isn't specified, the standin for the working copy gets read.  But
convert doesn't update the working copy for each cset it processes, so there is
no standin and the 'hg convert' would abort complaining about the standin being
missing.

Note that if the largefile is not in the user cache, 'hg convert' complains
about the largefile itself missing from the destination repo.
2012-10-23 21:07:14 -04:00
Andrew Shadura
73cc2dd06e hgk: no committer please
Generate committer only if we really have it.
Update test-hgk.t accordingly.
2012-10-16 22:19:08 +02:00
Matt Mackall
fd58e8703f i18n: wrap false positives for translation detection 2012-11-25 13:53:47 -06:00
Kevin Bullock
ea70da48ff merge with mpm 2012-11-16 10:01:26 -06:00
Bryan O'Sullivan
9d9a12dfce test-pathencode: more aggressively check for python < 2.6 2012-11-15 22:24:36 -08:00
Bryan O'Sullivan
2fb8bcbaf3 test-pathencode: make a 2.4-safe import of collections 2012-11-15 10:55:32 -08:00
Bryan O'Sullivan
0eefe45ac8 tests: add a randomized test for pathencode
This is a probabilistic test - it generates different test cases on every
run, unless invoked from the command line with a specific seed.

The default number of tests run should make the tests take about a
second to complete on a semi-modern laptop.
2012-11-15 10:04:29 -08:00
Augie Fackler
167f9d08c6 Merge with crew-stable. 2012-11-13 19:32:53 -06:00
YaNan Xu
69a8b90589 convert: add support for converting git submodule (issue3528)
Previously, convert aborted upon encountering a git submodule. This patch
changes it so that it now succeeds. It modifies convert_git to manually generate
'.hgsub' and '.hgsubstate' files for each git revision, so as to convert git sub
modules to non-mercurial subrepositories.
2012-10-29 17:40:13 -07:00
Siddharth Agarwal
e710e102e4 run-tests.py: remove runqueue's results parameter since it is now a global 2012-11-08 14:10:04 -08:00
Siddharth Agarwal
19a33f47fb run-tests: open child-parent pipes in binary mode
Python's pickle is a binary format.
2012-11-10 11:37:41 -08:00
Idan Kamara
34cb035697 grep: don't search past the end of the searched string
'*' causes the resulting RE to match 0 or more repetitions of the preceding RE:

>>> bool(re.search('.*', ''))
>>> True

This causes an infinite loop because currently we're only checking if there was
a match without looking at where we are in the searched string.
2012-11-12 19:27:03 +02:00
Siddharth Agarwal
0f4a538ae3 run-tests: add --time option to log times for each test
--time also prints out the wall-clock time each test takes in descending order.
2012-11-09 14:49:30 -08:00
Siddharth Agarwal
1e050996f6 run-tests: remove resultslock since it serves no useful purpose
Each child process has its own copy of the results dict, so all access to the results dict is serial.
2012-11-09 15:09:35 -08:00
Siddharth Agarwal
c3f43bc1f7 run-tests: use pickle to send results from children to parent
JSON would probably be preferable, but it isn't available for Python 2.4 or 2.5.
2012-11-09 14:42:36 -08:00
simon@laptop-tosh
b228b696db share: always set default path to work with subrepos (issue3518)
set the default path in any case because creating subrepo looks this up.
Subrepos are cloned, not shared.
2012-10-27 12:38:59 +02:00
Matt Mackall
0dddda7cc8 run-tests: backout b3100dcfd155
This deleted work in progress to eliminate child processes for -j.
2012-11-14 18:08:39 -06:00
Bryan O'Sullivan
d644b93727 Merge with stable 2012-11-07 09:59:46 -08:00
Bryan O'Sullivan
e0c05752cb Merge with mpm 2012-11-06 16:49:54 -08:00
Matt Mackall
28b6ee7d27 status: use condwrite to avoid zero-width format string hack 2012-11-06 17:30:47 -06:00
Tomasz Kleczek
fab490ae63 bundle: add revset expression to show bundle contents (issue3487)
bundle() revset expression returns all changes that are present
in the bundle file (no matter whether they are in the repo or not).

Bundle file should be specified via -R option.
2012-10-31 16:23:23 -07:00
Simon Heimberg
d277fc55af run-tests: skip unnecessary operations on the args in the child proces
The arguments are already sorted and never empty.
2012-10-24 23:09:31 +02: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
98f6770b49 clone: activate @ bookmark if updating to it
The message "updating bookmark @ failed!" in test-bookmarks-pushpull.t
is correct, because the changeset that the @ bookmark points to is not
pushed to the target repository.
2012-10-26 14:37:03 +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
Thomas Arendsen Hein
8cb037d432 test-bookmarks.t: check that bookmark "default" is not automatically checked out
This verifies that 7b0bf61addc9 fixes the problem originally reported in
issue3677.
2012-10-26 13:09:55 +02:00