comparison doc/jp/merge-request.rst @ 3041:72583524cfd3

doc (jp): jp commands are now fully documented: rel 232
author Goffi <goffi@goffi.org>
date Tue, 01 Oct 2019 22:49:06 +0200
parents
children
comparison
equal deleted inserted replaced
3040:fee60f17ebac 3041:72583524cfd3
1 ===============================================
2 merge-request: create and manage merge requests
3 ===============================================
4
5 Merge-request are used to propose some modifications to a project. They are generic and
6 are made to be used with several backends, but only Mercurial is implemented so far.
7
8 To prepare a merge request with Mercurial, you just need to have a clone of the project,
9 and do your modifications (either directly, or in a bookmark, a branch, or a MQ patch).
10
11 set
12 ===
13
14 Create and publish a merge request. Once the modification on the project are done, simply
15 run the command from the repository (or specify its path with ``-r PATH, --repository
16 PATH``). If the project has set metadata (it can be done with a magic string in README),
17 you don't have to specify any service or node, it will be set automatically (but you still
18 can specify them if needed).
19
20 You may associate one or more labels to your request using ``-l LABELS, --label LABELS``.
21
22 By default, a confirmation is requested before publishing the request, you can publish
23 without confirmation by using the ``-f, --force`` flag.
24
25 If you have already done a merge request and you just want to update it, check its id and
26 specify it with ``-i ITEM, --item ITEM``, this will override the previous request with the
27 new updated one.
28
29 examples
30 --------
31
32 Publish a merge request (to be executed from the repository of the project you have
33 modified)::
34
35 $ jp merge-request set
36
37 Update an existing merge request, which has the id ``123`` (to be executed from the
38 reposiroty of the project you have modified)::
39
40 $ jp merge-request set -i 123
41
42 Do a merge request for repository at path ``~/some_project``, specifying a label
43 indicating it's work in progress (WIP)::
44
45 $ jp merge-request set -r ~/some_project --label WIP
46
47
48 get
49 ===
50
51 Get and print one or more merge requests. By default only some metadata are shown (without
52 the patches), but you can use ``--verbose, -v`` to show details.
53
54 examples
55 --------
56
57 Show some metadata of last 5 merge requests::
58
59 $ jp merge-request get -M 5
60
61 Display details for merge request with id 456::
62
63 $ jp merge-request get -v -i 456
64
65
66 import
67 ======
68
69 Import a merge request into your project. You mainly have to be in the project repository
70 (or specify it using ``-r PATH, --repository PATH``) and to specify the id of the patch to
71 import (using ``-i ITEM, --item ITEM``). The behaviour depends of the type of the patch,
72 for Mercurial, the patch will be imported as `MQ`_ patch.
73
74 .. _MQ: https://www.mercurial-scm.org/wiki/MqExtension
75
76 example
77 -------
78
79 Import the merge request with id 321::
80
81 $ jp merge-request import -i 321