Commit Graph

23 Commits

Author SHA1 Message Date
Matt Harbison
5261ae4879 tests: add globs for Windows 2016-05-05 21:14:12 -04:00
Yuya Nishihara
b427a832a6 notify: do not load style file if template is specified (BC)
This patch makes sure that either "tmpl" or "mapfile" is exclusively set,
which is the same behavior as common log-like templates and formatter outputs.

See the previous patch for why.
2016-04-04 22:50:50 +09:00
timeless
45b895c57d minirst: change hgrole to use single quotes
We decided to reserve double quotes for arguments to hg because cmd
does not like single quotes, so switch the outer quotes to single
2016-01-12 06:03:36 +00: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
Michal Sznajder
d536428fac notify: support revset selection for subscriptions
A repo pattern for any notify configuration contains a glob matching the
path to the repo. Additionally, it may now contain a revset spec, separated
from the glob by '#'.

Example:
  [reposubs]
  */widgets#branch(release) = qa-team@example.com

This sends to ``qa-team@example.com`` whenever a changeset on the ``release``
branch triggers a notification in any repository ending in ``widgets``.

This patch was completely done by David Champion <dgc@uchicago.edu> with me
making tiny changes to his tests.
2012-08-13 22:42:10 +02:00
David Champion
fe8fba0ab7 notify: various fixes to docstring
Typo corrections, grammar adjustments, clarity improvements.
2012-05-29 07:07:10 -05:00
FUJIWARA Katsunori
116491f524 doc: fix careless document miss in help of hgext/notify
according to configuration example below, and direction of changeset
transference, this paragraph should describe about "changegroup" hook.

  [hooks]
  # one email for each incoming changeset
  incoming.notify = python:hgext.notify.hook
  # one email for all incoming changesets
  changegroup.notify = python:hgext.notify.hook

  # one email for all outgoing changesets
  outgoing.notify = python:hgext.notify.hook
2012-04-23 00:30:45 +09:00
Mads Kiilerich
a64a2f92d1 tests: ensure platform independent revision hashes in test-notify.t
Makes the test pass again on windows after 6abfec223a8d.
2011-12-26 16:54:43 +01:00
Nikolaus Schueler
efb688abc6 notify: change behavior of "changegroup" hook
Change the behavior so that the sender (the "From" header in the notification
mail) in case of the "changegroup" hook is the user that did the first commit
in the changegroup.  The option is configurable, if you set "notify.fromauthor"
to "True" in your config, the new behavior is activated.  If you do not set the
option, the behavior is as before.  The commit adds to an existing test to show
various aspects of the changed behavior.
2011-12-15 13:57:54 +01:00
Mads Kiilerich
1961772a73 mail: use quoted-printable for mime encoding to avoid too long lines (issue3075)
Quoted-printable was already used for the more critical patch mails, so it
should be fine for everything else as well.
2011-11-23 02:44:11 +01:00
Mads Kiilerich
ae4bd7a809 notify: add option for writing to mbox
This makes it possible to test how the mails that are sent _really_ look like.
2011-11-23 02:36:33 +01:00
Mads Kiilerich
8c22a0ec28 tests: make (glob) on windows accept \ instead of /
Globbing is usually used for filenames, so on windows it is reasonable and very
convenient that glob patterns accepts '\' or '/' when the pattern specifies
'/'.
2011-11-07 03:25:10 +01:00
Greg Ward
cf0ea44613 rollback: only restore dirstate and branch when appropriate.
If the working dir parent was destroyed by rollback, then the old
behaviour is perfectly reasonable: restore dirstate, branch, and
bookmarks. That way the working dir moves back to an existing
changeset rather than becoming an orphan.

But if the working dir parent was unaffected -- say, you updated to an
older changeset and then did rollback -- then it's silly to restore
dirstate and branch. So don't do that. Leave the status of the working
dir alone. (But always restore bookmarks, because that file refers to
changeset IDs that may have been destroyed.)
2011-09-18 19:59:33 -04:00
Patrick Mezard
50825774f7 notify: rewrite user documentation
The main intent is to turn the reference help into a configuration walkthrough.
It also fix several things:
- Do not suggest to use it for commit notifications, it cannot work
- Fix notify.strip default value
- Mention that subscriptions can be setup in Mercurial configuration files
- Improve notify.strip and notify.domain documentation
2011-07-26 21:30:12 +02:00
Ingo Bressler
215b100937 notify: send changesets on 'outgoing' hook, updated doc 2011-06-14 13:29:25 +02:00
Peter Arrenbrecht
5fbc4a50f1 localrepo: reuse parent manifest in commitctx if no files have changed
This speeds up the in-memory version of debugbuilddag that I'm
working on considerably for the case where we want to build just
a 00changelog.i (for discovery tests, for instance).

There are a couple of test changes because node ids in tests
have changed.

The changes to the patch names in test-mq-qdelete.t were required
because they could collide with nodeid abbreviations and newly
actually do (patch "c" collides with id "cafe..." for patch "b").
2011-05-02 19:20:29 +02:00
Gilles Moris
dcdc58f0a5 rollback: clarifies the message about the reverted state (issue2628)
Previously, when rolling back a transaction, some users could be confused
between the level to which the store is rolled back, and the new parents
of the working directory.

  $ hg rollback
  rolling back to revision 4 (undo commit)

With this change:
  $ hg rollback
  repository tip rolled back to tip revision 4 (undo commit)
  working directory now based on revision 2 and 1

So now the user can realize that the store has been rolled back to an older
tip, but also that the working directory may not on the tip (here we are
rolling back the merge of the heads 2 and 1)
2011-02-10 09:03:06 +01:00
Yuya Nishihara
7e36de64c5 util: fix ellipsis() not to break multi-byte sequence (issue2564)
It tries to convert localstr to unicode before truncating.
Because we cannot assume that the given text is encoded in local encoding,
it falls back to raw string in case of unicode error.
2010-12-25 21:59:00 +09:00
Mads Kiilerich
4a56baa937 test-notify: fix fix for line continuation in long mail header lines
Continued lines can also start with space.

Note that this hack also incorrectly patches the diff output.
2010-10-09 07:13:47 -05:00
Mads Kiilerich
791b05b162 test-notify: stabilize output
test-notify is made a bit more stable by stripping "all" folders away instead
of just 3.
2010-10-08 22:36:11 -05:00
Mads Kiilerich
a8aa4fec4a tests: remove the last traces of $HGTMP
$HGTMP isn't needed - and if we need something like that then $TESTTMP is more
appropriate.
2010-10-08 22:36:11 -05:00
Mads Kiilerich
3174ff376b tests: remove redundant globs
Many globs now just match $TESTTMP and is no longer needed.
2010-10-08 22:36:10 -05:00
Matt Mackall
2c5903de9c tests: unify test-notify 2010-09-26 13:44:42 -05:00