Commit Graph

23 Commits

Author SHA1 Message Date
Mads Kiilerich
0e8795ccd6 spelling: fixes from spell checker 2014-04-13 19:01:00 +02:00
Pierre-Yves David
b563457396 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Before this patch rebase crashed badly when it happend. (not abort, crash).

Fix courtesy of Matt Mackall.
2014-01-31 15:13:15 -08:00
Mads Kiilerich
3b3d94dbd6 rebase: improve error message for --base being empty or causing emptiness
Before it just said 'nothing to rebase'.

Now 'if "base" is an empty set:
  abort: empty "base" revision set - can't compute rebase set

If the set of changesets to rebase can't be found from "base", it will fail as
before but with more explanation of what the problem was.

The name of the "base" option is not obvious - it is more like "samples
identifying the branch to rebase". The error messages for problems with the
specified "base" value will use that term and might thus also not be obvious,
but at least they are consistent with the option name. The name "base" will not
be used if the base only was specified implicitly as the working directory
parent.
2013-11-17 18:21:58 -05:00
Martin Geisler
7316194bdf tests: don't load unnecessary graphlog extension
Since graphlog is in core, we can use 'hg log -G' instead.
2013-11-22 19:14:17 +01:00
Pierre-Yves David
a9b7960ae6 rebase: preserve working directory parent (BC)
Prior to this changeset, rebase always left the working directory as a parent of
the last rebased changeset. The is dubious when, before the rebase, the working
directory was not a parent of the tip most rebased changeset.

With this changeset, we move the working directory back to its original parent.
If the original parent was rebased, we use it's successors.

This is a step toward solving issue3813 (rebase loses active bookmark if it's
not on a head)
2013-10-14 16:12:29 +02:00
Siddharth Agarwal
a7818c164f rebase: check no-op before checking phase (issue3891)
This could lead to user confusion, because phases aren't really involved at
all when attempting to perform a no-op rebase.
2013-04-18 14:28:06 -07:00
Mads Kiilerich
5787baee50 spelling: fix some minor issues found by spell checker 2013-02-10 18:24:29 +01:00
Pierre-Yves David
7e632ae757 rebase: support multiple roots for rebaseset
We have all the necessary mechanism to rebase a set with multiple roots, we only
needed a proper handling of this case we preparing and concluding the rebase.
This changeset des that.

Rebase set with multiple root allows some awesome usage of rebase like:

- rebase all your draft on lastest upstream

  hg rebase --dest @ --rev 'draft()'

- exclusion of specific changeset during rebase

  hg rebase --rev '42:: - author(Babar)'

-  rebase a set of revision were multiple roots are later merged

  hg rebase --rev '(18+42)::'
2013-01-17 00:35:01 +01:00
Mads Kiilerich
ebd808f364 tests: add missing 'backup bundle' path glob in test-rebase-scenario-global.t
Introduced by d13aaf5669b3.
2012-06-22 00:52:14 +02:00
Pierre-Yves David
aa99ac6df5 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Rebase now behaves as if --detach was always passed. Non-merges are
rebased as non-merges, regardless of their parent being an ancestor of
the destination. Merges will usually be rebased as merges unless both of
their parents are ancestors of the destination, or one of their parents
is pruned when rebased.

This only alters the behavior of rebase when using the --source/--rev
options. --detach option is deprecated.

All test changes were carefully validated.
2012-06-20 20:08:57 +02:00
Mads Kiilerich
d94d866bcb tests: add missing accept of native pathname separator 2012-04-28 01:55:39 +02:00
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
Wagner Bruna
32e015e05a rebase: drop uppercase in abort message 2012-01-20 12:04:45 -02:00
Alain Leufroy
fd923bd6e3 rebase: fix phases movement
Rebase now try to keep the phases of source changesets.
2012-01-17 09:12:14 +01:00
Pierre-Yves David
7e4f710bf6 phases: prevent rebase to rebase immutable changeset. 2011-12-27 00:11:22 +01:00
Mads Kiilerich
8c22a0ec28 tests: make (glob) on windows accept \ instead of /
Globbing is usually used for filenames, so on windows it is reasonable and very
convenient that glob patterns accepts '\' or '/' when the pattern specifies
'/'.
2011-11-07 03:25:10 +01: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
Pierre-Yves David
92a70ff8aa rebase: use revset as soon as possible in internal logic
The buildstate function now take a set of revs. Logic related to --source and
--base option have been moved in the main rebase function.

In the process this fixes a bug where the wrong source changeset might be pick.
This explain the changes in hgext/rebase.py
2011-10-15 19:07:51 +02:00
Pierre-Yves David
d772591150 rebase: allow rebase to ancestor (issue3010)
We only deny rebasing onto direct parent. Thanks to the ancestor argument of
merge. the "implementation" of this feature only consist in loosing the check
and imply detach when rebasing on ancestor.
2011-09-19 16:57:13 +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
Mads Kiilerich
3174ff376b tests: remove redundant globs
Many globs now just match $TESTTMP and is no longer needed.
2010-10-08 22:36:10 -05:00
Adrian Buehlmann
1f4e98cf76 tests: unify test-rebase* 2010-10-01 16:10:06 +02:00