Commit Graph

20 Commits

Author SHA1 Message Date
Mads Kiilerich
7167031347 localrepo: show headline notes in commitctx before showing filenames
commitctx already showed notes with filenames but didn't provide any context.
It is just as relevant to know when manifest or changelog is committed.

So, in addition to filenames, also show headlines 'committing files:',
'committing manifest' and 'committing changelog'.
2014-04-18 13:33:20 +02:00
Augie Fackler
a5ddb1dcfe tests: use $PYTHON instead of hardcoding python
This makes running the testsuite with pypy possible.
2014-10-15 15:35:59 -04:00
Mads Kiilerich
67c67bcdbe mq: upgrade non-plain patches to HG format when setting parent in patchheader
Parent will now always be updated or added when qrefreshing HG patches. Plain
patches will not be changed, but patches that neither are plain nor HG will be
upgraded to HG patches on first refresh.
2014-09-20 17:06:57 +02:00
FUJIWARA Katsunori
5e22c34bd1 mq: report correct numbers for changing "number of guarded, applied patches"
Before this patch, "hg qselect" may report incorrect numbers for
"number of guarded, applied patches has changed", because it examines
"pushable" of patches by the index not in "the series" but in "applied
patches", even though "mq.pushable()" expects the former.

To report correct numbers for changing "number of guarded, applied
patches", this patch uses the name of applied patch to examine
pushable-ness of it.

This patch also changes the result of existing "hg qselect" tests,
because they doesn't change pushable-ness of already applied patches.

This patch assumes that "hg qselect" focuses on changing pushable-ness
only of already applied patches, because:

  - the report message uses not "previous" (in the series) but
    "applied"

  - the logic to pop patches for --pop/--reapply examines
    pushable-ness only of already applied ones (in fact, there are
    some incorrect code paths)
2014-09-12 02:29:19 +09:00
Pierre-Yves David
4dda0af56b mq: drop _cacheabletip usage
Strip have dedicated work around to solve the same problem, strip is even a
fraction faster without that thanks to simpler update process of the branchcache.
2012-12-28 03:42:21 +01:00
timeless@mozdev.org
1bed215302 spelling: succeeded 2012-08-17 13:58:19 -07: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
0e75723add mq: rename --check into --keep-changes
I named it --check because it felt like qpush & co were checking *more*
things to ensure local changes could not be lost. But it has been
pointed on the mailing list that --check is already used by update
command with a meaning almost opposite to this one. An alternative
was --keep but qfold and qdelete already have such an option to preserve
patch files and qfold may be a candidate for --check.

- qpush/qpop/qgoto --check becomes --keep-changes.
- mq.check becomes mq.keepchanges.
- The short option -c is dropped as -k may conflict with existing
  --keep. The availabilitity of mq.keepchanges should not make this too
  painful.
- Fix minor reST mistake in option description.
2012-05-13 14:00:58 +02:00
Patrick Mezard
f06b17a700 mq: introduce mq.check setting
When:

  [mq]
  check = True

is set, qpush, qpop and qgoto behave as if -c/--check were passed. If
incompatible options like -f/--force or --exact are set, this setting is
ignored.

This setting enables what many users expect mq default behaviour to be.
2012-05-12 00:19:30 +02:00
Patrick Mezard
93529cbc7c mq: introduce qgoto --check 2012-05-12 00:19:30 +02:00
Patrick Mezard
b9c8ba9be4 mq: introduce qpush --check
qpush --check let you qpush with uncommitted files not overlapping
patched files.
2012-05-12 00:19:30 +02:00
Patrick Mezard
55a575b59a mq: introduce qpop --check
qpop --check let you qpop with uncommitted files if they do not
intersect with files touched by the popped patches.
2012-05-12 00:19:30 +02:00
Patrick Mezard
22eeeffed3 mq: add --no-backup for qpush/qpop/qgoto 2012-05-11 16:57:26 +02:00
Patrick Mezard
d775dd04bb mq: backup local changes in qpush --force
qpush help says the following about --force:
1- When -f/--force is applied, all local changes in patched files will
   be lost.
2- Apply on top of local changes

In practice, qpush --force will attempt to apply the patch on top of
local changes, and on success will merge them in the pushed patch. On
failure, patched files will contain a mix of local changes (where the
patch could not apply) and a mix of patch changes (were it applied). So,
local changes are less lost than entangled with a mass of other changes.

This patch makes qpush --force backup all locally modified files touched
by the next patch being applied. When multiple patches are being pushed,
this logic is repeated for each patch. Note that modified but
successfully patched files are preserved as well.
2012-05-11 16:18:47 +02:00
Patrick Mezard
b045ed706e mq: backup local changes in qpop --force (issue3433) 2012-05-11 16:17:02 +02:00
Martin Geisler
57e33178d6 mq: print "'foo' 'bar'", not "['foo', 'bar']" when showing guards
The internal list representation of guards was leaking into the
output. The guards were always printed using repr(guard) and that
style was kept.

When "hg qguard -l" prints several guards for a patch, it does so by
joining the names with " " and that style was used for the error
messages too.
2011-05-31 08:47:16 +02:00
Matt Mackall
d0fa4e0180 mq: fix qpush recursion in _findtags when status file is wrong (issue2664)
test from timeless to guard against regressing this
2011-02-28 17:41:40 -06:00
Afuna
acdbba3dff mq: catch attempt to qpush to an earlier patch (issue2587)
We can't assume that all pushable patches early in the series have already been
applied. If a hg qselect is done while you already have patches applied, some
patches with guards may now be pushable, even though they come earlier in the
series.

So instead of checking only applied patches, explicitly check where we are in
the series against the position of the patch we want to qpush to.
2011-02-12 16:08:41 +08:00
Mads Kiilerich
635406bf76 tests: use (esc) for all non-ASCII test output 2010-11-08 01:41:41 +01:00
Matt Mackall
6f39334d7e tests: unify test-mq-qpush-fail 2010-09-26 13:43:21 -05:00