Commit Graph

20 Commits

Author SHA1 Message Date
Jordi Gutiérrez Hermoso
91e31472eb log: display closing-branch nodes as "_" (BC)
In plain `hg log` there is no indication that a commit closes a
branch. You can use hg log --debug, but this is too verbose. A simple
idea copied from thg and other graphical viewers is to display the
node for a closing-branch commit as a horizontal line.

I think this technically is a BC if we consider the graphlog to be
part of the stdout API, but I really can't imagine who the hell is
parsing the graphlog to determine information about commits.
2014-11-24 16:42:49 -05: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
Mads Kiilerich
554a61dae5 rebase: tell when reopening a closed branch head
Give same 'reopening closed branch head X' message as commit gives.
2013-11-26 03:18:56 +01:00
Mads Kiilerich
6947a0c2f4 tests: introduce test for rebasing on named branches with closed heads 2013-11-16 15:46:29 -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
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