Migrating Bazaar repositories to Git on Launchpad

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Migrating Bazaar repositories to Git on Launchpad

Balint Reczey
Dear Ubuntu Contributors!

Launchpad already supports git but there are still many active bzr
repositories there.

If you would like to migrate some of them to git I'd like to suggest
taking a look at bzr-git-mass-convert [1] based on bzr fast-export
(verifying the result with git-remote-bzr). It is a simple tool for
merging multiple bzr branches to a single git repository, set up for
pushing it back to Launchpad.

We (at the Foundations Team) use it for migrating our repositories and
there is also a wiki [2] page for tracking the migration schedule [3]
of popular repositories.

For example we plan migrating livecd-rootfs on December 12, please get
your open MP's merged by then to avoid the extra work of resubmitting
them against the new git repo.

There is also a new tracker to list packages still maintained in bzr,
grouped by the teams [4].

Cheers,
Balint

[1] https://code.launchpad.net/~ubuntu-core-dev/+git/bzr-git-mass-convert/+ref/master
[2] https://wiki.ubuntu.com/UbuntuDevelopment/MigratingFromBzrToGit
[3] https://wiki.ubuntu.com/UbuntuDevelopment/MigratingFromBzrToGit#Migration_Schedule
[4] http://people.canonical.com/~rbalint/bzr_repos_by_team.html

--
Balint Reczey
Ubuntu & Debian Developer

--
ubuntu-devel mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
Reply | Threaded
Open this post in threaded view
|

Re: Migrating Bazaar repositories to Git on Launchpad

Scott Moser-4
Hi balint,
Thanks for bzr-git-maas-convert.  I wonder if you'd be interested in
attempting to add a few features to it that I have used in my bzr2git
I have a gist at
 https://gist.github.com/smoser/e4e5388faa6dcc92d8acfb1b7fbabb7c
which i utilize and hand-patch a installed bzr-fastimport.

The changes maintain some vcs data that would otherwise be lost:

a.) bug metadata converted: Bzr contains 'fixes' metadata
(bzr commit --fixes) that does not get moved over to git.
This updates the commit message exported to git to
contain LP: #XXXXXX for each --fixes=lp:XXXXXX in bzr.

b.) bzr revno info: Often times bug or other references to code may
say 'fixed in revno XXX'. That information gets lost in a conversion to git.
 The patch here updates commit messages to contain bzr-revno: XXX
for each bzr revision.

On Sat, Nov 24, 2018 at 5:31 PM Balint Reczey
<[hidden email]> wrote:

>
> Dear Ubuntu Contributors!
>
> Launchpad already supports git but there are still many active bzr
> repositories there.
>
> If you would like to migrate some of them to git I'd like to suggest
> taking a look at bzr-git-mass-convert [1] based on bzr fast-export
> (verifying the result with git-remote-bzr). It is a simple tool for
> merging multiple bzr branches to a single git repository, set up for
> pushing it back to Launchpad.
>
> We (at the Foundations Team) use it for migrating our repositories and
> there is also a wiki [2] page for tracking the migration schedule [3]
> of popular repositories.
>
> For example we plan migrating livecd-rootfs on December 12, please get
> your open MP's merged by then to avoid the extra work of resubmitting
> them against the new git repo.
>
> There is also a new tracker to list packages still maintained in bzr,
> grouped by the teams [4].
>
> Cheers,
> Balint
>
> [1] https://code.launchpad.net/~ubuntu-core-dev/+git/bzr-git-mass-convert/+ref/master
> [2] https://wiki.ubuntu.com/UbuntuDevelopment/MigratingFromBzrToGit
> [3] https://wiki.ubuntu.com/UbuntuDevelopment/MigratingFromBzrToGit#Migration_Schedule
> [4] http://people.canonical.com/~rbalint/bzr_repos_by_team.html
>
> --
> Balint Reczey
> Ubuntu & Debian Developer
>
> --
> ubuntu-devel mailing list
> [hidden email]
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

--
ubuntu-devel mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
Reply | Threaded
Open this post in threaded view
|

Re: Migrating Bazaar repositories to Git on Launchpad

Balint Reczey
Hi Scott,

On Mon, Nov 26, 2018 at 4:05 PM Scott Moser <[hidden email]> wrote:

>
> Hi balint,
> Thanks for bzr-git-maas-convert.  I wonder if you'd be interested in
> attempting to add a few features to it that I have used in my bzr2git
> I have a gist at
>  https://gist.github.com/smoser/e4e5388faa6dcc92d8acfb1b7fbabb7c
> which i utilize and hand-patch a installed bzr-fastimport.
>
> The changes maintain some vcs data that would otherwise be lost:
>
> a.) bug metadata converted: Bzr contains 'fixes' metadata
> (bzr commit --fixes) that does not get moved over to git.
> This updates the commit message exported to git to
> contain LP: #XXXXXX for each --fixes=lp:XXXXXX in bzr.
>
> b.) bzr revno info: Often times bug or other references to code may
> say 'fixed in revno XXX'. That information gets lost in a conversion to git.
>  The patch here updates commit messages to contain bzr-revno: XXX
> for each bzr revision.

Thanks, this is really useful!
I have set up a PPA for the package with a slightly modified patch here:
https://launchpad.net/~rbalint/+archive/ubuntu/bzr-to-git

Now the format conforms a bit more to git conventions:

commit b35d0353ee30ef8d72d14b25fff8662264e6c2a6
Author: Foo <...>
Date: Mon Nov 26 19:00:07 2018 +0100

    Have a nice day!

    LP: #12345
    LP: #444444
    Co-Authored-By: Bar
    Bzr-Rev: 864.3

Cheers,
Balint

>
> On Sat, Nov 24, 2018 at 5:31 PM Balint Reczey
> <[hidden email]> wrote:
> >
> > Dear Ubuntu Contributors!
> >
> > Launchpad already supports git but there are still many active bzr
> > repositories there.
> >
> > If you would like to migrate some of them to git I'd like to suggest
> > taking a look at bzr-git-mass-convert [1] based on bzr fast-export
> > (verifying the result with git-remote-bzr). It is a simple tool for
> > merging multiple bzr branches to a single git repository, set up for
> > pushing it back to Launchpad.
> >
> > We (at the Foundations Team) use it for migrating our repositories and
> > there is also a wiki [2] page for tracking the migration schedule [3]
> > of popular repositories.
> >
> > For example we plan migrating livecd-rootfs on December 12, please get
> > your open MP's merged by then to avoid the extra work of resubmitting
> > them against the new git repo.
> >
> > There is also a new tracker to list packages still maintained in bzr,
> > grouped by the teams [4].
> >
> > Cheers,
> > Balint
> >
> > [1] https://code.launchpad.net/~ubuntu-core-dev/+git/bzr-git-mass-convert/+ref/master
> > [2] https://wiki.ubuntu.com/UbuntuDevelopment/MigratingFromBzrToGit
> > [3] https://wiki.ubuntu.com/UbuntuDevelopment/MigratingFromBzrToGit#Migration_Schedule
> > [4] http://people.canonical.com/~rbalint/bzr_repos_by_team.html
> >
> > --
> > Balint Reczey
> > Ubuntu & Debian Developer
> >
> > --
> > ubuntu-devel mailing list
> > [hidden email]
> > Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel



--
Balint Reczey
Ubuntu & Debian Developer

--
ubuntu-devel mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel