Commit Graph

14 Commits

Author SHA1 Message Date
Mads Kiilerich
58681faacf rebase: fix wrong 'no changes to commit' when using --collapse
--collapse will do that rebase doesn't commit until the final commit. The lack
of a new commit would make it look like the rebase didn't contribute any
changes.

Instead, only warn about no commits when not using --collapse.
2015-10-19 16:29:35 +02: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
046399e6dc rebase: show warning when rebase creates no changes to commit
Similar to graft:
  note: rebase of 6:eea13746799a created no changes to commit
2014-12-10 06:20:35 +01: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
Augie Fackler
401a23725d rebase: fix bug that caused transitive copy records to disappear (issue4192)
The defect was that copies were always duplicated against the target
revision, rather than the first parent of the revision being
rebased. This produced nominally correct results if changes were
rebased one at a time (or with --collapse), but was wrong if we
rebased a sequence of changesets which contained a sequence of copies.
2014-06-07 15:23:12 -04: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
Brendan Cully
94ee9d1cb5 tests: check path separator in moves 2013-05-03 14:19:30 -07:00
Matt Mackall
5e321b6e3e setparents: drop copies from dropped p2 (issue3843) 2013-02-28 21:29:31 -06:00
Siddharth Agarwal
28f04a41d2 copies: do not track backward copies, only renames (issue3739)
The inverse of a rename is a rename, but the inverse of a copy is not a copy.
Presenting it as such -- in particular, stuffing it into the same dict as real
copies -- causes bugs because other code starts believing the inverse copies
are real.

The only test whose output changes is test-mv-cp-st-diff.t. When a backwards
status -C command is run where a copy is involved, the inverse copy (which was
hitherto presented as a real copy) is no longer displayed.

Keeping track of inverse copies is useful in some situations -- composability
of diffs, for example, since adding "a" followed by an inverse copy "b" to "a"
is equivalent to a rename "b" to "a". However, representing them would require
a more complex data structure than the same dict in which real copies are also
stored.
2012-12-26 15:04:07 -08: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
Stefano Tortarolo
c32fbcbea1 rebase: don't mark file as removed if missing in parent's manifest (issue2725) 2011-03-27 13:34:20 +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