Commit Graph

4926 Commits

Author SHA1 Message Date
Markus Zapke-Gründemann
46ae5d8243 tests: add htmlcov option 2012-01-11 15:38:31 +01:00
Matt Mackall
f2d5e5c061 run-tests: use a list comprehension instead of map 2012-01-12 14:39:02 -06:00
Markus Zapke-Gründemann
9311522001 tests: fix omit path list
All directories need a trailing asterisk. Otherwise the files are not excluded
from coverage.
2012-01-11 15:37:25 +01:00
Steven Brown
a6c2ab15fb tests: make {date|age} template output independent of the current date 2012-01-11 22:18:20 +08:00
Pierre-Yves David
32c99d5daa phases: make outgoing object and discovery aware of exclusion
The outgoing object gains an "excluded" members holding all changesets which
were excluded because there where secret.

The core discovery code now remove secret changeset from discovery by default.
This means that any command relying on discovery will exclude secret changeset.
Most notable one are outgoing and bundle. (But bundle with and explicit
``--base`` still allow to bundle outgoing changeset.
2012-01-11 00:27:46 +01:00
Martin Geisler
e0542a7108 commands: bump copyright year 2012-01-11 15:51:02 +01:00
Pierre-Yves David
a2fe028df9 phases: add a phases command to display and manipulate phases 2012-01-10 19:45:35 +01:00
Ion Savin
029e0ada33 annotate: append newline after non newline-terminated file listings
The last line of a non newline-terminated file would mix with the first line of
the next file in multiple-file listings before this patch.

Possible compatibility issue: no longer possible to tell from the annotate
output if the file is terminated by new line or not.
2012-01-10 10:18:19 +02:00
Pierre-Yves David
c4636298a6 phases: use graph and phase name in exchange test 2012-01-07 17:03:33 +01:00
Pierre-Yves David
47a0f8f964 phases: `{phase}` template keyword display the phase name
``{phaseidx}`` is providing the phase index as integer. This integer
 representation is useful when people need to use the fact that phase are
 ordered.

Test keep using the number version for readability purpose.
2012-01-06 11:20:49 +01:00
Pierre-Yves David
074b67eb86 phases: fix phase synchronization on push
The bugs seemed to show up when element not in future common changeset should
hold new hold phase data.

The whole phase push machinery was rewritten in the process.
2012-01-04 01:12:31 +01:00
Pierre-Yves David
b6988087ea phases: implements simple revset symbol
This changeset adds ``public()``, ``draft()`` and ``secret`` symbol for
revset.
2012-01-06 10:04:20 +01:00
Mads Kiilerich
142d372dec sslutil: show fingerprint when cacerts validation fails 2012-01-09 14:43:24 +01:00
Levi Bard
25e495c812 largefiles: add tests for uncovered codepaths (issue3092)
Add tests for lfconvert codepaths where:
 * largefiles have been both renamed and relinked
 * .hgtags has invalid content
2012-01-08 17:09:01 +01:00
Matt Mackall
0fb748c56c merge with stable 2012-01-09 20:16:57 -06:00
Steven Brown
51a1bd2f20 rebase: reinstate old-style rev spec support for the source and base (issue3181)
As of 1ffaca626da1 (first released as part of Mercurial 2.0), the rebase command
accepted ONLY revsets for the source and base arguments and no longer accepted
old-style revision specifications. As a result, some revision names were no
longer recognised, e.g.

hg rebase --base br-anch
abort: unknown revision 'br'!

These arguments are now interpreted first as old-style revision specifications,
then as revsets when no matching revision is found. This restores backwards
compatibility with releases prior to 2.0.
2012-01-08 23:09:35 +08:00
Dan Villiom Podlaski Christiansen
6ee655e337 canonpath: allow canonicalization of non-existant paths
Such as a copy destination; see the added test.
2012-01-08 15:23:26 +01:00
Levi Bard
5215c2a8d7 largefiles: add precommit hook to check for inappropriate locking
This tests for inappropriate locking (issue3182) by running hg status
as a precommit hook.
2012-01-07 19:11:31 +01:00
Levi Bard
745707ea8a largefiles: fix inappropriate locking (issue3182)
Don't lock/write on operations that should be readonly (status).
Always lock when writing the lfdirstate (rollback).
Don't write lfdirstate until after committing; state isn't actually changed
until the commit is complete.
2012-01-07 19:05:59 +01:00
Na'Tosha Bard
05ebae9a13 largefiles: implement addremove (issue3064)
Implementing addremove correctly in largefiles is tricky, becuase the original
addremove function does not call into any of the add or remove function we've
already overridden in the extension.  So the trick is to implement addremove
without duplicating any code.

This patch implements addremove by pulling out the interesting parts of
override_add() and override_remove() into generic utility functions, and
using those to handle the largefiles in addremove.  Then a matcher is
installed that will ignore all largefiles, and the original addremove
function is called to take care of the regular files in addremove.

A small bit of monkey patching is used to make sure that remove_largefiles()
notifies the user when a file is removed by addremove and also makes sure
the removal of largefiles doesn't interfer with the original addremove's
operation of removing the standin.
2012-01-07 12:42:54 +01:00
Martin Geisler
a6341e1149 merge with stable 2012-01-08 14:50:20 +01:00
Na'Tosha Bard
d2bd6a2acb largefiles: fix output of hg summary (issue3060) 2012-01-08 12:35:47 +01:00
Na'Tosha Bard
0bd0abc6e9 largefiles: fix confusion upon removal of added largefile (issue3176)
This patch makes "hg remove" work the same way on largefiles as it does on
regular Mercurial files.  If you try to remove an added largefile, the removal
fails and you are instead prompted to use "hg forget" to undo the add.
2012-01-08 11:19:51 +01:00
Na'Tosha Bard
c850d0f432 largefiles: clean up and shorten test output by using the same log format everywhere 2012-01-07 15:35:15 +01:00
Martin Geisler
d8334151e6 Remove FSF mailing address from GPL headers
The GPLv3 FAQ suggests to upgrade by

  [...] replace all your existing v2 license notices (usually at the
  top of each file) with the new recommended text available on the GNU
  licenses howto. It's more future-proof because it no longer includes
  the FSF's postal mailing address.

This removes the postal address, but leaves the version number at 2+.
2012-01-06 16:27:13 +01:00
Martin Geisler
cf414756e1 dispatch: lowercase abort message 2012-01-06 16:16:58 +01:00
Kevin Gessner
c57b4c7195 largefiles: display remote errors from putlfile (issue3123) (issue3149) 2012-01-05 07:26:22 -08:00
Matt Mackall
dea868ff61 cmdutil: simplify duplicatecopies 2012-01-05 20:35:10 -06:00
Matt Mackall
48738cad22 copies: rewrite copy detection for non-merge users
The existing copy detection API was designed with merge in mind and
was ill-suited for doing status/diff. The new pathcopies
implementation gives more accurate, easier to use results for
comparing two revisions, and is much simpler to understand.

Test notes:

- test-mv-cp-st.t results finds more renames in the reverse direction now
- test-mq-merge.t was always wrong and duplicated a copy in diff that
  was already present in one of the parent revisions
2012-01-04 17:55:30 -06:00
Matt Mackall
c19e8e450d merge with stable 2012-01-03 17:13:03 -06:00
Matt Mackall
a5d2446886 tests: patch up silly new year's bug 2012-01-03 17:09:26 -06:00
Matt Mackall
8ba239a418 grep: make multiline mode the default (BC)
This is a much more logical way to deal with ^ and $.
Old ^ and $ behavior are available with \A and \Z.
2012-01-03 15:48:58 -06:00
Mads Kiilerich
c180ed9101 encoding: use hint markup for "please check your locale settings"
This will also make test-encoding.t pass on windows. The test would hit some
other code path that already used hint markup.
2011-12-26 15:01:06 +01:00
Mads Kiilerich
32d88164b3 tests: make simple single quotes work with dummyssh on windows
Mercurial assumes that the shell on remote servers over ssh servers uses unix
quoting rules. Tests using dummyssh are however also run on windows where cmd
doesn't parse single quotes like on unix.

This hack replaces the single quotes with double quotes on windows - that is
enough to make test-ssh.t pass after 7bec00a7d7a6.
2011-12-26 15:30:43 +01:00
Mads Kiilerich
a64a2f92d1 tests: ensure platform independent revision hashes in test-notify.t
Makes the test pass again on windows after 6abfec223a8d.
2011-12-26 16:54:43 +01:00
Mads Kiilerich
b08ea9058f tests: ignore slash direction in paths in test-notify-changegroup.t
Fixes testing on windows after 9801fdc244a0.
2011-12-26 16:57:14 +01:00
Pierre-Yves David
7e4f710bf6 phases: prevent rebase to rebase immutable changeset. 2011-12-27 00:11:22 +01:00
Pierre-Yves David
b57da0b2af phases: on copy clone, do not copy phases data if repote is publishing 2011-12-26 13:48:31 +01:00
Pierre-Yves David
4c85722ec4 phases: copy phases data on local clone 2011-12-26 13:47:37 +01:00
FUJIWARA Katsunori
8a4c96d3b4 icasefs: add test for case preservation on case insensitive filesystem
"hg qpush" causes unexpected behavior, if case preservation on case
insensitive filesystem is not enough.

this patch adds the test using mixed-case filenames to reproduce this
problem on any case insensitive filesystems.
2011-12-24 19:16:36 +09:00
FUJIWARA Katsunori
09db6940ae i18n: use "encoding.lower()" to normalize specified string for revset
some problematic encoding (e.g.: cp932) uses ASCII alphabet characters
in byte sequence of multi byte characters.

"str.lower()" on such byte sequence may treat distinct characters as
same one, and cause unexpected log matching.

this patch uses "encoding.lower()" instead of "str.lower()" to
normalize strings for compare.
2011-12-25 20:35:16 +09:00
FUJIWARA Katsunori
9dd2a411a7 i18n: use "encoding.lower()" to normalize specified keywords for log searching
some problematic encoding (e.g.: cp932) uses ASCII alphabet characters
in byte sequence of multi byte characters.

"str.lower()" on such byte sequence may treat distinct characters as
same one, and cause unexpected log matching.

this patch uses "encoding.lower()" instead of "str.lower()" to
normalize strings for compare.
2011-12-25 20:35:16 +09:00
Pierre-Yves David
8abd0aa7c9 phases: do not exchange secret changesets
Any secret changesets will be excluded from pull and push. Phase data are
properly synchronized on pull and push if a changeset is seen as secret locally
but is non-secret remote side.

This patch does not handle the case of a changeset secret on remote but known
locally.
2011-12-22 00:42:25 +01:00
Pierre-Yves David
ef5fe34436 phases: test the new-commit option and proper inheritence of phase 2011-12-22 00:40:46 +01:00
FUJIWARA Katsunori
1a00d3603f merge: check filename case collision between changesets for branch merging
this patch makes branch merging abort when merged changesets have same
file in different case on case insensitive filesystem.

this patch does not prevent linear update which merges between target
and working contexts, because 'branchmerge' is False in such case.
2011-12-16 21:21:27 +09:00
Martin Geisler
19be7012dc largefiles: handle merges between normal files and largefiles (issue3084)
The largefiles extension prevents users from adding a normal file
named 'foo' if there is already a largefile with the same name.
However, there was a loop-hole: when merging, it was possible to bring
in a normal file named 'foo' while also having a '.hglf/foo' file.

This patch fixes this by extending the manifest merge to deal with
these kinds of conflicts. If there is a normal file 'foo' in the
working copy, and the other parent brings in a '.hglf/foo' file, then
the user will be prompted to keep the normal file or the largefile.
Likewise for the symmetric case where a normal file is brought in via
the second parent. The prompt looks like this:

  $ hg merge
  foo has been turned into a largefile
  use (l)argefile or keep as (n)ormal file?

After the merge, either the '.hglf/foo' file or the 'foo' file will
have been deleted. This would cause status to return output like:

  $ hg status
  M foo
  R foo

To fix this, the lfiles_repo.status method is changed so that a
removed normal file isn't shown if there is largefile with the same
name, and vice versa for largefiles.
2011-12-09 17:35:00 +01:00
Martin Geisler
54d4706f56 test-subrepo: test for Issue3153 2011-12-15 16:18:10 +01:00
Martin Geisler
3a9a310829 largefiles: fix 'hg status' abort after merge
If a largefile is introduced on the branch that is merged into the
working copy, then 'hg status' would abort with an error like:

   $ hg status
   abort: .hglf/foo@33fdd332ec: not found in manifest!

The problem was that the largefiles status code only looked in the
first parent for the largefile. Largefiles are now always reported as
modified if they don't exist in the first parent -- this matches the
behavior of localrepo.status for normal files.
2011-12-09 17:34:58 +01:00
Matt Mackall
a69962e18c branch: warn on branching 2011-12-08 14:32:44 -06:00
Patrick Mezard
3a0effcd7b util: fix url.__str__() for windows file URLs
Before:

  >>> str(url('file:///c:/tmp/foo/bar'))
  'file:c%3C/tmp/foo/bar'

After:

  >>> str(url('file:///c:/tmp/foo/bar'))
  'file:///c%3C/tmp/foo/bar'

The previous behaviour had no effect on mercurial itself (clone command for
instance) because we fortunately called .localpath() on the parsed URL.
hgsubversion was not so lucky and cloning a local subversion repository on
Windows no longer worked on the default branch (it works on stable because
2b62605189dc defeats the hasdriveletter() test in url class).

I do not know if the %3C is correct or not but svn accepts file:// URLs
containing it. Mads fixed it in 2b62605189dc, so we can always backport should
the need arise.
2011-12-04 18:22:25 +01:00