/brz-propose/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/brz-propose/trunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
brz-propose
===========

``brz-propose`` is a plugin for `Breezy <https://www.breezy-vcs.org/>`_ that
provides support for interacting with code hosting sites.

It provides the following extra commands for Breezy:

* ``brz publish``: publish a derived branch
* ``brz propose``: publish and propose a branch for merging
* ``brz find-merge-proposal``: locate branch proposals

Supported codehosting sites
---------------------------

brz-propose currently supports the following two centralized codehosting sites:

* `GitHub <https://www.github.com/>`_
* `Launchpad <https://launchpad.net/>`_

It also supports `GitLab <https://www.gitlab.com>`_ instances such as
`GitLab.com <https://www.gitlab.com/>`_ or
`Debian Salsa <https://salsa.debian.org>`_.

Support for `BitBucket <https://bitbucket.org/>`_ and Gerrit is planned.

Usage
-----

GitHub
~~~~~~

First, log into GitHub::

    $ brz github-login mylogin

Then, you can clone a repository::

    $ brz branch git://github.com/breezy-team/breezy
    $ cd breezy

Make a test change::

    $ touch test
    $ brz add test
    $ brz commit -m "Add test file"

And then propose the change for merging::

    $ brz propose --name my-branch-name

This last command will:

 * create a fork of the *breezy-team/breezy* named *mylogin/breezy* at
   https://github.com/mylogin/breezy (if it did not exist)
 * push the local branch with the test change to a remote branch named
   ``my-branch-name`` in the new remote repository
 * create a pull request on GitHub proposing the merge of ``my-branch-name``
   into the main branch

Launchpad
~~~~~~~~~

First, log into Launchpad::

    $ brz lp-login mylogin

Then, you can clone a branch::

    $ brz branch lp:brz
    $ cd brz

Make a test change::

    $ touch test
    $ brz add test
    $ brz commit -m "Add test file"

And then propose the change for merging::

    $ brz propose --name my-branch-name

This last command will:

 * push the local branch to a new branch at *lp:~mylogin/brz/my-branch-name*
 * create a merge proposal on Launchpad merging
   *lp:~mylogin/brz/my-branch-name* into *lp:brz*

GitLab
~~~~~~

First, log into your GitLab instance. Here, we'll use Debian's `salsa
<https://salsa.debian.org/>`_. When logged into your account in a web browser,
create a private token. Then run::

    $ brz gitlab-login https://salsa.debian.org private-token

Then, clone a branch::

    $ brz branch https://salsa.debian.org/jelmer/xandikos
    $ cd xandikos

Make a test change::

    $ touch test
    $ brz add test
    $ brz commit -m "Add test file"

And then propose the change for merging::

    $ brz propose --name my-branch-name

This last command will:

 * create a fork of the *jelmer/xandikos* project named *mylogin/xandikos* at
   https://salsa.debian.org/mylogin/xandikos (if it did not exist)
 * push the local branch with the test change to a remote branch named
   ``my-branch-name`` in the new remote repository
 * create a pull request on GitLab proposing the merge of ``my-branch-name``
   into the main branch