Commit Graph

241 Commits

Author SHA1 Message Date
Matt Mackall
63cc8c83c8 transform a bunch of print statements to appropriate ui calls 2008-01-18 10:48:25 -06:00
Peter Arrenbrecht
30621bccda mq: add --currentdate and --date options to qnew and qrefresh
These options make qnew add and qrefresh update a "# Date "-style
header line. This allows proper recording of creation / last
modification dates of patches in patch queues.

Note that `qrefresh -D` only updates existing header lines. It never
adds them, and does not warn about this. This is because I expect
people to have `[default] qrefresh -D` in their .hgrc so patches with
tracked dates get updated, others are left unchanged. The suggested
setup in .hgrc is, in fact,

  [default]
  qnew = -D -U
  qrefresh = -D

I tried to not mix header styles, so `qnew -D -U` now writes the user in
"# User "-style, while `qnew -U` still writes it "From: "-style. Also, if
`qrefresh -U` must add the user, it does so in "# User "-style if the
header contains a "# HG changeset patch" line. (This is caused by mq
not supporting the "Date: "-style header line at all - a reasonable choice
given its standard date format.)
2008-01-02 16:24:13 +01:00
peter.arrenbrecht@gmail.com
86c52a7365 mq: add --currentuser and --user options to qnew and qrefresh
These options make qnew and qrefresh add/update the "From:" header (or, if present,
the "# User" header). This allows proper attribution of patches in patch queues
with multiple contributors.
2007-12-19 22:36:18 +01:00
Peter Arrenbrecht
977c33f8b5 mq: drop obsolete reference to 'qversion' 2007-12-13 20:35:42 +01:00
Patrick Mezard
8ae803be30 mq: avoid qnew committing everything on invalid paths (issue 803)
If paths are supplied but resolve to nothing, localrepo.commit() is called with an empty set and commits the whole dirstate. Avoid this by passing the match function to commit.
2007-11-20 14:31:58 +01:00
Alexis S. L. Carvalho
0086f97dc7 mq: really remove undo after a qpush (and after a strip)
For qpush, removeundo has to be called after the transaction has finished.

strip may use unbundle, which also leaves an undo file.

Fixes issue780.
2007-11-09 20:21:35 -02:00
Matt Mackall
21d438d5c0 mq: clarify queue top message 2007-10-09 17:22:38 -05:00
Alexis S. L. Carvalho
ddf41e005d Merge with crew-stable 2007-09-24 19:14:18 -03:00
Alexis S. L. Carvalho
38a7ae7001 mq: fix qrefresh -e with no patches applied 2007-09-24 19:00:11 -03:00
Brendan Cully
92a19d3a72 mq: fix regression in c5d80ff6828f
It caused qrefresh; qrefresh -X addedfile to leave the file as normal in dirstate.
It should be marked added on the second pass.
2007-09-10 15:00:05 -07:00
Alexis S. L. Carvalho
714fa94597 Merge with crew-stable 2007-08-27 02:21:58 -03:00
Alexis S. L. Carvalho
420ceda070 avoid double slash problem mentioned in issue695 2007-08-27 01:44:35 -03:00
Brendan Cully
461732b80c mq: some improvements to header rewriting (closes #690)
Tested with qrefresh -m against the mm series.
2007-08-23 13:59:52 -07:00
Alexis S. L. Carvalho
a345c2c9da merge: forcefully mark files that we get from the second parent as dirty
After a hg merge, we want to include in the commit all the files that we
got from the second parent, so that we have the correct file-level
history.  To make them visible to hg commit, we try to mark them as dirty.

Unfortunately, right now we can't really mark them as dirty[1] - the
best we can do is to mark them as needing a full comparison of their
contents, but they will still be considered clean if they happen to be
identical to the version in the first parent.

This changeset extends the dirstate format in a compatible way, so that
we can mark a file as dirty:

Right now we use a negative file size to indicate we don't have valid
stat data for this entry.  In practice, this size is always -1.

This patch uses -2 to indicate that the entry is dirty.  Older versions
of hg won't choke on this dirstate, but they may happily mark the file
as clean after a full comparison, destroying all of our hard work.

The patch adds a dirstate.normallookup method with the semantics of the
current normaldirty, and changes normaldirty to forcefully mark the
entry as dirty.

This should fix issue522.

[1] - well, we could put them in state 'm', but that state has a
different meaning.
2007-08-23 01:48:29 -03:00
Brendan Cully
5547c2d64a Merge with crew-stable 2007-08-15 16:22:12 -07:00
Brendan Cully
ac725f5988 mq: truncate patch just before rewriting header 2007-08-15 16:20:10 -07:00
Bryan O'Sullivan
3899e7b033 mq: teach qpop about symlinks 2007-08-09 20:16:00 -07:00
Benoit Boissinot
ce6a51c4eb refactor options from cmdtable
- add extracommitopts for user and date
- factor stuff
2007-08-08 12:27:20 +02:00
Alexis S. L. Carvalho
5af674774c del transaction before lock before wlock
This way rollbacks happen while the repo is still locked.

Deleting lock before wlock is not strictly necessary, but is
more consistent with the locking order.
2007-08-02 01:56:08 -03:00
Patrick Mezard
70ab7b4b41 mq: add qnew --git option 2007-07-28 20:15:54 +02:00
Matt Mackall
3dfe783ec5 transactions: avoid late tear-down (issue641)
We use weak references (ugh) to avoid having to manually delete
transaction references out of each call frame when an exception occurs.
2007-07-22 14:53:57 -05:00
Matt Mackall
3a3bd8ec5b Make repo locks recursive, eliminate all passing of lock/wlock 2007-07-21 16:02:10 -05:00
Matt Mackall
3e13c68628 Use try/finally pattern to cleanup locks and transactions 2007-07-21 16:02:10 -05:00
Matt Mackall
c2967290a5 dirstate: add __contains__ and make __getitem__ more useful
dirstate.state(f) == '?' -> f not in dirstate
dirstate.state(f) -> dirstate[f]
2007-07-21 16:02:09 -05:00
Matt Mackall
bab511ec55 dirstate: make wjoin function private 2007-07-21 16:02:09 -05:00
Matt Mackall
cf691df912 dirstate: break update into separate functions 2007-07-21 16:02:09 -05:00
Bryan O'Sullivan
3ab73cd145 mq: autodetect an existing git patch during qrefresh (issue 491) 2007-07-16 16:50:47 -07:00
Brendan Cully
98b8fae908 mq: improve qclone error handling when patch directory is not a repository. 2007-07-10 09:52:32 -07:00
Bryan O'Sullivan
e1c7de520a mq: autodetect an existing git patch during qrefresh (issue 491) 2007-07-16 16:50:47 -07:00
Brendan Cully
edeeaca988 mq: more qdelete help text tweaks 2007-06-28 09:19:08 -07:00
Brendan Cully
98fb3fa634 mq: require patch argument or revision for qdelete 2007-06-28 08:42:43 -07:00
Thomas Arendsen Hein
0b7147a667 Updated command tables in commands.py and hgext extensions.
- Marked for translation where extensions already had _()
- Corrected indentation
- fixed a few synopsises
2007-06-26 22:38:57 +02:00
Brendan Cully
23fe084573 mq: regularize patch header creation.
Do not prefix qnew patches with [mq]: when a message has been given.
Always use [mq]: as the prefix for generated commit messages.
2007-06-25 15:57:01 -07:00
Brendan Cully
6cc7a712e7 mq: support qnew -I/-X and file name lists 2007-06-25 11:13:27 -07:00
Brendan Cully
4aac760bf3 Merge with mpm 2007-06-25 10:34:53 -07:00
Brendan Cully
22d4a3bbc0 mq: document that qinit -c may be run later 2007-06-25 09:49:40 -07:00
Matt Mackall
9a11c35355 strip: move strip code to a new repair module 2007-06-25 01:26:44 -05:00
Matt Mackall
c8f5240b24 strip: simplify bundle helper 2007-06-25 01:22:45 -05:00
Matt Mackall
e2973b5e3e strip: pull core strip logic into its own function 2007-06-24 18:22:40 -05:00
Matt Mackall
e957b05434 localrepo and dirstate: rename reload to invalidate
We want to avoid actually reloading if possible.
2007-06-18 13:24:34 -05:00
Alexis S. L. Carvalho
c623e457f8 mq: reduce matcher abuse
The match function should match only the files we're interested in.
2007-06-13 21:39:45 -03:00
Alexis S. L. Carvalho
8ece65da4d mq: grab locks before starting a transaction 2007-06-13 19:15:58 -03:00
Matt Mackall
7daba33088 dispatch: move dispatching code to cmdutil 2007-06-11 21:09:24 -05:00
Matt Mackall
8a16e5c578 mq: pass a URL to clone 2007-06-02 09:21:56 -05:00
Brendan Cully
32c5d5cbaa Make mergepatch save queue now that qpush isn't. 2007-05-13 19:15:54 -07:00
Bryan O'Sullivan
fd12095b02 mq: add qgoto command. 2007-05-08 13:10:27 -07:00
Brendan Cully
6fae8c6b65 Fix test-patchbomb for crew 2007-05-08 13:08:20 -07:00
Bryan O'Sullivan
b4c9f788df MQ: tidy up if a qpush is interrupted.
This aborts the transaction, makes sure the dirtied dirstate isn't
written out, and cleans up the working directory.
2007-05-08 12:16:02 -07:00
Patrick Mezard
d8d1fafaa1 mq: fix qtop failure when the series ends with guarded patches. 2007-05-06 23:44:18 +02:00
Patrick Mezard
2aa0553705 Merge with crew-stable.
HG: changed hgext/mq.py
2007-05-07 00:12:35 +02:00