tests/test-notify.t
author Patrick Mezard <pmezard@gmail.com>
Tue, 26 Jul 2011 21:30:12 +0200
changeset 14940 d78b92353f26
parent 14617 23f4e1e40988
child 15131 7c26ce9edbd2
permissions -rw-r--r--
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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3740
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     1
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
     2
  $ cat <<EOF >> $HGRCPATH
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
     3
  > [extensions]
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
     4
  > notify=
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
     5
  > 
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
     6
  > [hooks]
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
     7
  > incoming.notify = python:hgext.notify.hook
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
     8
  > 
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
     9
  > [notify]
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    10
  > sources = pull
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    11
  > diffstat = False
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    12
  > 
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    13
  > [usersubs]
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    14
  > foo@bar = *
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    15
  > 
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    16
  > [reposubs]
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    17
  > * = baz
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    18
  > EOF
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    19
  $ hg help notify
14940
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    20
  notify extension - hooks for sending email push notifications
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    21
  
14940
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    22
  This extension let you run hooks sending email notifications when changesets
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    23
  are being pushed, from the sending or receiving side.
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    24
  
14940
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    25
  First, enable the extension as explained in "hg help extensions", and register
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    26
  the hook you want to run. "incoming" and "outgoing" hooks are run by the
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    27
  changesets receiver while the "outgoing" one is for the sender:
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    28
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    29
    [hooks]
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    30
    # one email for each incoming changeset
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    31
    incoming.notify = python:hgext.notify.hook
14940
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    32
    # one email for all incoming changesets
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    33
    changegroup.notify = python:hgext.notify.hook
14940
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    34
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    35
    # one email for all outgoing changesets
14617
23f4e1e40988 notify: send changesets on 'outgoing' hook, updated doc
Ingo Bressler <dev@ingobressler.net>
parents: 14162
diff changeset
    36
    outgoing.notify = python:hgext.notify.hook
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    37
  
14940
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    38
  Now the hooks are running, subscribers must be assigned to repositories. Use
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    39
  the "[usersubs]" section to map repositories to a given email or the
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    40
  "[reposubs]" section to map emails to a single repository:
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    41
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    42
    [usersubs]
14940
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    43
    # key is subscriber email, value is a comma-separated list of glob
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    44
    # patterns
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    45
    user@host = pattern
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    46
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    47
    [reposubs]
14940
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    48
    # key is glob pattern, value is a comma-separated list of subscriber
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    49
    # emails
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    50
    pattern = user@host
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    51
  
14940
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    52
  Glob patterns are matched against absolute path to repository root. The
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    53
  subscriptions can be defined in their own file and referenced with:
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    54
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    55
    [notify]
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    56
    config = /path/to/subscriptionsfile
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    57
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    58
  Alternatively, they can be added to Mercurial configuration files by setting
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    59
  the previous entry to an empty value.
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    60
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    61
  At this point, notifications should be generated but will not be sent until
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    62
  you set the "notify.test" entry to "False".
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    63
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    64
  Notifications content can be tweaked with the following configuration entries:
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    65
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    66
  notify.test
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    67
    If "True", print messages to stdout instead of sending them. Default: True.
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    68
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    69
  notify.sources
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    70
    Space separated list of change sources. Notifications are sent only if it
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    71
    includes the incoming or outgoing changes source. Incoming sources can be
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    72
    "serve" for changes coming from http or ssh, "pull" for pulled changes,
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    73
    "unbundle" for changes added by "hg unbundle" or "push" for changes being
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    74
    pushed locally. Outgoing sources are the same except for "unbundle" which is
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    75
    replaced by "bundle". Default: serve.
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    76
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    77
  notify.strip
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    78
    Number of leading slashes to strip from url paths. By default, notifications
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    79
    references repositories with their absolute path. "notify.strip" let you
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    80
    turn them into relative paths. For example, "notify.strip=3" will change
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    81
    "/long/path/repository" into "repository". Default: 0.
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    82
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    83
  notify.domain
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    84
    If subscribers emails or the from email have no domain set, complete them
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    85
    with this value.
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
    86
  
14940
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    87
  notify.style
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    88
    Style file to use when formatting emails.
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    89
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    90
  notify.template
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    91
    Template to use when formatting emails.
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    92
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    93
  notify.incoming
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    94
    Template to use when run as incoming hook, override "notify.template".
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    95
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    96
  notify.outgoing
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    97
    Template to use when run as outgoing hook, override "notify.template".
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    98
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
    99
  notify.changegroup
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   100
    Template to use when running as changegroup hook, override
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   101
    "notify.template".
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   102
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   103
  notify.maxdiff
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   104
    Maximum number of diff lines to include in notification email. Set to 0 to
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   105
    disable the diff, -1 to include all of it. Default: 300.
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   106
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   107
  notify.maxsubject
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   108
    Maximum number of characters in emails subject line. Default: 67.
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   109
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   110
  notify.diffstat
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   111
    Set to True to include a diffstat before diff content. Default: True.
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   112
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   113
  notify.merge
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   114
    If True, send notifications for merge changesets. Default: True.
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   115
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   116
  If set, the following entries will also be used to customize the
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   117
  notifications:
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   118
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   119
  email.from
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   120
    Email "From" address to use if none can be found in generated email content.
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   121
  
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   122
  web.baseurl
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   123
    Root repository browsing URL to combine with repository paths when making
d78b92353f26 notify: rewrite user documentation
Patrick Mezard <pmezard@gmail.com>
parents: 14617
diff changeset
   124
    references. See also "notify.strip".
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   125
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   126
  no commands defined
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   127
  $ hg init a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   128
  $ echo a > a/a
3740
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   129
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   130
commit
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   131
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   132
  $ hg --cwd a commit -Ama -d '0 0'
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   133
  adding a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   134
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   135
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   136
clone
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   137
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   138
  $ hg --traceback clone a b
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   139
  updating to branch default
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   140
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   141
  $ echo a >> a/a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   142
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   143
commit
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   144
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   145
  $ hg --traceback --cwd a commit -Amb -d '1 0'
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   146
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   147
on Mac OS X 10.5 the tmp path is very long so would get stripped in the subject line
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   148
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   149
  $ cat <<EOF >> $HGRCPATH
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   150
  > [notify]
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   151
  > maxsubject = 200
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   152
  > EOF
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   153
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   154
the python call below wraps continuation lines, which appear on Mac OS X 10.5 because
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   155
of the very long subject line
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   156
pull (minimal config)
6359
25e74cd3f023 test-notify: make it pass on Mac OS X 10.5
Florent Guillaume <fg@nuxeo.com>
parents: 4517
diff changeset
   157
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   158
  $ hg --traceback --cwd b pull ../a | \
12646
624859bf4314 test-notify: fix fix for line continuation in long mail header lines
Mads Kiilerich <mads@kiilerich.com>
parents: 12644
diff changeset
   159
  >   python -c 'import sys,re; print re.sub("\n[\t ]", " ", sys.stdin.read()),'
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   160
  pulling from ../a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   161
  searching for changes
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   162
  adding changesets
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   163
  adding manifests
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   164
  adding file changes
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   165
  added 1 changesets with 1 changes to 1 files
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   166
  Content-Type: text/plain; charset="us-ascii"
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   167
  MIME-Version: 1.0
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   168
  Content-Transfer-Encoding: 7bit
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   169
  Date: * (glob)
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12473
diff changeset
   170
  Subject: changeset in $TESTTMP/b: b
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   171
  From: test
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   172
  X-Hg-Notification: changeset 0647d048b600
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   173
  Message-Id: <*> (glob)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   174
  To: baz, foo@bar
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   175
  
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12473
diff changeset
   176
  changeset 0647d048b600 in $TESTTMP/b
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12473
diff changeset
   177
  details: $TESTTMP/b?cmd=changeset;node=0647d048b600
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   178
  description: b
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   179
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   180
  diffs (6 lines):
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   181
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   182
  diff -r cb9a9f314b8b -r 0647d048b600 a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   183
  --- a/a	Thu Jan 01 00:00:00 1970 +0000
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   184
  +++ b/a	Thu Jan 01 00:00:01 1970 +0000
12646
624859bf4314 test-notify: fix fix for line continuation in long mail header lines
Mads Kiilerich <mads@kiilerich.com>
parents: 12644
diff changeset
   185
  @@ -1,1 +1,2 @@ a
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   186
  +a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   187
  (run 'hg update' to get a working copy)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   188
  $ cat <<EOF >> $HGRCPATH
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   189
  > [notify]
12642
bb35840e965c tests: remove the last traces of $HGTMP
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   190
  > config = `pwd`/.notify.conf
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   191
  > domain = test.com
12644
0490d2223882 test-notify: stabilize output
Mads Kiilerich <mads@kiilerich.com>
parents: 12642
diff changeset
   192
  > strip = 42
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   193
  > template = Subject: {desc|firstline|strip}\nFrom: {author}\nX-Test: foo\n\nchangeset {node|short} in {webroot}\ndescription:\n\t{desc|tabindent|strip}
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   194
  > 
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   195
  > [web]
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   196
  > baseurl = http://test/
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   197
  > EOF
4094
fbf0e9acfd83 notify: don't try to fix addresses if notify.domain is not set
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4009
diff changeset
   198
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   199
fail for config file is missing
4094
fbf0e9acfd83 notify: don't try to fix addresses if notify.domain is not set
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4009
diff changeset
   200
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   201
  $ hg --cwd b rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13225
diff changeset
   202
  repository tip rolled back to revision 0 (undo pull)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13225
diff changeset
   203
  working directory now based on revision 0
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   204
  $ hg --cwd b pull ../a 2>&1 | grep 'error.*\.notify\.conf' > /dev/null && echo pull failed
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   205
  pull failed
12642
bb35840e965c tests: remove the last traces of $HGTMP
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   206
  $ touch ".notify.conf"
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   207
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   208
pull
4094
fbf0e9acfd83 notify: don't try to fix addresses if notify.domain is not set
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4009
diff changeset
   209
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   210
  $ hg --cwd b rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13225
diff changeset
   211
  repository tip rolled back to revision 0 (undo pull)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13225
diff changeset
   212
  working directory now based on revision 0
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   213
  $ hg --traceback --cwd b pull ../a  | \
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   214
  >   python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   215
  pulling from ../a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   216
  searching for changes
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   217
  adding changesets
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   218
  adding manifests
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   219
  adding file changes
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   220
  added 1 changesets with 1 changes to 1 files
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   221
  Content-Type: text/plain; charset="us-ascii"
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   222
  MIME-Version: 1.0
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   223
  Content-Transfer-Encoding: 7bit
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   224
  X-Test: foo
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   225
  Date: * (glob)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   226
  Subject: b
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   227
  From: test@test.com
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   228
  X-Hg-Notification: changeset 0647d048b600
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   229
  Message-Id: <*> (glob)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   230
  To: baz@test.com, foo@bar
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   231
  
12644
0490d2223882 test-notify: stabilize output
Mads Kiilerich <mads@kiilerich.com>
parents: 12642
diff changeset
   232
  changeset 0647d048b600 in b
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   233
  description: b
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   234
  diffs (6 lines):
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   235
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   236
  diff -r cb9a9f314b8b -r 0647d048b600 a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   237
  --- a/a	Thu Jan 01 00:00:00 1970 +0000
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   238
  +++ b/a	Thu Jan 01 00:00:01 1970 +0000
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   239
  @@ -1,1 +1,2 @@
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   240
   a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   241
  +a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   242
  (run 'hg update' to get a working copy)
4517
5371a213b0f4 ui: make readsections() abort when configuration cannot be read.
Patrick Mezard <pmezard@gmail.com>
parents: 4479
diff changeset
   243
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   244
  $ cat << EOF >> $HGRCPATH
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   245
  > [hooks]
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   246
  > incoming.notify = python:hgext.notify.hook
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   247
  > 
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   248
  > [notify]
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   249
  > sources = pull
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   250
  > diffstat = True
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   251
  > EOF
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   252
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   253
pull
4094
fbf0e9acfd83 notify: don't try to fix addresses if notify.domain is not set
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4009
diff changeset
   254
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   255
  $ hg --cwd b rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13225
diff changeset
   256
  repository tip rolled back to revision 0 (undo pull)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13225
diff changeset
   257
  working directory now based on revision 0
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   258
  $ hg --traceback --cwd b pull ../a | \
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   259
  >   python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   260
  pulling from ../a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   261
  searching for changes
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   262
  adding changesets
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   263
  adding manifests
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   264
  adding file changes
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   265
  added 1 changesets with 1 changes to 1 files
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   266
  Content-Type: text/plain; charset="us-ascii"
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   267
  MIME-Version: 1.0
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   268
  Content-Transfer-Encoding: 7bit
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   269
  X-Test: foo
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   270
  Date: * (glob)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   271
  Subject: b
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   272
  From: test@test.com
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   273
  X-Hg-Notification: changeset 0647d048b600
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   274
  Message-Id: <*> (glob)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   275
  To: baz@test.com, foo@bar
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   276
  
12644
0490d2223882 test-notify: stabilize output
Mads Kiilerich <mads@kiilerich.com>
parents: 12642
diff changeset
   277
  changeset 0647d048b600 in b
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   278
  description: b
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   279
  diffstat:
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   280
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   281
   a |  1 +
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   282
   1 files changed, 1 insertions(+), 0 deletions(-)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   283
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   284
  diffs (6 lines):
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   285
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   286
  diff -r cb9a9f314b8b -r 0647d048b600 a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   287
  --- a/a	Thu Jan 01 00:00:00 1970 +0000
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   288
  +++ b/a	Thu Jan 01 00:00:01 1970 +0000
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   289
  @@ -1,1 +1,2 @@
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   290
   a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   291
  +a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   292
  (run 'hg update' to get a working copy)
7105
31837416ef4d tests: add some testing for patch.diffstat()
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6359
diff changeset
   293
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   294
test merge
7105
31837416ef4d tests: add some testing for patch.diffstat()
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6359
diff changeset
   295
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   296
  $ cd a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   297
  $ hg up -C 0
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   298
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   299
  $ echo a >> a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   300
  $ hg ci -Am adda2 -d '2 0'
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   301
  created new head
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   302
  $ hg merge
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   303
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   304
  (branch merge, don't forget to commit)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   305
  $ hg ci -m merge -d '3 0'
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   306
  $ cd ..
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   307
  $ hg --traceback --cwd b pull ../a | \
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   308
  >   python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   309
  pulling from ../a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   310
  searching for changes
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   311
  adding changesets
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   312
  adding manifests
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   313
  adding file changes
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   314
  added 2 changesets with 0 changes to 0 files
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   315
  Content-Type: text/plain; charset="us-ascii"
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   316
  MIME-Version: 1.0
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   317
  Content-Transfer-Encoding: 7bit
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   318
  X-Test: foo
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   319
  Date: * (glob)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   320
  Subject: adda2
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   321
  From: test@test.com
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   322
  X-Hg-Notification: changeset 0a184ce6067f
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   323
  Message-Id: <*> (glob)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   324
  To: baz@test.com, foo@bar
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   325
  
12644
0490d2223882 test-notify: stabilize output
Mads Kiilerich <mads@kiilerich.com>
parents: 12642
diff changeset
   326
  changeset 0a184ce6067f in b
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   327
  description: adda2
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   328
  diffstat:
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   329
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   330
   a |  1 +
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   331
   1 files changed, 1 insertions(+), 0 deletions(-)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   332
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   333
  diffs (6 lines):
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   334
  
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   335
  diff -r cb9a9f314b8b -r 0a184ce6067f a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   336
  --- a/a	Thu Jan 01 00:00:00 1970 +0000
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   337
  +++ b/a	Thu Jan 01 00:00:02 1970 +0000
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   338
  @@ -1,1 +1,2 @@
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   339
   a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   340
  +a
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   341
  Content-Type: text/plain; charset="us-ascii"
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   342
  MIME-Version: 1.0
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   343
  Content-Transfer-Encoding: 7bit
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   344
  X-Test: foo
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   345
  Date: * (glob)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   346
  Subject: merge
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   347
  From: test@test.com
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13446
diff changeset
   348
  X-Hg-Notification: changeset 6a0cf76b2701
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   349
  Message-Id: <*> (glob)
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   350
  To: baz@test.com, foo@bar
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   351
  
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13446
diff changeset
   352
  changeset 6a0cf76b2701 in b
12473
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   353
  description: merge
52aac5c5c2a6 tests: unify test-notify
Matt Mackall <mpm@selenic.com>
parents: 11889
diff changeset
   354
  (run 'hg update' to get a working copy)
13225
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   355
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   356
truncate multi-byte subject
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   357
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   358
  $ cat <<EOF >> $HGRCPATH
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   359
  > [notify]
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   360
  > maxsubject = 4
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   361
  > EOF
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   362
  $ echo a >> a/a
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   363
  $ hg --cwd a --encoding utf-8 commit -A -d '0 0' \
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   364
  >   -m `python -c 'print "\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4"'`
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   365
  $ hg --traceback --cwd b --encoding utf-8 pull ../a | \
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   366
  >   python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   367
  pulling from ../a
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   368
  searching for changes
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   369
  adding changesets
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   370
  adding manifests
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   371
  adding file changes
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   372
  added 1 changesets with 1 changes to 1 files
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   373
  Content-Type: text/plain; charset="us-ascii"
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   374
  MIME-Version: 1.0
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   375
  Content-Transfer-Encoding: 8bit
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   376
  X-Test: foo
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   377
  Date: * (glob)
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   378
  Subject: \xc3\xa0... (esc)
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   379
  From: test@test.com
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13446
diff changeset
   380
  X-Hg-Notification: changeset 7ea05ad269dc
13225
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   381
  Message-Id: <*> (glob)
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   382
  To: baz@test.com, foo@bar
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   383
  
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13446
diff changeset
   384
  changeset 7ea05ad269dc in b
13225
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   385
  description: \xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4 (esc)
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   386
  diffstat:
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   387
  
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   388
   a |  1 +
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   389
   1 files changed, 1 insertions(+), 0 deletions(-)
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   390
  
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   391
  diffs (7 lines):
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   392
  
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13446
diff changeset
   393
  diff -r 6a0cf76b2701 -r 7ea05ad269dc a
13225
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   394
  --- a/a	Thu Jan 01 00:00:03 1970 +0000
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   395
  +++ b/a	Thu Jan 01 00:00:00 1970 +0000
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   396
  @@ -1,2 +1,3 @@
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   397
   a
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   398
   a
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   399
  +a
e3bf16703e26 util: fix ellipsis() not to break multi-byte sequence (issue2564)
Yuya Nishihara <yuya@tcha.org>
parents: 12646
diff changeset
   400
  (run 'hg update' to get a working copy)