Commit Graph

11 Commits

Author SHA1 Message Date
Thomas Arendsen Hein
21bb7c4cdc tests: make tests work if directory contains special characters
With this quoting tests will work e.g. in "/tmp/foo bar/mercurial/".
2012-04-03 19:06:35 +02: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
Pierre-Yves David
7e4f710bf6 phases: prevent rebase to rebase immutable changeset. 2011-12-27 00:11:22 +01:00
Matt Mackall
a69962e18c branch: warn on branching 2011-12-08 14:32:44 -06:00
Nicolas Dumazet
13a26e7035 tests: move rebase-keep-branch into rebase-named-branches
It's not worth building a repository just to test keep branch
when we can do it our bigger, other, already built repositories.
2011-04-30 17:38:06 +02:00
Nicolas Dumazet
f349f5b9c5 tests: move testcase from rebase-named-branches to rebase-parameters
It saves us a clone of a repository.
2011-04-30 17:38:06 +02:00
Nicolas Dumazet
53cb06c83f tests: simplify test-rebase-named-branches
We were cloning a repo to perform a smoke test that could
have been performed earlier.
2011-04-30 17:38:06 +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
Stefano Tortarolo
40d3a3beb3 rebase: allow for rebasing descendants onto ancestors on different named branches
So far we've been denying rebasing descendants onto ancestors, but there are
situations in which this kind of operation makes perfect sense to me.

Let's say we have made a commit (or more), that belongs to branch 'dev', on
top of the named branch 'stable':

... a (stable) - b (dev)

but then we realize that b should belong to branch 'stable'.
In these cases a rebase means: "move these csets from named branch A to named
branch B" and there isn't a valid reason to deny it.

This patch basically doesn't block it, if source and destination are
on different named branches.
The old behaviour still applies for rebases across the same named branch.

Can you think of any tricky corner cases in which this new behaviour could
lead to problems? (I bet there are tons of them...)

By the way, I created a brand new .t because I feel there should be more
tests I can't think of at the moment.
2011-03-23 01:14:43 +01:00