Commit Graph

22 Commits

Author SHA1 Message Date
Patrick Mezard
7ca23e70fa transplant: do not rollback on patching error (issue3379)
Otherwise, all transplanted revisions are gone and the failing one cannot be
fixed (unless it is the first one).

I do not know what is the expected behaviour with rollback, probably something
pull-like. Non-conflicting cases should work as previously. But something like:

  $ hg transplant r1 r2
  commiting r1 as c1
  failing r2
  $ hg transplant --continue
  committing r2 as c2
  $ hg rollback

would reset the repository to its state before the "transplant --continue"
instead of the whole transplant session. To fix this we might need a way to
open an existing journal file, not sure this is worth the pain.
2012-04-22 16:40:38 +02:00
Steven Stallion
4915686ba1 transplant: permit merge changesets via --parent
This change permits the transplant extension to operate on merge
changesets by way of --parent.  This is particularly useful for
workflows which cherrypick branch merges rather than each commit
within a branch.
2012-04-10 23:24:12 -07:00
Mads Kiilerich
8415df7277 tests: use 'hghave serve' to guard tests that requires serve daemon management 2011-11-07 03:24:53 +01:00
Greg Ward
aac3e5d5ea transplant: wrap a transaction around the whole command 2011-10-04 19:43:45 -04:00
Matt Mackall
2f01bc4c58 merge with stable 2011-05-06 11:51:18 -05:00
Idan Kamara
9afabe8fdd transplant: fix revset doc 2011-05-06 15:37:38 +03:00
Patrick Mezard
7b07c85acf test-transplant: fix missing file addition 2011-04-25 21:11:28 +02:00
Patrick Mezard
614c31dde4 merge with stable 2011-04-25 21:20:44 +02:00
Brendan Cully
f05749f48c Fix transplant error message to correspond with test 2011-03-28 21:36:29 -07:00
Luke Plant
bd1d8463c8 transplant: fix crash if filter script munges log file
This fixes an UnboundLocalError crash if the filter script removes the
'User' or 'Date' lines from the log file.
2011-03-28 21:17:32 +01:00
Mads Kiilerich
8e085520f4 tests: use (esc) instead of other kinds of string escaping 2010-11-08 01:41:42 +01:00
Kevin Bullock
15da3ac7f2 pull: silence spurious 'requesting all changes' message
When issuing `hg pull -r REV` in a repo with no common ancestor with the
remote repo, the message 'requesting all changes' is printed, even though only
the changese that are ancestors of REV are actually requested. This can be
confusing for users (see
http://www.selenic.com/pipermail/mercurial/2010-October/035508.html).

This silences the message if (and only if) the '-r' option was passed.
2010-10-20 17:38:21 -05:00
Patrick Mezard
dd00c736bd test-transplant: test transplanted() revset 2010-10-22 22:58:17 +02:00
Martin Geisler
3d112b3042 tests: added a short description to issue numbers
Many tests already had a short line to describe what IssueXXX is
about. I find that quite useful when reading a test.
2010-09-24 10:13:49 +02:00
Brodie Rao
b5fe0d906e tests: add glob matching for unified tests
This adds a " (glob)" marker that works like a simpler version of
(re): "*" is converted to ".*", and "?" is converted to ".".

Both special characters can be escaped using "\", and the backslash
itself can be escaped as well.

Other glob-style syntax, like "**", "[chars]", or "[!chars]", isn't
supported.
2010-09-22 16:06:02 -05:00
Brodie Rao
7d7d96bd74 tests: require regexes in unified tests to be marked with " (re)"
Consider this test:

  $ hg glog --template '{rev}:{node|short} "{desc}"\n'
  @  2:20c4f79fd7ac "3"
  |
  | o  1:38f24201dcab "2"
  |/
  o  0:2a18120dc1c9 "1"

Because each line beginning with "|" can be compiled as a regular
expression (equivalent to ".*|"), they will match any output.

Similarly:

  $ echo foo


The blank output line can be compiled as a regular expression and will
also match any output.

With this patch, none of the above output lines will be matched as
regular expressions. A line must end in " (re)" in order to be matched
as one.

Lines are still matched literally first, so the following will pass:

  $ echo 'foo (re)'
  foo (re)
2010-09-22 16:06:00 -05:00
Matt Mackall
08439e0f2d tests: add exit codes to unified tests 2010-09-16 17:51:32 -05:00
Martin Geisler
cc612c476f tests: remove unneeded -d flags
Many tests fixed the commit date of their changesets at '1000000 0' or
similar. However testing with "Mon Jan 12 13:46:40 1970 +0000" is not
better than testing with "Thu Jan 01 00:00:00 1970 +0000", which is
the default run-tests.py installs.

Removing the unnecessary flag removes some clutter and will hopefully
make it clearer what the tests are really trying to test. Some tests
did not even change their output when the dates were changed, in which
case the -d flag was truly irrelevant.

Dates used in sequence (such as '0 0', '1 0', etc...) were left alone
since they may make the test easier to understand.
2010-09-02 23:22:51 +02:00
Martin Geisler
cb36142754 Merge with stable 2010-08-29 22:55:37 +02:00
Nicolas Dumazet
6e81695eb4 tests: unify test-transplant 2010-08-12 22:14:19 +09:00
Patrick Mezard
ef8d429854 transplant: add "transplanted" keyword
$ hg log --template '{rev} {transplanted}\n'
  7 a53251cdf717679d1907b289f991534be05c997a
2011-03-17 22:17:27 +01:00
Luke Plant
6db67a02e4 transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Sometimes it is necessary to know the original revision ID in order to
correctly rewrite the patch or commit message when transplanting.  This
patch follows the pattern set by the existing 'HGUSER' environment variable,
and adds a test that covers both HGUSER and HGREVISION.
2011-03-11 15:48:44 +00:00