Commit Graph

765 Commits

Author SHA1 Message Date
Brendan Cully
4ee037e2c4 mq: do not update an empty working directory after strip.
Closes #296.
2006-09-13 16:41:03 -07:00
Brendan Cully
50d115c936 mq: Add --git option to qrefresh 2006-09-12 11:11:19 -07:00
john.levon@sun.com
7605f2282e Add the -s option to hg help qseries. 2006-09-13 21:46:36 +02:00
Brendan Cully
5ee5b4abae Make qrename handle directory targets; closes #333. 2006-09-13 08:57:08 -07:00
Thomas Arendsen Hein
86029c616c Fixed python2.3 incompatibility (rsplit) in qpush/qpop with index. 2006-09-12 17:27:41 +02:00
Benoit Boissinot
2067941fd0 merge with brendan 2006-09-09 12:51:05 +02:00
Brendan Cully
6cac22e075 strip: strip changelog before manifest 2006-08-30 15:13:45 -07:00
Thomas Arendsen Hein
d2082f10fc Never apply string formatting to generated errors with util.Abort.
Otherwise error messages containing % chars yield errors or worse.
Fixed (hopefully) all users of util.Abort.
2006-09-08 09:36:18 +02:00
Brendan Cully
b733859249 Call patch.diff directly instead of printdiff - this also saves an
extra walk of the working directory.
2006-08-29 17:08:55 -07:00
Bryan O'Sullivan
c48ecf0092 qheader: exit withh meaningful error code. 2006-08-22 16:59:09 -07:00
Bryan O'Sullivan
5a2ca1b7f7 MQ: Make more commands return meaningful errors. 2006-08-22 16:03:55 -07:00
Bryan O'Sullivan
c679ba9347 qrefresh: exit with status 1 if no patches applied. 2006-08-22 15:14:35 -07:00
Vadim Gelfer
f7e52c304c mq: fix bad interaction between demandload and update of commands.norepo
problem was that commands.norepo was not updated properly.
2006-08-21 13:59:17 -07:00
Brendan Cully
2af338f22f mq: fix appliedname 2006-08-16 19:55:42 -07:00
Brendan Cully
b85f7240b1 mq help text updates and speling fixes 2006-08-16 19:53:42 -07:00
Brendan Cully
3c579c8031 Add qnew -e option. 2006-08-16 19:53:01 -07:00
Brendan Cully
6fb5a7ec26 allow qrefresh to take a list of files; closes #96. 2006-08-16 19:52:21 -07:00
Brendan Cully
af32b3788b Fix test-mq-qdiff; add -I and -X options to qdiff 2006-08-16 19:51:39 -07:00
Brendan Cully
e5d7aafaf2 Fix qfold after recent changes 2006-08-16 19:50:50 -07:00
Brendan Cully
16fb95a415 Teach mq about git patches 2006-08-16 19:49:45 -07:00
Vadim Gelfer
9614f4bd5b redo merge with mpm.
previous merge at 8c0343e3f2b7 was bad.
2006-08-16 10:52:19 -07:00
Brendan Cully
2709262462 Unify mq and hg patch invocation.
This makes patch a little less verbose by default, so the tests
had to be updated.
2006-08-15 11:28:50 -07:00
Matt Mackall
6ecbc46d1a Move ui.diffopts to patch.diffopts where it belongs 2006-08-15 11:34:08 -05:00
Brendan Cully
bc3e797936 Allow qdel to delete multiple patches. 2006-08-14 11:41:08 -07:00
Brendan Cully
4b6f1503bf Replace qdel/qfold -f option with -k/--keep. 2006-08-14 11:24:19 -07:00
Vadim Gelfer
92dd5b8dc0 move commands.addremove_lock to cmdutil.addremove 2006-08-13 16:57:45 -07:00
Vadim Gelfer
80d6f2f7c7 remove localrepository.changes.
use localrepository.status instead.
2006-08-12 16:40:12 -07:00
Vadim Gelfer
13d751feaf refactor text diff/patch code.
rename commands.dodiff to patch.diff.
rename commands.doexport to patch.export.
move some functions from commands to new mercurial.cmdutil module.
turn list of diff options into mdiff.diffopts class.

patch.diff and patch.export now has clean api for call from 3rd party
python code.
2006-08-12 16:13:27 -07:00
Vadim Gelfer
12c9f17ffe merge. 2006-08-12 16:05:09 -07:00
Vadim Gelfer
7670c341e7 manifest.execf is now a function. 2006-08-12 16:04:49 -07:00
Vadim Gelfer
94b6c7e074 mq: demandload more 2006-08-12 14:15:23 -07:00
Vadim Gelfer
dc377b58c1 update copyrights. 2006-08-12 12:30:02 -07:00
Alexis S. L. Carvalho
27e6e90b97 Fix "hg qnew -f foo" without -m
The refresh method assumes it has a string.
2006-08-12 09:24:04 -03:00
Vadim Gelfer
ea424c45c0 merge with mpm. 2006-08-12 11:53:12 -07:00
Matt Mackall
44b96c96eb Change remaining users of manifest flags 2006-08-11 10:57:42 -05:00
Vadim Gelfer
a1eb2e0ec1 mq: only add mq attribute to local repo 2006-08-10 17:33:08 -07:00
Vadim Gelfer
cefae5007c mq: apply patch is any posative guard matches
this is like guards command from quilt package.
2006-08-10 17:18:55 -07:00
Vadim Gelfer
375ed90afa mq: do not allow to push from repo with patches applied 2006-08-10 16:10:59 -07:00
Brendan Cully
00705b2507 Disallow commit over an applied mq patch. 2006-08-10 11:18:48 -07:00
Vadim Gelfer
65c989bccf qselect: add --pop, --reapply options 2006-08-10 14:58:10 -07:00
Matt Mackall
76c5adea2f Merge with crew, fix most tests 2006-08-09 13:55:18 -05:00
Vadim Gelfer
626fbfdeed mq: make guards more strict, add tests 2006-08-09 09:38:11 -07:00
Vadim Gelfer
594d062505 mq: drop qversion command 2006-08-08 17:11:36 -07:00
Vadim Gelfer
3ea890331f mq: new commands qselect, qguard
implement quilt-style guards for mq.

guards allow to control whether patch can be pushed.

if guard X is active and patch is guarded by +X (called "posative guard"),
patch can be pushed.  if patch is guarded by -X (called "nagative guard"),
patch cannot be pushed and is skipped.

use qguard to set/list guards on patches.  use qselect to set/list
active guards.

also "qseries -v" prints guarded patches with "G" now.
2006-08-08 21:42:50 -07:00
Vadim Gelfer
07b40a89d5 mq: add join method 2006-08-08 18:12:48 -07:00
Matt Mackall
de047b03ce Introduce update helper functions: update, merge, clean, and revert 2006-08-07 22:54:33 -05:00
Brendan Cully
4d9ff1b476 Make mq camelcase consistent with the rest of hg. 2006-08-07 14:59:32 -07:00
Brendan Cully
17df733f51 Update qsave to use StatusEntry; don't throw exception on bad status lines. 2006-08-07 14:48:18 -07:00
Brendan Cully
8601c3c0fc Update mq to use new logmessage arglist from 2794:7eff50864c5c 2006-08-07 14:12:03 -07:00
Matt Mackall
3dcc28a29a Merge with crew 2006-08-07 16:47:06 -05:00
Benoit Boissinot
1c4f02dea9 mq: unused variables, improper usage of 'is [not]', undefined variable 2006-08-06 17:27:05 +02:00
Benoit Boissinot
6f5cfdaee1 mq: codingstyle 2006-08-06 17:24:13 +02:00
Benoit Boissinot
c62e480a61 mq: remove unecessary test 2006-08-06 17:20:51 +02:00
Benoit Boissinot
541cff5e76 mq: fix variables shadowing builtin 2006-08-06 17:18:53 +02:00
Brendan Cully
879b9bce42 mq: use more portable util.parse_patch_output instead of handrolled version. 2006-08-05 14:59:47 -07:00
Brendan Cully
5d7f00c97d Add portable shell-quoting function; teach mq to use it. 2006-08-05 15:23:26 -07:00
Matt Mackall
65b6faa1aa Move merge code to its own module
Pull update and merge3 out of localrepo into merge.py
s/self/repo/
Add temporary API function in hg.py
Convert all users
2006-08-03 15:24:41 -05:00
Vadim Gelfer
e7a19cd577 merge with brendan. 2006-08-03 11:12:02 -07:00
Brendan Cully
03cc700164 Use StatusEntry class instead of repeated status line parsing.
This small cleanup abstracts out repeated instances of
(rev, name) = applied[x].split(':'), making it easier to use
applied or change the status file format.
2006-08-03 11:09:12 -07:00
Vadim Gelfer
25f77c8e58 mq: make queue.unapplied useful as api 2006-08-02 21:06:12 -07:00
Vadim Gelfer
9f3dbcd014 mq: print matches if patch name not unique 2006-08-02 06:36:27 -07:00
Vadim Gelfer
7369cfc5b9 mq: simplify save_dirty 2006-08-02 20:33:57 -07:00
Brendan Cully
cd3bd9b901 Add -f option to qfold; improve qfold documentation. 2006-08-02 15:07:37 -07:00
Brendan Cully
a7db3381e3 Clean up qnew help text. 2006-08-02 14:48:59 -07:00
Vadim Gelfer
821fc85964 mq: rename read_series as parse_series, make simpler and faster 2006-08-02 10:48:34 -07:00
Bryan O'Sullivan
688915efdf fix call to commands.setremoteconfig 2006-08-02 09:18:56 -07:00
Vadim Gelfer
dc26ae9fe1 merge patches from brendan cully that did not apply clean against tip. 2006-08-01 15:40:28 -07:00
Brendan Cully
fecf9b2ed3 Add -s option to qseries: display first line of patch header. 2006-08-01 15:24:18 -07:00
Brendan Cully
b29cf92839 Add more verbose help text to mq commands. 2006-08-01 15:24:12 -07:00
Brendan Cully
00c221cfbb Add -m, -l, -e options to qfold. 2006-08-01 15:24:11 -07:00
Brendan Cully
68e0fb5d2a Add -f option to qdelete, to remove patch file. 2006-08-01 12:21:55 -07:00
Vadim Gelfer
a1413b0539 mq: add qmv as alias for qrename 2006-08-01 10:57:28 -07:00
Brendan Cully
7750dbbb50 New self-explanatory command qrename. 2006-08-01 10:55:06 -07:00
Brendan Cully
7e5a1a4d6a New mq command qfold: Merge patches into the current patch.
Patches should be in the series file but not yet applied.
2006-07-31 20:33:56 -07:00
Brendan Cully
af61c60015 Add command qheader to display the header of a given patch. 2006-07-31 18:39:31 -07:00
Brendan Cully
8d18dc1a62 Add option -e/--edit to qrefresh, to edit the existing header. 2006-07-31 17:55:43 -07:00
Brendan Cully
c05a6aafc0 Change patch header as well as commit message with qrefresh -m or -l. 2006-07-31 18:47:43 -07:00
Alexis S. L. Carvalho
eb9aa4b11b mq: correct the use of super
The first argument passed to super is supposed to be the class where
it's being used, not self.__class__ - the two can be different when
there's inheritance involved.
2006-07-31 14:22:17 -03:00
Matt Mackall
fb73e75b58 Kill ui.setconfig_remoteopts
This brought too much knowledge about command line particulars into
the ui code. Moved to commands.py.
2006-07-31 00:47:43 -05:00
Vadim Gelfer
8113ef1e80 mq: allow to apply patches in subdir of repo again
i broke it in d752547f000a.
2006-07-29 11:05:39 -07:00
Vadim Gelfer
090f26bfb5 mq: update to handle repomap not longer used 2006-07-28 14:31:20 -07:00
Brendan Cully
fa56cc4df5 mq: replace module-wide repo hash with a repo attribute 2006-07-28 13:08:25 -07:00
Brendan Cully
09698d36ee mq: do not hold a reference to repo in tags override
Instead, replace repo's class object with a subclass.
2006-07-28 13:08:21 -07:00
Vadim Gelfer
9f04cf77e6 mq: add qclone command 2006-07-28 10:46:41 -07:00
Vadim Gelfer
7505745e16 mq: fix queue.apply to not call os.chdir()
call to os.chdir broke "hg -R dirname qpush".
instead pass -d (change directory) option to patch command.
2006-07-27 18:24:59 -07:00
Vadim Gelfer
c75d013f82 mq: move many error messages to util.Abort 2006-07-27 16:41:59 -07:00
Vadim Gelfer
95c056a904 mq: do not allow to qnew a patch twice 2006-07-27 16:08:56 -07:00
Chris Mason
5a55931f23 mq: strip should not blow away local changes
This changes the mq strip command to abort if there are any changes in
the working directory.
2006-07-27 09:27:45 -07:00
Chris Mason
efeb029828 mq: fix qnew and qimport to deal with series file comments
qnew and qimport did not take comments into account when deciding where
to place new patches in the series file.
2006-07-27 09:27:42 -07:00
Chris Mason
d6e27326d7 mq: qpop should act like quilt pop
qpop patchname would pop the named patch off the stack.  This is slightly
different from how quilt pop works.  quilt pop pops everything up to the
named patch.
2006-07-27 09:27:39 -07:00
Chris Mason
0567a3c508 mq: patch naming shortcuts
This adds some more options to the mq lookup routine.  It allows
you to use shortcuts in naming patches to push or pop.  You
can now use:

1) a full patch name
2) a number to indicate an offset in the series file
3) a unique substring of the patch name
4) patchname[-+]num to indicate an offset from a given patch.

For case #3 substrings are allowed.  qtip and qbase are aliases for
the top and bottom of the applied patch queue, unless they are already
in the series file as patch names.
2006-07-27 09:27:35 -07:00
Mathieu Clabaut ext:(%22)
f056efd753 MQ: uniformise message and logfile option.
Possibility to change message in qrefresh option
2006-07-26 20:11:54 +02:00
Brendan Cully
e5bea098db Add mq patch names to tagscache instead of overriding lookup.
This makes mq patch names visible in hg log and hg tags. It also
resolves the names only once, rather than on every lookup.
2006-07-26 12:22:04 -07:00
Mathieu Clabaut ext:(%22)
0bf956044f mq: uniform verbose display of patche[s].
In verbose mode, display:
   "index patchname" for unapplied patches
   "index cset:patchnames" for applied patches
   "index status patchname" in the serie listing.
2006-07-26 01:03:33 +02:00
Brendan Cully
7a70e197ba Add qtip and qbase to mq qlookup. 2006-07-20 11:52:28 -07:00
Brendan Cully
e73d6c3e4d Mq: modify repo.lookup to resolve applied patches too. 2006-07-20 11:52:28 -07:00
Vadim Gelfer
eef60e2c8d help: add help to mq extension 2006-07-03 14:30:38 -07:00
Thomas Arendsen Hein
d17f2a589b Merge with crew. 2006-06-30 21:35:28 +02:00
Chris Mason
f6facbf17c mq: fix qparents to return the correct parent when no patches are applied 2006-06-27 10:49:46 -04:00
Chris Mason
26fe10a876 mq: hg qnew -f should refresh the new patch
qnew -f was originally meant to just skip the localchanges check.
But, it currently discards the local changes, which is not at all what
people expect.

This patch changes qnew -f to create the new patch and then
run hg qrefresh on it.  The local changes will be in the new
patch.
2006-06-27 11:23:06 -04:00
Thomas Arendsen Hein
d7742cf972 mq: Added help for qcommit, consistently talk about queue repository. 2006-06-28 08:56:01 +02:00
Vadim Gelfer
d49fb207db mq: add qimported patches if patch dir is a repo 2006-06-23 12:52:42 -07:00
Thomas Arendsen Hein
be0ce7238f Strip empty lines and trailing spaces around commit messages.
Fixes issue213 and part of issue249 (trying to keep node id on import)
2006-05-17 19:38:41 +02:00
Thomas Arendsen Hein
be2a7bb68c Use "# Date" instead of "# Timestamp" for dated export/import of patches.
And don't break up list for % formatting.
2006-05-17 19:00:16 +02:00
Danek Duvall
2a19fd683a Add timestamp field to export format. Make import and mq use it. 2006-05-17 18:54:30 +02:00
Danek Duvall
9b6197b107 Fix issue240: mq: qpush fails on Solaris 2006-05-11 18:24:58 -07:00
Thomas Arendsen Hein
412719cc68 Better help for mq: Corrected synopses, get qcommit options from commands.py. 2006-05-03 11:57:14 +02:00
Alexis S. L. Carvalho
2995553eee Fix hg qdiff <file> 2006-04-19 11:41:27 -07:00
Vadim Gelfer
fba6f04a5f mq: do not fail if directory to create exists 2006-04-18 14:56:54 -07:00
Edouard Gomez
f6c00cf208 Register qversion as a non repository related command 2006-04-04 16:35:20 -07:00
Thomas Arendsen Hein
c6c1b2a975 Removed script header from mq.py 2006-03-08 19:31:54 +01:00
Thomas Arendsen Hein
c2f8042cfe Fix mq's usage of opener, which don't allow absolute paths now. 2006-03-07 22:41:24 +01:00
Thomas Arendsen Hein
ed3a95a497 Create local ui object per repository, so .hg/hgrc don't get mixed.
This is needed for hooks, but may be important for other settings, too.
Fixes issue113, also integrated push-hook-lock.sh as a test case for this.
2006-03-06 17:47:41 +01:00
Thomas Arendsen Hein
47314a5f51 Whitespace, tab and formatting cleanups, mainly in mq.py 2006-02-28 23:25:34 +01:00
mason@suse.com
e69cd5f3b2 Add mq extension 2006-02-28 12:25:26 -06:00