Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Development (http://www.linux-archive.org/ubuntu-development/)
-   -   Merging with Bazaar (http://www.linux-archive.org/ubuntu-development/275553-merging-bazaar.html)

James Westby 11-05-2009 06:34 PM

Merging with Bazaar
 
Hi all,

Thanks to a whole bunch of work from quite a few people coming together
now is a great time to do merging in bzr. In particular as MoM is down,
this will allow you to merge without lots of faff. Unfortunately not
every package is imported yet, but with >14,000 imported there should
be plenty to work on.

You can read documentation on how to do it at

https://wiki.ubuntu.com/DistributedDevelopment/Documentation

specifically at

https://wiki.ubuntu.com/DistributedDevelopment/Documentation/Merging

but the short of it is: get

lp:ubuntu/<package>

and run

bzr merge-package lp:debian/<series>/<package>

where <series> could be lenny, squeeze, sid, experimental as appropriate.

The pre-requisites are currently to be running karmic and have
bzr and bzr-builddeb installed. Those on releases earlier than karmic
will be stuck for the time being unfortunately, as we are using some
very new code to make all this happen.

Please file bugs as appropriate, and help improve the documentation
on the wiki. In addition we have just created a new mailing list to
discuss the intersection of Ubuntu, Bazaar, Launchpad, etc.,

https://lists.ubuntu.com/mailman/listinfo/ubuntu-distributed-development

so if you are interested please subscribe there and start discussing.
Ubuntu development will always be on topic here, but if you would like
to talk about the other tools and how they affect that then that may
be a better forum as it has a more specific audience.

Thanks,

James

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

Martin Pitt 11-05-2009 09:42 PM

Merging with Bazaar
 
Hello all,

James Westby [2009-11-05 19:34 +0000]:
> https://wiki.ubuntu.com/DistributedDevelopment/Documentation/Merging

o/ Thanks for making that so easy!

> but the short of it is: get
>
> lp:ubuntu/<package>

There's one thing to watch here: We already have had lots of
packages in "real" bzr branches (not the per-upload granularity
auto-imports). So before you merge a package, please check if it has a
Vcs-Bzr: header. If so, please use that, not the auto-imported branch.

Nowadays I keep getting a lot of merge requests which were done
against the auto-import; these are not mergeable at all, since they
have zero common history).

Thanks for considering, and have fun merging!

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

James Westby 11-05-2009 10:55 PM

Merging with Bazaar
 
On Thu Nov 05 22:42:56 +0000 2009 Martin Pitt wrote:
> There's one thing to watch here: We already have had lots of
> packages in "real" bzr branches (not the per-upload granularity
> auto-imports). So before you merge a package, please check if it has a
> Vcs-Bzr: header. If so, please use that, not the auto-imported branch.
>
> Nowadays I keep getting a lot of merge requests which were done
> against the auto-import; these are not mergeable at all, since they
> have zero common history).

Ah yes, thanks for bringing this up Martin, I forgot that there was
another point I wanted to make.

We are now finally in a position to make this problem go away. Therefore
I need to know candidate packages that this should be done for. The
following criteria must be met:

* You are happy to have a bot commit to the branch if someone else
uploads without pushing.

* The branch contains the full source of the package, not just
./debian/, and you are willing to embrace the proposed way of
structuring the package. I know some people are attached to their
./debian/ only branches, but that way is an evolutionary dead-end,
so I am unwilling to make it part of this effort.

* The branch is up to date with what is in the archive.

I will review and change the links when I get some time, this will mean
the outlined procedure will work for your branches without other developers
having to notice that the package is special. I am generating a list based
on Vcs-Bzr, but I haven't finished the scripts to do these checks for me
yet, and there are too many to review completely by hand.

Thanks,

James

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

Mike Rooney 11-05-2009 11:13 PM

Merging with Bazaar
 
On Thu, Nov 5, 2009 at 11:34 AM, James Westby <jw+debian@jameswestby.net> wrote:
> Hi all,
>
> Thanks to a whole bunch of work from quite a few people coming together
> now is a great time to do merging in bzr. In particular as MoM is down,
> this will allow you to merge without lots of faff. Unfortunately not
> every package is imported yet, but with >14,000 imported there should
> be plenty to work on.

This sounds like an excellent step forward! Is there anything
actionable for upstreams here, in or not in Debian? For example as the
author of a package in Ubuntu, hosted on Launchpad, is there anything
I can do to make new versions and fixes easier? Currently I have a
branch with the code and a separate packing branch with gets merged
in, but this is only because at the time MOTU told me that was the
easiest way and actually asked me to move debian/ out of the upstream
source where I was happily maintaining it.

--
Michael Rooney
mrooney@ubuntu.com

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

James Westby 11-06-2009 12:56 AM

Merging with Bazaar
 
On Thu Nov 05 23:55:19 +0000 2009 James Westby wrote:
> On Thu Nov 05 22:42:56 +0000 2009 Martin Pitt wrote:
> > There's one thing to watch here: We already have had lots of
> > packages in "real" bzr branches (not the per-upload granularity
> > auto-imports). So before you merge a package, please check if it has a
> > Vcs-Bzr: header. If so, please use that, not the auto-imported branch.
> >
> > Nowadays I keep getting a lot of merge requests which were done
> > against the auto-import; these are not mergeable at all, since they
> > have zero common history).
>
> Ah yes, thanks for bringing this up Martin, I forgot that there was
> another point I wanted to make.
>
> We are now finally in a position to make this problem go away. Therefore
> I need to know candidate packages that this should be done for. The
> following criteria must be met:
>
> * You are happy to have a bot commit to the branch if someone else
> uploads without pushing.
>
> * The branch contains the full source of the package, not just
> ./debian/, and you are willing to embrace the proposed way of
> structuring the package. I know some people are attached to their
> ./debian/ only branches, but that way is an evolutionary dead-end,
> so I am unwilling to make it part of this effort.
>
> * The branch is up to date with what is in the archive.

Oh, and all the branches for Debian/Ubuntu that you want to have this
happen to must be hosted on Launchpad. Unfortunately I haven't yet backdoored
bzr to allow me write access to any branch I choose, we need LP magic to
do this.

[ For those interested, LP currently allows a very restricted set of people
to set the links that make this work, so it's not a button that just anyone
can press to gain write access to your branch. However, it's not good even
allowing me to do that, so they wish to implement a handshake, or only
allow those in the intersection of uploaders and branch owners to set the
link, so that it's not vulnerable to attack. ]

Thanks,

James


--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

Steve Langasek 11-06-2009 05:10 AM

Merging with Bazaar
 
On Thu, Nov 05, 2009 at 07:34:49PM +0000, James Westby wrote:

> Thanks to a whole bunch of work from quite a few people coming together
> now is a great time to do merging in bzr. In particular as MoM is down,
> this will allow you to merge without lots of faff. Unfortunately not
> every package is imported yet, but with >14,000 imported there should
> be plenty to work on.

> You can read documentation on how to do it at

> https://wiki.ubuntu.com/DistributedDevelopment/Documentation

> specifically at

> https://wiki.ubuntu.com/DistributedDevelopment/Documentation/Merging

> but the short of it is: get

> lp:ubuntu/<package>

> and run

> bzr merge-package lp:debian/<series>/<package>

> where <series> could be lenny, squeeze, sid, experimental as appropriate.

Doesn't seem to work for native packages?

$ bzr merge-package lp:debian/squeeze/ucf
bzr: ERROR: No such tag: upstream-3.0021
$

Am I doing something wrong, or should I fall back to a MoM merge for now?

Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org
--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

Reinhard Tartler 11-06-2009 05:41 AM

Merging with Bazaar
 
James Westby <jw+debian@jameswestby.net> writes:

> but the short of it is: get
>
> lp:ubuntu/<package>
>
> and run
>
> bzr merge-package lp:debian/<series>/<package>
>
> where <series> could be lenny, squeeze, sid, experimental as
> appropriate.

Thank you very much on your work on this.

I just want to add that in my experience, it is more convinient and
practical to merge the other way round:

$ bzr get lp:debian/<series>/<package> lucid ; cd lucid
$ bzr merge-package lp:debian/<package>

In some package, I got significant less conflicts. The other reason is
that 'bzr revert <file>' will revert the file to the version in debian,
not in ubuntu. In most cases this is what I want, as the general rule is
to reduce the interdiff to debian.

Next experience: since there are in some cases quite a lot of conflicts,
you might find the 'bzr remerge <file>' command handy. This allows to
redo a merge on a file, either with the same or some other merge algorithm.

At the end of the process, just before committing the merge, a 'bzr
diff' will show the diff to the debian package. The fact that you can
limit this diffs to files and subdirectories makes it much easier to
decide which parts of the diff can and should be upstreamed to debian.

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

James Westby 11-06-2009 06:47 AM

Merging with Bazaar
 
On Fri Nov 06 06:10:05 +0000 2009 Steve Langasek wrote:
> Doesn't seem to work for native packages?
>
> $ bzr merge-package lp:debian/squeeze/ucf
> bzr: ERROR: No such tag: upstream-3.0021
> $
>
> Am I doing something wrong, or should I fall back to a MoM merge for now?

Please file a bug and fall back to using "bzr merge" for now.

Thanks,

James

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

James Westby 11-06-2009 06:50 AM

Merging with Bazaar
 
On Fri Nov 06 06:41:54 +0000 2009 Reinhard Tartler wrote:
> Thank you very much on your work on this.
>
> I just want to add that in my experience, it is more convinient and
> practical to merge the other way round:
>
> $ bzr get lp:debian/<series>/<package> lucid ; cd lucid
> $ bzr merge-package lp:debian/<package>
>
> In some package, I got significant less conflicts. The other reason is
> that 'bzr revert <file>' will revert the file to the version in debian,
> not in ubuntu. In most cases this is what I want, as the general rule is
> to reduce the interdiff to debian.

This gets the parents the wrong way round though, so I do not advise it.

For the revert issue, you can use "bzr revert -rbranch:lp:debian/<series>/<package>"

I'm not sure why that's your experience with conflicts, if you give me
a package that you saw this with then I can investigate.

> At the end of the process, just before committing the merge, a 'bzr
> diff' will show the diff to the debian package. The fact that you can
> limit this diffs to files and subdirectories makes it much easier to
> decide which parts of the diff can and should be upstreamed to debian.

Note that this is still possible with the merge the "correct" way round.

bzr diff --old lp:debian/<series>/<package>

This is the sort of thing that we should automate more to save typing.

Thanks,

James

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

Reinhard Tartler 11-06-2009 07:09 AM

Merging with Bazaar
 
James Westby <jw+debian@jameswestby.net> writes:

> On Fri Nov 06 06:41:54 +0000 2009 Reinhard Tartler wrote:
>> Thank you very much on your work on this.
>>
>> I just want to add that in my experience, it is more convinient and
>> practical to merge the other way round:
>>
>> $ bzr get lp:debian/<series>/<package> lucid ; cd lucid
>> $ bzr merge-package lp:debian/<package>
>>
>> In some package, I got significant less conflicts. The other reason is
>> that 'bzr revert <file>' will revert the file to the version in debian,
>> not in ubuntu. In most cases this is what I want, as the general rule is
>> to reduce the interdiff to debian.
>
> This gets the parents the wrong way round though, so I do not advise it.

What is the correct order for parents? Why does it matter here and what
are the practical consequences in this scenario?

Aren't the branches thrown away after the merge anyway?

(I don't want to be pendantic, I just want to understand why the
ordering of the parents is important here)

> For the revert issue, you can use "bzr revert -rbranch:lp:debian/<series>/<package>"

Which is more cumbersome to type at the command line and imposes
latencies due to network access. Nothing serious, I agree.

> I'm not sure why that's your experience with conflicts, if you give me
> a package that you saw this with then I can investigate.

I will report it to you when I encounter this again.

>> At the end of the process, just before committing the merge, a 'bzr
>> diff' will show the diff to the debian package. The fact that you can
>> limit this diffs to files and subdirectories makes it much easier to
>> decide which parts of the diff can and should be upstreamed to debian.
>
> Note that this is still possible with the merge the "correct" way round.
>
> bzr diff --old lp:debian/<series>/<package>

Oh, that switch is news to me. Thanks for pointing it out!

> This is the sort of thing that we should automate more to save typing.

Absolutely!

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel


All times are GMT. The time now is 12:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.