Commit Graph

13 Commits

Author SHA1 Message Date
Eric Sumner
a01d77c360 repair: setup hookargs when processing bundle2s
addchangegroup() modifies its behavior based on the transaction source.
This is incorrect for bundle2 repair files, causing rebases to abort when this
option is enabled.

This diff specifies the source type in the way recommended by comments in
bundle2.py and adds a test to ensure that rebases with the experimental option
work successfully.
2015-02-20 13:55:01 -08:00
Durham Goode
2591767a70 bundles: do not overwrite existing backup bundles (BC)
Previously, a backup bundle could overwrite an existing bundle and cause user
data loss. For instance, if you have A<-B<-C and strip B, it produces backup
bundle B-backup.hg. If you then hg pull -r B B-backup.hg and strip it again, it
overwrites the existing B-backup.hg and C is lost.

The fix is to add a hash of all the nodes inside that bundle to the filename.
Fixed up existing tests and added a new test in test-strip.t
2015-01-09 10:52:14 -08:00
Mads Kiilerich
0419ad5c23 rebase: show more useful status information while rebasing
Show status messages while rebasing, similar to what graft do:
  rebasing 12:2647734878ef "fork" (tip)

This gives more context for the user when resolving conflicts.
2014-12-09 03:45:26 +01:00
Mads Kiilerich
b3802652b5 tests: make 'saved backup' globbing less narrow in rebase tests
Globbing the hash made it harder to maintain tests with run-tests -i when it
was so far by the generated test output.

The hashes are stable and we just need to add a (glob).
2014-12-07 20:04:45 +01: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
Kevin Bullock
f1b0314e82 tests: fix some slash-based Windows failures 2012-12-20 13:49:31 -06:00
Pierre-Yves David
39909ce228 rebase: fix pull --rev options clashing with --rebase (issue3619)
Rebase also have a plain `--rev` option used to select the rebase set (as
`--base` or `--source` would). But the content of the --rev option was intended
for the remote repo and is irrelevant for the local rebase operation. We expect
`hg pull --rebase` to stick with the default behavior here:

    hg rebase --base . --dest tip(branch(.))

The `rev` option is dropped from the option passed to rebase.
2012-11-29 16:37:15 +01: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
Matt Mackall
39e25f975a rebase: move bookmarks as needed with pull --rebase (issue3285) 2012-03-04 17:12:12 -06: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
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