Commit Graph

24 Commits

Author SHA1 Message Date
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
Mads Kiilerich
efec0f77a8 rebase: improve error message for empty --source set
Before, it just said 'nothing to rebase' in this case. Now, it aborts
mentioning the reason: 'empty "source" revision set'.

Specifying revisions that cannot be rebased is a 'soft' error, but specifying
an empty set deserves an abort that explains exactly what the problem is.
2013-11-17 18:21:58 -05:00
Mads Kiilerich
c8d7c5a8c0 rebase: improve error message for empty --rev set
Before, it just said 'nothing to rebase' in this case. Now, it aborts
mentioning the reason: 'empty "rev" revision set'.

Specifying revisions that cannot be rebased is a 'soft' error, but specifying
an empty set deserves an abort that explains exactly what the problem is.
2013-11-16 15:46:29 -05:00
Mads Kiilerich
1ad0732dbb rebase: test for empty dest revision 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
Bryan O'Sullivan
33e74866b9 summary: indicate if a rebase is underway 2013-05-14 11:23:17 -07:00
Bryan O'Sullivan
b571e7ddcf summary: add tests for some extensions we plan to modify 2013-05-14 11:23:17 -07:00
Augie Fackler
be59bb31f7 dispatch: exit with status 1 for an InterventionRequired exception (bc) 2013-02-08 16:17:46 -06:00
Augie Fackler
60b871ef75 rebase: switch from util.Abort to util.InterventionRequired where appropriate (bc) 2013-02-08 16:27:59 -06: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
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00
Patrick Mezard
47c2d10d02 rebase: make --dest understand revsets 2012-05-01 10:14:35 +02:00
Patrick Mezard
2b7ed041e6 test-rebase-parameters: more tests for revset/opts
- --source and revset
- --base and revset
- --rev and revset
- --rev and --source combination
- --rev and --base combination
2012-04-29 16:18:46 +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
Pierre-Yves David
7e4f710bf6 phases: prevent rebase to rebase immutable changeset. 2011-12-27 00:11:22 +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
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
fc02c73f8c tests: change test-rebase-parameters to use bundle/rebase.hg 2011-04-30 17:38:06 +02:00
Stefano Tortarolo
85a97bc519 rebase: add --tool argument for specifying merge tool 2011-04-02 11:07:05 +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