Commit Graph

2630 Commits

Author SHA1 Message Date
Christian Ebert
57eed7cac3 patchbomb: add --confirm option to show series details and ask for confirmation
--confirm presents same prompt as --diffstat, but does not write
a diffstat to the messages' bodies.

A simple test simulating a negative response is included.
2010-09-10 15:32:22 +02:00
Christian Ebert
c4731e2be5 patchbomb: let diffstat prompt only once with complete summary
This changes the behaviour of --diffstat.
Before the user was asked for confirmation of each patch with its
description and diffstat, and a final summary.

Now there is only one prompt right before sending with a final
summary which does not include the patch descriptions, but the
message details and the diffstats:

  Final summary:

  From: sender
  To: recipient(s)
  Cc: (if present)
  Bcc: (if present)
  Reply-To: (if present)
  Subject: [patch 0 of x [flags]] intro (if present)
      a |  28 ++++++++++++++++++++++++++++
      b |  15 +++++++++++++++
  Subject: [patch 1 of x [flags]] subject
      a |  28 ++++++++++++++++++++++++++++
  [ ... ]

  are you sure you want to send (yn)?
2010-09-10 15:32:14 +02:00
Martin Geisler
5e2d304679 patchbomb: rename argument to avoid shadowing patch module 2010-09-10 15:56:13 +02:00
Martin Geisler
0447137bce convert: deprecate --authors in preference for --authormap
This aligns the authormap option with the other three mapping options.
The old --authors option is still supported and 'hg help convert -v'
will still show it.
2010-09-10 01:34:14 +02:00
Christian Ebert
c71ec4c740 patchbomb: show prompt and selection in non-interactive mode
Akin to 023d1310d8a4 for the custom patchbomb prompt.
2010-09-08 08:31:07 +02:00
Christian Ebert
c44df41dfd patchbomb: use ui.promptchoice for diffstat to allow localization of choices
The extra check for ui.interacive from patchbomb's prompt function is not
needed here.

Format boolean prompt as in filemerge.py.
2010-09-08 08:31:07 +02:00
Martin Geisler
77e923da30 merge with stable 2010-09-10 01:04:32 +02:00
Martin Geisler
e783fa28e6 convert: better grouping of command line flags in help
We normally put related command line flags after one another.
2010-09-10 00:07:38 +02:00
Martin Geisler
e9c2a20771 diff: recurse into subrepositories with --subrepos/-S flag 2010-09-03 12:58:51 +02:00
Martin Geisler
db48f8551c merge with stable 2010-09-02 17:28:20 +02:00
Martin Geisler
2dfd084474 bookmarks: break long line found by check-code 2010-09-02 17:07:02 +02:00
Peter Arrenbrecht
29816e62a9 transplant: fix var name conflict introduced by 2bc37c36314e 2010-09-18 08:30:11 +02:00
Matt Mackall
cdb9f7c881 bundlerepo: restore close() method 2010-09-20 16:14:05 -05:00
Matt Mackall
40f75a026a bundlerepo: drop unused close() method 2010-09-17 19:03:13 -05:00
Martin Geisler
c27c54faec clone, patch, convert: use hex(nullid) instead of '0'*40 2010-09-02 12:08:13 +02:00
Brodie Rao
5a1e1994ac help: refer to user configuration file more consistently
Currently, a number of commands and help topics mention the user hgrc
file in different ways. Among these are following:

1. .hgrc - "please specify your commit editor/username in your .hgrc
file", bookmarks, color, hgk, pager, hg help environment

2. $HOME/.hgrc - hg help paths, hgrc(5), hg(1)

3. ~/.hgrc - hgrc(5)

In addition to being inconsistent, none of these make sense on
Windows. This patch replaces the above with a more general term of
"[your] configuration file".
2010-08-27 22:36:35 -04:00
Martin Geisler
bab69a5062 churn: do not crash on malformed lines in alias file 2010-08-29 22:46:00 +02:00
Ronny Pfannschmidt
1a68305741 churn: do not crash on empty lines in alias file 2010-08-29 10:54:22 +02:00
Martin Geisler
5f46f16fb7 Lowercase error messages 2010-08-29 22:37:58 +02:00
Augie Fackler
2ad9623e97 color: accept usual boolean values as synonyms for always and never 2010-08-28 21:57:36 -05:00
Martin Geisler
c3c7fa090f Merge with stable 2010-08-30 13:00:22 +02:00
Brodie Rao
d1905b7d87 mail/hgweb: support service names for ports (issue2350)
This adds util.getport(port) which tries to parse port as an int, and
failing that, looks it up using socket.getservbyname(). Thus, the
following will work:

    [smtp]
    port = submission

    [web]
    port = http

This does not apply to ports in URLs used in clone, pull, etc.
2010-08-28 12:31:07 -04:00
Martin Geisler
cb36142754 Merge with stable 2010-08-29 22:55:37 +02:00
Steve Borho
17ad59ab74 color: handle more Windows console errors
If your application is being built as a non-console application,
stdout is not a valid handle and raises an exception:

pywintypes.error: (6, 'DuplicateHandle', 'The handle is invalid.')

Alternatively, non-console applications launched outside of a
console will return None from GetStdHandle instead of raising an
exception.
2010-08-27 22:24:47 -05:00
Christian Ebert
63a3341098 patchbomb: remove unneeded line continuation 2010-08-25 23:26:18 +01:00
Brodie Rao
0f9d940cb9 cleanup: remove unused variables 2010-08-27 13:32:40 -04:00
Brodie Rao
203cf2fbd9 cleanup: remove unused imports 2010-08-27 13:32:38 -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
Martin Geisler
1fa82565d6 Merge with stable 2010-08-23 22:22:05 +02:00
Martin Geisler
130528a2c3 bookmarks: guard against listing bookmarks on unsupported repos
This fixes clones and pulls from statichttprepository repos.
2010-08-23 22:16:56 +02:00
Matt Mackall
979717003c bookmarks: fix long line 2010-08-19 17:33:46 -05:00
Matt Mackall
73968a1cf2 merge with stable 2010-08-19 17:29:13 -05:00
David Soria Parra
ebfeb45938 bookmarks: Check if the bookmark to delete exists on the remote 2010-08-19 15:04:21 -04:00
Brodie Rao
5c97a02c1e convert: use encoding.encoding instead of locale.getpreferredencoding()
The latter may not return useful results in certain OS X environments.
2010-08-18 10:53:52 -04:00
Brodie Rao
e752297abf convert: properly set encoding for gnuarch converter 2010-08-18 10:53:50 -04:00
Mads Kiilerich
b27d1fd3b8 mq: don't inherit default and default-push paths with --mq (issue2333)
Configuration from the outer repo is inherited to the patches repo when --mq is
used.

In case the patches repo only has paths.default configured but the outer repo
has paths.default-push then the inherited default-push will win. Very
confusing.

Inheriting the default paths is however wrong in all sane cases, so now we
explicitly remove them.
2010-08-18 02:43:45 +02:00
Matt Mackall
a628b4fc64 merge with stable 2010-08-19 11:51:30 -05:00
Matt Mackall
eef168b604 merge with stable 2010-08-19 10:25:41 -05:00
Benoit Boissinot
21c145b776 rebase: recompute the set of skipped rev when using --continue (issue2330) 2010-08-13 18:02:02 +02:00
Jeremy Whitlock
0a6d3a397f color: enable branches support
This commit updates the branches command to use ui.label for the branch names
and the changeset.  This implementation allows assigning colors to the four
states of a branch: active, closed, current and inactive.  While you can
configure color for the four states, only current and closed have default colors
of green and black bold respectively.
2010-07-28 23:05:03 -06:00
Yann E. MORIN
87f9cf5483 mq/qqueue: add --purge option to delete a queue and its patch dir
qqueue --delete only deletes the reference to the queue, and leaves
the associated patch directory behind. There is no Mercurial-way of
getting rid of that patch directory afterward.

This patch adds the --purge option to qqueue, that deletes the queue
from the list, and also removes the associated patch dir. If the queue
was non-existant, but the patch dir was, it is removed nonetheless.

This is to avoid manual intervention in the .hg directory.
2010-08-18 23:37:19 +02:00
Yann E. MORIN
dac7d3c59b mq/qqueue: commonalise the queue deletion code 2010-08-18 23:34:28 +02:00
Renato Cunha
cedeb488b2 mq: save qrefresh message for easy recovery in case it fails (issue2062)
Currently, if you start editing a commit message from qrefresh -e and, for any
reason: forget you were editing it, leave the editor open and start qpopping
and qpushing, when you decide to save your commit message, it is going to fail.
This patch copies the commit behavior of saving the message contents in
$HGROOT/.hg/last-message.txt before continuing.
2010-08-16 16:35:20 -03:00
Greg Ward
41733adeb2 inotify: show the exact command used to start the server 2010-08-13 13:16:34 -04:00
Yann E. MORIN
087fc5dff2 mq/qqueue: enable renaming of active queue 2010-08-15 13:29:46 +02:00
Yann E. MORIN
cc2af00728 mq/qqueue: split _setactive
Prepare _setactive to be called without checking for applied patches.
2010-08-15 16:48:08 +02:00
Martin Geisler
e7bd3fc69a Merge with stable 2010-08-14 03:30:35 +02:00
Dan Villiom Podlaski Christiansen
7cf0dd907b qguard: label patch names by status when listing guards 2010-08-05 12:25:53 +02:00
Nicolas Dumazet
5a000fb762 strip: support multiple revisions 2010-07-17 00:47:06 +09:00
Martin Geisler
c3f9a46ceb Merge with stable 2010-08-11 12:30:18 +02:00
Martin Geisler
14ab4a3d21 convert: less shouting in SVN sink warning 2010-08-11 12:29:20 +02:00
Daniel J. Lauk
770d0f10a6 convert: Using --dest-type svn crashed, if the source repo used tags.
The convert extension requires puttags(self, tags) to return a sequence
for a multi-variable assignment.  If puttags implicitly returns None,
the code will break when trying to un-pack None for assignment.
2010-08-11 11:46:06 +02:00
Martin Geisler
b81cf438a9 graphlog: mark --branch as incompatible with --graph
The --only-branch option was deprecated in e783d3972bda and --branch
was added instead. But the graphlog extension was not updated to match
the change.
2010-08-11 12:19:01 +02:00
Brodie Rao
6d1ff05d76 color: call correct superclass method in write_err
Without this fix, any calls to write_err would go to stdout instead of
stderr, and calls during pushbuffer would cause unpack ValueErrors on
popbuffer.
2010-08-02 10:48:31 -04:00
timeless
4c60b4bbe9 convert/progress: use plural and avoid retrieving 2010-07-30 10:38:54 +03:00
Brodie Rao
52fb27575c color: pass write/write_err to win32print correctly (issue2312) 2010-08-01 16:26:02 -04:00
Martin Geisler
31fb6a81be bookmarks: replace var used as a Boolean with a Boolean 2010-08-10 16:55:38 +02:00
Yann E. MORIN
04d8f4ca7e mq/qqueue: --list does not print (active) with --quiet
For scripting purposes, it can be convenient to get a simple listing of
available queues, without indication of the active one.

--quiet documentation change removed by Patrick Mézard.
2010-08-08 22:49:01 +02:00
Alecs King
87357bf43e minor style fix: hgext/rebase.py:157 -- line too long
found by a run of check-code
2010-08-07 12:55:30 +08:00
Brodie Rao
0f7e715bdb hgcia/color: remove star imports
This plays nicer with demandimport and allows pyflakes to detect undefined
names.
2010-08-03 13:02:11 -04:00
Matt Mackall
8b11223ff6 Merge with stable 2010-08-02 10:55:51 -05:00
Matt Mackall
a807136972 qfinish: fix range logic for --applied
qbase:qtip can include non-mq csets, use qbase::qtip instead
2010-08-01 16:02:56 -05:00
timeless
ead95bc677 rebase/progress: Adding progress for rebasing 2010-07-20 20:53:48 +02:00
timeless
220a53c8c9 record: count lines changed as the number of lines added or removed
per "record" hunk
Record deals in hunks which are tighter than traditional patch hunks,
really only a single run of additions/removals. Another addition, even a
line after a fixed line is treated as a new hunk by record.
2010-07-22 18:47:46 +03:00
Matt Mackall
c11fac2ec1 Merge with stable 2010-07-31 18:12:50 -05:00
Nicolas Dumazet
2476f9eec3 merge with stable 2010-07-31 11:41:58 +09:00
Nicolas Dumazet
fd74fbf55f merge crew and main 2010-07-31 11:05:11 +09:00
Nicolas Dumazet
1f6d6b4984 merge crew and main 2010-07-31 11:04:33 +09:00
Nicolas Dumazet
5d294189fa mq: clarify the fact that qimport is trying to read a file
"hg qimport tip" would throw "abort: unable to read tip" before this.
2010-07-31 10:50:29 +09:00
Nicolas Dumazet
e1fdb57c43 mq: correct qimport documentation 2010-07-29 17:18:17 +09:00
Nicolas Dumazet
255cce8ee5 merge with stable 2010-07-29 12:10:22 +09:00
Patrick Mezard
f59b5d9c39 mq: fix qimport --name --existing --force on win32
os.rename() does not overwrite existing targets on Windows.
2010-07-28 11:07:20 +02:00
Matt Mackall
671535ddb7 Merge with stable 2010-07-25 21:20:05 -05:00
Christian Ebert
e697dd5558 keyword: move collecting of [keyword] patterns to reposetup (issue2303)
When cloning, prevent [keyword] filename patterns configured locally
in the source directory to persist during the update in the destination.

a) move [keyword] retrieval (back) to reposetup
b) remove the corresponding global kwtools attributes

Add test cases.
2010-07-25 20:01:33 -05:00
Idan Kamara
5f043a6812 bookmarks: don't allow name to contain whitespaces only 2010-07-24 11:20:21 +03:00
Nicolas Dumazet
32a65647b1 mq: document possible combination of -e and -n for qimport 2010-07-23 23:43:43 +09:00
Nicolas Dumazet
fa54ef46b3 mq: support "qimport --existing --name renametothis thatexistingpatch"
Before this change, the command would abort with a not too clear "patch
renametothis does not exist" error.

This change makes:
  qimport --existing --name renametothis thatexistingpatch
equivalent to:
  qimport --existing thatexistingpatch; qrename thatexistingpatch renametothis
2010-07-21 11:53:09 +09:00
Patrick Mezard
3153012325 cleanup: typos 2010-07-26 22:29:49 +02:00
Patrick Mezard
56b24c94c7 bookmarks: sort diffbookmarks() output 2010-07-26 22:26:12 +02:00
Mads Kiilerich
ef1e88d17c convert: warn on superfluous / in paths
shlex is really a bad parser for this line-based format ...
2010-07-20 15:49:28 +02:00
David Soria Parra
a1c3bcbbfe inotify: remove unused variable 2010-07-24 22:15:22 +02:00
Matt Mackall
3a240dadce convert: handle closed branch heads in hg-hg conversion (issue2185) 2010-07-25 17:18:35 -05:00
Nicolas Dumazet
cea01fc92a bookmarks: rewrite _bookmarks method documentation 2010-07-21 12:41:18 +09:00
Greg Ward
692cfc05a8 transplant: crash if repo.commit() finds nothing to commit
(makes issue2135, issue2264 more obvious, but does nothing to fix
either one)

This seems to happen in two distinct cases:
  * patch.patch() claims success but changes nothing (e.g.
    the transplanted changeset adds an empty file that already
    exists)
  * patch.patch() makes changes, but repo.status() fails to report them

Both of these seem like bugs in other parts of Mercurial, so arguably
it's not transplant's job to detect the failure to commit.  However:
  * detecting the problem as soon as possible is desirable
  * it prevents a more obscure crash later, in transplants.write()
  * there might be other lurking (or future) bugs that cause
    repo.commit() to do nothing

Also, in the case of issue2264 (source changesets silently dropped by
transplant), the only way to spot the problem currently is the crash
in transplants.write().  Failure to transplant a patch should abort
immediately, whether it's user error (patch does not apply) or a
Mercurial bug (e.g. repo.status() failing to report changes).
2010-07-18 21:29:29 -04:00
Vishakh H
fb390f5f84 mq: cleanup status if applied mq is stripped (issue1881)
stripping of applied mq patches leads to wrong state recorded in status
file. find all mq patches that will be affected and clean up status file
before strip.
2010-07-20 20:37:29 +05:30
Greg Ward
08b5f707c3 inotify: make inotifydirstate.status() returns a tuple of lists.
This makes it consistent with dirstate.status(), which is important if
there are other extensions messing with the output of status().  Those
extensions can safely assume that dirstate.status() returns a tuple of
lists, because its docstring says it does.  But
inotifystatus.dirstate() returns a list of lists, which can break
those other extensions.
2010-07-20 14:00:47 -04:00
Gilles Moris
6e5b8353f9 qpush --move: move the right patch even with comment lines
9af52509546a caused that we find the index of the moving patch in self.series
but look it up in self.full_series. The difference between these is that
full_series also contains comment lines, and we thus moved the wrong patch.

Use back self.full_series to find the moving patch, but take care of striping
the patch guard markers before comparing the patch name. Test cases have been
added for comments and empty lines in self.full_series, and for the case of
guarded patches.

Original patch contributed by Mads Kiilerich <mads@kiilerich.com>
2010-07-10 21:23:00 +02:00
Brodie Rao
e68a4f5865 bookmarks: ensure current bookmark is updated when specified with -r .
"hg bookmark -r . foo" should be equivalent to "hg bookmark foo".
2010-07-14 11:02:20 -04:00
Nicolas Dumazet
517eb64655 merge with stable 2010-07-22 15:14:22 +09:00
Matt Mackall
33994da433 Merge with stable 2010-07-20 15:07:10 -05:00
Christian Ebert
15f0c93000 keyword: add extra datefilters in a single update call 2010-07-15 10:24:31 +02:00
Brendan Cully
5c49b19eb5 mq: evaluate --user before invoking editor with -e (issue2289) 2010-07-15 10:41:41 -07:00
Renato Cunha
b6d6b8775c removed exception args indexing (not supported by py3k)
Py3k removed __getitem__ for exception classes. The correct way of
getting the exception arguments is by using the args method.
2010-07-14 23:03:21 -03:00
Renato Cunha
0ef348b9d4 record: removed 'has_key' usage
Py3k has removed the dictionary has_key method. This patch implements
a one argument function that can be used as a callback by hg.revert in
the record extension.
2010-07-14 22:58:29 -03:00
Martin Geisler
b620743b6b Merge with stable 2010-07-14 21:30:50 +02:00
Henrik Stuart
c4714744e5 merge stable to default 2010-07-14 20:41:01 +02:00
Nicolas Dumazet
658e3fee6a merge with stable 2010-07-13 22:56:01 +09:00
Nicolas Dumazet
9085ce94e6 mq: qrepo.add(mq.added) inside save_dirty inside of doing it manually
This should make the MQ API more transparent: callers only have to
call save_dirty, and no mq.added magic or knowledge is required.
2010-07-13 22:30:01 +09:00
Renato Cunha
6de8a70a9d inotify: check all components of filenames against hgignore (issue884)
With inotify enabled, files that should be ignored could be detected as
untracked by mercurial. This behavior was wrong because inotify's filestatus
implementation only matched filenames against ignore patterns, instead of
checking if other elements of their paths matched them. This patch fixes the
behavior by checking the file paths against the ignore patterns.

A new test has also been added to the main inotify test to prevent any
regressions.
2010-07-06 22:22:18 -03:00
Renato Cunha
f1db4f7c25 inotify: Port of the C module to py3k.
This patch accomplishes the port of the inotify C module to py3k by #including
mercurial's util.h file, and by defining the necessary boilerplate code
required by py3k through conditional compilation.
2010-07-02 16:22:59 -03:00