Commit Graph

614 Commits

Author SHA1 Message Date
Adrian Buehlmann
721e368ac1 rename util.unlink to unlinkpath 2011-01-02 19:34:41 +01:00
Steve Borho
4ef6c62600 mq: record more data in patchheader class (no behavior changes)
* parse branch and nodeid header lines
* remember the line number where diffs started

Combined, these make mq.patchheader() very useful for parsing and
preserving a patch header through edits. TortoiseHg will use the
nodeid and parent to display these header datums in the graph when
patches are unapplied, and uses diffstartline to parse patch files
using record.parsepatch().
2010-12-31 17:09:38 -06:00
Matt Mackall
49ec3df937 merge with stable 2011-01-01 18:42:04 -06:00
Jacek Sowiński
d5b7a5d84f strip: typo bugfix related to '--nobackup -> --no-backup' rename (issue2377)
'--no-backup' in cmdline means *'no_backup'* in code'
2010-12-31 15:14:51 +01:00
Kevin Bullock
5c61f5f136 mq: update .hgsubstate if subrepos are clean (issue2499)
This patch prevents MQ from creating an inconsistent subrepo state. If
the .hgsub file has been changed, and none of the subrepos have
uncommitted changes, creating or updating a patch (using qnew, qrefresh,
or qrecord) will update .hgsubstate accordingly.

If any subrepos _do_ have uncommitted changes, qnew/qrefresh/qrecord
will abort.

Thanks to pmezard for proposing this solution.
2010-12-07 22:14:43 -06:00
Kevin Bullock
ed11f126c8 backout 0880564992de 2010-12-07 22:14:43 -06:00
Kevin Bullock
79f5039252 mq: ignore subrepos (issue2499)
If MQ allows modifying .hgsub or .hgsubstate in a patch, it can easily
lead to an inconsistent subrepo state. This patch prevents qrefresh from
adding any modifications to .hgsub or .hgsubstate to a patch. The user
is warned that these files are not included in the patch.

The tests test both the slightly irrational and the pathological cases.
2010-11-16 13:06:07 -06:00
Martin Geisler
02c90a666d qnew: distinguish between existing file and directory (issue2464) 2010-10-29 14:06:06 +02:00
Martin Geisler
3bd0773df5 qnew: give better feedback when doing 'hg qnew foo/' (issue2464) 2010-10-29 15:25:21 +02:00
Patrick Mezard
1ba47f6d3d mq: qrename should not touch the dirstate if src is untracked (issue2460) 2010-10-28 22:04:33 +02:00
Thomas Arendsen Hein
6fd4e6aaec coding style: fix gratuitous whitespace after Python keywords 2010-12-03 11:30:45 +01:00
Matt Mackall
8e2f7d14eb merge with stable 2010-11-22 13:11:46 -06:00
Steve Losh
72ee3af1d8 mq: add an '-e/--exact' option to qpush
This patch adds an '--exact/-e' option to qpush that will try to push the
patches in the correct location in the DAG.  Specifying this option does the
following:

* If --move is specified, abort. It makes no sense to move a patch to the front
  of the queue and try to apply it to its parent, because its parent is one of
  the patches we just moved it in front of!
* If patches are already applied, abort. We don't want patch changesets
  scattered throughout the DAG.
* If local changes are present, abort unless --force is used, as usual.
* Find the first patch we're going to push (if we're pushing multiple patches
  with a target or --all).
* If that patch doesn't have a parent, abort, obviously.
* If the parent doesn't exist in the repo, abort.  Something is wrong.
* Update to the parent, then continue pushing the patches as normal.
2010-11-17 21:18:44 -05:00
Martin Geisler
6a3d9310ab code style: prefer 'is' and 'is not' tests with singletons 2010-11-22 18:15:58 +01:00
Martin Geisler
8e20190ebb mq: fix comment to reflect change in 900672e7d1f7 2010-11-17 09:06:38 +01:00
Kevin Bullock
fb0785e3d1 mq: clean up unused variable in qrefresh
Removes the unused variable `aa2` that holds the list of deleted files
returned from repo.status().
2010-11-16 13:06:04 -06:00
Nicolas Dumazet
f4ae25089e mq: use sets instead of lists for speed
The code eventually converts data through sets to ensure unicity:
do it earlier to allow faster __contains__ lookups and avoid
`del l[l.index(x)]` kind of code.
2010-11-07 22:03:28 +09:00
Martin Geisler
41f0f0af10 mq: expand 'repo' -> 'repository' in error message 2010-10-26 18:01:35 +02:00
Martin Geisler
79f93adec2 mq: mark strings that should not be translated 2010-10-26 17:59:21 +02:00
timeless
788c88e3ef qrestore: trying to improve the English 2010-10-26 14:41:58 +03:00
Wagner Bruna
ac73474eb7 mq: mark string for i18n 2010-10-20 12:29:55 -02:00
Wagner Bruna
e934c64ad0 strip: support revision sets 2010-10-18 18:31:38 -02:00
Erik Zielke
69888281fd mq: switched to `` around * * *
So it can be parsed by rst.
2010-10-18 14:37:50 +02:00
Augie Fackler
42c8b2cf07 termwidth: move to ui.ui from util 2010-10-10 10:06:36 -05:00
Augie Fackler
35723d1610 strip: add --keep flag to avoid modifying wc during strip
Fixes issue1564.
2010-10-09 11:02:11 -05:00
Dan Villiom Podlaski Christiansen
cf9291fa61 mq: silence spurious output.
When using a versioned patch repository, you would get a spurious
warning when deleting and adding the same patch.

Before:

  $ hg qdelete --keep 3.diff
  $ hg qimport --existing 3.diff
  adding 3.diff to series file
  3.diff already tracked!

After:

  $ hg qdelete --keep 3.diff
  $ hg qimport --existing 3.diff
  adding 3.diff to series file
2010-10-09 11:53:48 -05:00
Dan Villiom Podlaski Christiansen
f7370d289b mq: handle deleting the same patch twice in one command (issue2427) 2010-10-09 10:36:50 -05:00
Erik Zielke
e46861ba72 mq: Removed extra ... in short help for qdelete
Update to d7d43954f372, which left a ... too much, after removing
-r [REV]
2010-09-30 12:37:45 +02:00
Erik Zielke
0e2a10ee21 mq: removed short option in help for deprecated options
Removed help for deprecated short option for:
  -n NAME for qpush
  -n NAME for qpop
  -r REV for qdelete|qremove|qrm
2010-09-27 11:27:58 +02:00
Mads Kiilerich
bf24a5099a mq: explain qpush -f better 2010-09-29 01:32:50 +02:00
Erik Zielke
9f22da182d mq: removed return from callers to patchheader.qseries
Some callers to patchheader.qseries returned the value
further, but pathcheader.qseries does not explicitly
return anything. It was confusing this was returned
further
2010-09-23 15:18:10 +02:00
Erik Zielke
f65e38950f mq: added return 0 on success
I have added return 0 on success in docstrings of
the different not deprecated mq commands.
2010-09-23 16:56:32 +02:00
Martin Geisler
1bb28d1ed3 merge with stable 2010-09-27 10:20:19 +02:00
Erik Zielke
0c1276bb2d mq: removed -m from qpush help (Issue2401)
The -m option became deprecated in changeset 1e63d4dee4f6,
but the option still appeared in the help line for the qpush
command
2010-09-27 09:19:48 +02:00
Patrick Mezard
23ced90ea0 mq: always require --force when pushing patches (issue2363)
--force was not necessary when passing --rev since cb494d252290, but this
behaviour is usually harmful when branch names are passed instead of explicit
revisions.
2010-09-22 23:51:10 +02:00
Dan Villiom Podlaski Christiansen
4a1790f181 mq: fix the deprecation comment for qsave & qrestore.
Changeset 1e63d4dee4f6 deprecated qsave and qrestore. In the
deprecating comment, users were referred to 'rebase --mq' which -- at
the time the message was written -- didn't exist. Currently, on the
default branch, rebase *does* take a '--mq' option, but it probably
doesn't do what Dirkjan expected it to do when he wrote the message.

In the original, deprecating commit, little context was provided as to
why this change was made. Based on my recollection, concensus at the
Paris Sprint in February 2010 was that one of the problems with MQ was
that it exposed far too many commands. Notable among these were qsave
& qrestore: very few core developers understood what they did and even
fewer (none, IIRC) actually used them. However, they couldn't be
removed; not only do the usual backwards compatibility reasons apply,
but the hg book refers to them.
2010-09-20 13:31:02 +02:00
Patrick Mezard
979ccf4590 Use lexists() instead of exists() where appropriate 2010-09-20 21:46:56 +02:00
Erik Zielke
c732a9771b Use note admonition 2010-09-22 16:23:55 +02:00
Matt Mackall
b05cd46be9 merge with stable 2010-09-22 18:29:41 -05:00
Matt Mackall
6b5c5e35ef merge with stable 2010-09-20 16:56:57 -05:00
Patrick Mezard
614db673f4 Merge with stable 2010-09-20 22:29:13 +02:00
Christian Ebert
e3631413e0 mq: rename strip --nobackup option to --no-backup (issue2377)
Same option name as for hg revert --no-backup.
Deprecate strip --nobackup.
2010-09-14 22:11:53 +02:00
Christian Ebert
3cef19604e mq: consistently use opts.get() to prevent potential KeyError 2010-09-14 22:11:46 +02:00
Martin Geisler
112ea7d5ed patch: break import cycle with cmdutil
The patch module imported cmdutil but used it only in updatedir.
2010-09-13 13:08:09 +02:00
Patrick Mezard
de8b1fa045 mq: add newline after qfold warning 2010-09-10 22:36:04 +02:00
Martin Geisler
5f46f16fb7 Lowercase error messages 2010-08-29 22:37:58 +02:00
Martin Geisler
cb36142754 Merge with stable 2010-08-29 22:55:37 +02:00
Brodie Rao
0f9d940cb9 cleanup: remove unused variables 2010-08-27 13:32:40 -04:00
Dan Villiom Podlaski Christiansen
5e79668de4 mq: extend support for the --mq argument to extension commands
This allows commands like `purge' to accept the --mq option.
2010-08-13 16:05:08 +02:00
Matt Mackall
eef168b604 merge with stable 2010-08-19 10:25:41 -05:00