revspecs in recipes should be part of the URL

Bug #481748 reported by Andrew Bennetts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
bzr-builder
Triaged
Low
Unassigned

Bug Description

The current format has an optional revspec on the end of a line. It would be nicer if it were part of the URL, so that we can cleanly have other optional fields there instead.

Specifically,
  - the branch URL could have ;revno=1234 or similar as a suffix, and
  - this makes space for a featture Robert and I are working on (merging part of a tree from another branch).

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 481748] [NEW] revspecs in recipes should be part of the URL

On Fri Nov 13 06:18:45 UTC 2009 Andrew Bennetts wrote:
> Public bug reported:
>
> The current format has an optional revspec on the end of a line. It
> would be nicer if it were part of the URL, so that we can cleanly have
> other optional fields there instead.
>
> Specifically,
> - the branch URL could have ;revno=1234 or similar as a suffix, and
> - this makes space for a featture Robert and I are working on (merging part
> of a tree from another branch).

I would be happy to do this, and I think it was originally discussed as
a possibility. However, it would be great (and perhaps a blocker on doing
this) if bzr understood the URIs, not just bzr-builder.

What I mean is, if we pick ...;revno=1234 then

  bzr branch ....;revno=1234

should do the right thing.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

I agree with the intent of this bug.

Adding a bzr task so that we can get the functionality in to bzr.

Thanks,

James

Changed in bzr-builder:
status: New → Triaged
importance: Undecided → Low
Martin Pool (mbp)
tags: added: udd
Martin Pool (mbp)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Robert Collins (lifeless) wrote :

@james what functionality do you need in bzr?

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 481748] Re: revspecs in recipes should be part of the URL

On Wed, 07 Apr 2010 02:07:09 -0000, Robert Collins <email address hidden> wrote:
> @james what functionality do you need in bzr?

Basically being able to

  bzr branch <URI from recipe>

so that you don't have to do a transformation from what you know works
for recipes and what you know works from bzr.

I'd also prefer not to have the code to interpret the URI to branch +
revid in bzr-builder so that it can grow more easily to accommodate
other needs.

Thanks,

James

Revision history for this message
Robert Collins (lifeless) wrote :

On Wed, 2010-04-07 at 09:22 +0000, James Westby wrote:
> On Wed, 07 Apr 2010 02:07:09 -0000, Robert Collins <email address hidden> wrote:
> > @james what functionality do you need in bzr?
>
> Basically being able to
>
> bzr branch <URI from recipe>
>
> so that you don't have to do a transformation from what you know works
> for recipes and what you know works from bzr.
>
> I'd also prefer not to have the code to interpret the URI to branch +
> revid in bzr-builder so that it can grow more easily to accommodate
> other needs.

Hmm. But bzr-builder doesn't use the command line interface to bzr
anyway; and this is arguably a UI glue issue; so I don't actually agree
bzr needs or should change to permit this.

-Rob

Revision history for this message
James Westby (james-w) wrote :

On Wed, 07 Apr 2010 09:42:33 -0000, Robert Collins <email address hidden> wrote:
> On Wed, 2010-04-07 at 09:22 +0000, James Westby wrote:
> > On Wed, 07 Apr 2010 02:07:09 -0000, Robert Collins <email address hidden> wrote:
> > > @james what functionality do you need in bzr?
> >
> > Basically being able to
> >
> > bzr branch <URI from recipe>
> >
> > so that you don't have to do a transformation from what you know works
> > for recipes and what you know works from bzr.
> >
> > I'd also prefer not to have the code to interpret the URI to branch +
> > revid in bzr-builder so that it can grow more easily to accommodate
> > other needs.
>
> Hmm. But bzr-builder doesn't use the command line interface to bzr
> anyway;

Correct

> and this is arguably a UI glue issue;

I don't understand this point.

> so I don't actually agree
> bzr needs or should change to permit this.

I don't think it needs to, I think it should. I think we should avoid an
inconsistent interface here.

Thanks,

James

Revision history for this message
Aaron Bentley (abentley) wrote :

You can already specify a url as part of a revspec, e.g. "bzr branch -r 10:lp:bzrtools bzr.dev bzt" branches from bzrtools, not bzr.dev. Couldn't you use that syntax in bzr-builder?

And wouldn't it be infinite recursion if revspecs could contain urls which could contain revspecs, which...

Revision history for this message
James Westby (james-w) wrote :

On Tue, 27 Apr 2010 02:34:53 -0000, Aaron Bentley <email address hidden> wrote:
> You can already specify a url as part of a revspec, e.g. "bzr branch -r
> 10:lp:bzrtools bzr.dev bzt" branches from bzrtools, not bzr.dev.
> Couldn't you use that syntax in bzr-builder?

Kind of ugly, but yes, it would be possible in theory. Parsing
10:lp:bzrtools and distinguishing fromm lp:bzrtools wouldn't be easy,
but I imagine it's easy to distinguish using bzr.

> And wouldn't it be infinite recursion if revspecs could contain urls
> which could contain revspecs, which...

Yes, but it would require someone to write an infinitely long string to
cause bzr-builder to loop forever. You can't refer to an outer part from
an inner part as far as I know, so I don't think there's any potential
for abuse.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

On Tue, 27 Apr 2010 08:23:19 +0100, James Westby <email address hidden> wrote:
> On Tue, 27 Apr 2010 02:34:53 -0000, Aaron Bentley <email address hidden> wrote:
> > You can already specify a url as part of a revspec, e.g. "bzr branch -r
> > 10:lp:bzrtools bzr.dev bzt" branches from bzrtools, not bzr.dev.
> > Couldn't you use that syntax in bzr-builder?
>
> Kind of ugly, but yes, it would be possible in theory. Parsing
> 10:lp:bzrtools and distinguishing fromm lp:bzrtools wouldn't be easy,
> but I imagine it's easy to distinguish using bzr.

Plus it doesn't fit my desire to be able to copy the URL from a recipe
and prepend "bzr branch" to it to get that branch and tree that the
recipe will use.

Thanks,

James

Revision history for this message
Martin Pool (mbp) wrote :

There have been some discussions about syntax for this, including <https://lists.ubuntu.com/archives/ubuntu-distributed-devel/2009-December/000133.html>. I think this is now ready to implement?

Changed in bzr:
milestone: none → 2.2.0
Revision history for this message
John A Meinel (jameinel) wrote :

bumping the target, since this isn't in 2.2

Changed in bzr:
milestone: 2.2.0 → none
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This is related to some of the colocated branch work that has been happening.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.