<commit_before>About
=====

git-lp is a tool that allows you to use git to work with Launchpad.net.

Tutorial
========

Create a new repository for working with a single Launchpad.net project:

    $ git lp init checkbox && cd checkbox

Get the initial code from Launchpad.net. This can be accelerated if you have an
existing bzr branch somewhere (pass the --cache option)

    $ git lp fetch

Start working on a feature/bug in a dedicated branch:

    $ git lp branch feature-foo

While you want:
 - Hack on your code
 - Commit with git
 - Rebase, squash, etc

At any time you can push your branch to Launchpad.net for reviews. This will
push the code to lp:~yourlaunchpadusername/project/feature-foo.

    $ git lp push

You can easily react to review feedback: commit new patches, rework and amend
existing patches, anything that you want to. Once you are ready share your code
again just run push again. You may need to pass --overwrite to push if you've
been rewriting history though (but that is okay as you're working on a merge
request and it has not yet landed)

    $ git lp push --overwrite

Installation
============

This has been tested on Ubuntu 12.10 Quantal with bzr trunk but I believe it
should apply cleanly to packaged versions as well.

1. Download https://raw.github.com/zyga/git-lp/master/bzr.patch 
2. Apply it to your system (reinstall bzr to revert)

    You may want to read the outcome of this merge request to know if this
    patch has been accepted or well reviewed by the Bazaar maintainers. Once
    this is fixed then you won't have to patch your bzr anymore obviously.

    https://code.launchpad.net/~zkrynicki/bzr/find_ancestors/+merge/127610

3. Put git-lp (https://raw.github.com/zyga/git-lp/master/git-lp) somewhere in
   your PATH.
4. Install bzr-fastimport (sudo apt-get install bzr-fastimport)<commit_msg>add manual bzr fastimport installation instruction to readme<commit_after>About
=====

git-lp is a tool that allows you to use git to work with Launchpad.net.

Tutorial
========

Create a new repository for working with a single Launchpad.net project:

    $ git lp init checkbox && cd checkbox

Get the initial code from Launchpad.net. This can be accelerated if you have an
existing bzr branch somewhere (pass the --cache option)

    $ git lp fetch

Start working on a feature/bug in a dedicated branch:

    $ git lp branch feature-foo

While you want:
 - Hack on your code
 - Commit with git
 - Rebase, squash, etc

At any time you can push your branch to Launchpad.net for reviews. This will
push the code to lp:~yourlaunchpadusername/project/feature-foo.

    $ git lp push

You can easily react to review feedback: commit new patches, rework and amend
existing patches, anything that you want to. Once you are ready share your code
again just run push again. You may need to pass --overwrite to push if you've
been rewriting history though (but that is okay as you're working on a merge
request and it has not yet landed)

    $ git lp push --overwrite

Installation
============

This has been tested on Ubuntu 12.10 Quantal with bzr trunk but I believe it
should apply cleanly to packaged versions as well.

1. Download https://raw.github.com/zyga/git-lp/master/bzr.patch 
2. Apply it to your system (reinstall bzr to revert)

    You may want to read the outcome of this merge request to know if this
    patch has been accepted or well reviewed by the Bazaar maintainers. Once
    this is fixed then you won't have to patch your bzr anymore obviously.

    https://code.launchpad.net/~zkrynicki/bzr/find_ancestors/+merge/127610

3. Put git-lp (https://raw.github.com/zyga/git-lp/master/git-lp) somewhere in
   your PATH.
4. Install bzr-fastimport (sudo apt-get install bzr-fastimport)
   If you're using Ubuntu 15.10 or newer, chances are that bzr-fastimport is
   not available in the archive. You can install it as a local plugin by
   running:

        $ mkdir -p ~/.bazaar/plugins
        $ bzr branch lp:bzr-fastimport ~/.bazaar/plugins/fastimport

   Make sure that python-fastimport is installed (sudo apt-get install
   python-fastimport)
{'fraction_non_alphanumeric': 0.06939371804236669, 'fraction_numerical': 0.007791575359142927, 'mean_word_length': 3.4945295404814005, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1903082', 'n_tokens_mistral': 1247, 'n_tokens_neox': 1131, 'n_words': 582}