comparison docs/setup.rst @ 4848:570a4e40f0bb

docs: improve issue tracker integration docs
author Andrew Shadura <andrew@shadura.me>
date Wed, 25 Feb 2015 14:06:27 +0100
parents a9a1560dad79
children 03bbd33bc084
comparison
equal deleted inserted replaced
4847:fc311d8c3997 4848:570a4e40f0bb
445 445
446 issue_pat = (?:^#|\s#)(\w+) 446 issue_pat = (?:^#|\s#)(\w+)
447 issue_server_link = https://myissueserver.com/{repo}/issue/{id} 447 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
448 issue_prefix = # 448 issue_prefix = #
449 449
450 `issue_pat` is the regular expression that will fetch issues from commit messages. 450 `issue_pat` is the regular expression describing which strings in
451 Default regex will match issues in format of #<number> eg. #300. 451 commit messages will be treated as issue references. A match group in
452 452 parentheses should be used to specify the actual issue id.
453 Matched issues will be replace with the link specified as `issue_server_link` 453
454 {id} will be replaced with issue id, and {repo} with repository name. 454 The default expression matches issues in the format '#<number>', e.g. '#300'.
455 Since the # is striped `issue_prefix` is added as a prefix to url. 455
456 `issue_prefix` can be something different than # if you pass 456 Matched issues are replaced with the link specified as `issue_server_link`
457 ISSUE- as issue prefix this will generate an url in format:: 457 {id} is replaced with issue id, and {repo} with repository name.
458 Since the # is stripped away, `issue_prefix` is prepended to the link text.
459 `issue_prefix` doesn't necessarily need to be #: if you set issue
460 prefix to ISSUE- this will generate a URL in format::
458 461
459 <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a> 462 <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a>
463
464 If needed, more than one pattern can be specified by appending a unique suffix to
465 the variables. For example::
466
467 issue_pat_wiki = (?:wiki-)(.+)
468 issue_server_link_wiki = https://mywiki.com/{id}
469 issue_prefix_wiki = WIKI-
470
471 With these settings, wiki pages can be referenced as wiki-some-id, and every
472 such reference will be transformed into::
473
474 <a href="https://mywiki.com/some-id">WIKI-some-id</a>
475
460 476
461 Hook management 477 Hook management
462 --------------- 478 ---------------
463 479
464 Hooks can be managed in similar way to this used in .hgrc files. 480 Hooks can be managed in similar way to this used in .hgrc files.