Commit Graph

11 Commits

Author SHA1 Message Date
Mads Kiilerich
f7f618d52d discovery: test coverage for issue4438 / 475a22a41c55 / a720a37e15a3
The randomness in the discovery protocol made this problem hard to reproduce.
The test mocks random.sample to make sure we hit the problem every time. The
set iteration order also made the output unstable ... but with the issue fixed,
it is stable.
2014-11-06 01:48:29 +01:00
Olle Lundberg
8c4c062b30 tests: don't hardcode path to bash interpreter
Use the env binary to figure out the correct bash to use.
Certain systems ships with an ancient version of bash, but the
user might have installed a newer one that is earlier in $PATH.

For example the current version of Mac OS X ships version 3.2.51
of bash, which does not understand new fancy builtins such as
readarray. A user might install a newer version of bash, use that
as their shell and add that path before bin.
2014-03-25 23:07:52 +01:00
Pierre-Yves David
6652b6ffb3 rebase: fix selection of base used when rebasing merge (issue4041)
Prior this changeset, rebasing a merge whose first parent was not in
the rebase lead to wrong and highly conflicting merge. See the in-line
comment for details.

Test have been updated with the data provided by the reported.
2013-10-30 19:45:14 +01:00
Pierre-Yves David
fd3ff2a113 hgweb: add test regarding filtering and hgweb
Since 3230dd238cf7 hgweb is broken with filtering. This changeset add test that
should pass once it is fixed. Test currently broken are commented and will be
uncommented by changeset that fix them.

The filelog test is currently passing because we already have some hack in core
regarding filelog (see 83a1b777fc02).
2013-01-16 11:39:22 -06:00
Tim Henigan
68a1fc4488 update: allow update to existing branches with invalid names (issue3710)
Starting with 049792af94d6, users are no longer able to update a
working copy to a branch named with a "bad" character (such as ':').

Prior to v2.4, it was possible to create branch names using "bad"
characters, so this breaks backwards compatibility.

Mercurial must allow users to update to existing branches with bad
names.  However, it should continue to prevent the creation of new
branches with bad names.

A test was added to confirm that 'hg update' works as expected. The
test uses a bundled repo that was created with an earlier version of
Mercurial.
2012-11-27 08:47:35 -05:00
Patrick Mezard
2c65c226cf localrepo: add setparents() to adjust dirstate copies (issue3407)
The fix introduced in 3509b9cf8f86 was only partially successful. It is correct
to turn dirstate 'm' merge records into normal/dirty ones but copy records are
lost in the process. To adjust them as well, we need to look in the first
parent manifest to know which files were added and preserve only related
records. But the dirstate does not have access to changesets, the logic has to
moved at another level, in localrepo.
2012-04-29 22:25:55 +02:00
Pierre-Yves David
adb2912b0c rebase: add --rev option to rebase
This option allow a strict set of revision to be specified instead of using -s
or -b. Rebase will refuse start if striping  rebased changeset will strip non
rebased changeset. Rebase will refuse to work on set with multiple root.
2011-10-15 20:12:32 +02:00
Nicolas Dumazet
9a74500329 tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Add two changesets to the scenario so that the bundle can be reused
within three tests.

Before:
  @  5: 'F'
  |
  | o  4: 'E'
  |/|
  o |  3: 'D
  | |
  | o  2: 'C'
  |/
  | o  1: 'B'
  |/
  o  0: 'A'

After:
  @  7: 'H'
  |
  | o  6: 'G'
  |/|
  o |  5: 'F'
  | |
  | o  4: 'E'
  |/
  | o  3: 'D'
  | |
  | o  2: 'C'
  | |
  | o  1: 'B'
  |/
  o  0: 'A'

Revisions 0-1 keep the same number/label. Others were translated by
an offset of 2 (2.C -> 4.E)
2011-04-30 17:38:06 +02:00
Nicolas Dumazet
1dd586b3dd tests: introduce a rebase bundle to use with rebase tests
Allows saving a few seconds in test runs by not constructing
over and over the same repository.
2011-04-30 17:38:06 +02:00
Nicolas Dumazet
be93b69b75 tests: create a bundle to bootstrap tests using a remote repository
It should be faster to use a single common bundle instead of
recreating 4 times the same repository manually.
2011-04-30 17:38:06 +02:00
Nicolas Dumazet
274ada7d8c tests: move test bundles in a bundles/ subdirectory 2011-04-30 17:38:06 +02:00