generally applicable way to refer to parent or stored locations

Bug #252894 reported by RLVJ
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Wishlist
Unassigned

Bug Description

This feature would provide a generic way to refer to the parent of a branch in user operations.

It would allow things similar to:
bzr push bzr://parent/Branch
    or
bzr switch bzr://parent/OtherBranch

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

% bzr missing :parent

This may be insufficiently documented; could you please see if it's missing from the user guide.

Changed in bzr:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
James Westby (james-w) wrote :

Hi,

1.6 will have a feature so that you can run

  bzr push :parent

to use the current branch's parent as the target. Does
that fit your request, or are you after way to refer to the
parent of an arbitrary branch in any operation?

Thanks,

James

Changed in bzr:
importance: Medium → Undecided
importance: Undecided → Wishlist
Revision history for this message
RLVJ (nathan-johnson) wrote :

I was meaning a way to refer to the parent of the current branch for any operation.

This could be ambiguous in the case of nested branches.
For a nested branch, does the operation (push) refer to the parent of the encompassing branch or the nested branch?

Some more flexible and difficult to implement functionality would be to allow for arbitrary levels of indirection, including things like:
parent of the parent of the encompassing branch of the current branch.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 252894] Re: generally applicable way to refer to parent or stored locations

On Tue, 2008-07-29 at 11:13 +0000, RLVJ wrote:
> I was meaning a way to refer to the parent of the current branch for any
> operation.

That's what the ":parent" notation allows.

>
> This could be ambiguous in the case of nested branches.
> For a nested branch, does the operation (push) refer to the parent of the encompassing branch or the nested branch?
>

It will refer to the parent of the nested branch.

Could we close this bug as being fixed in the 1.6 release with the
":parent" notation? It seems like it implements what you want.

> Some more flexible and difficult to implement functionality would be to allow for arbitrary levels of indirection, including things like:
> parent of the parent of the encompassing branch of the current branch.
>

I'm not sure why you'd ever want to do this, could you explain please?

For the encompassing branch part the two branches are not likely
to be compatible in the nested tree case, so
"bzr push :parent-of-encompassing-branch" will fail.

As for arbitrary nesting of this, i.e. "bzr push :parent:parent", it
would be possible, but once you get beyond 2 levels it's probably
hard to remember which branch you are referring to, and so using URLs
is proabably going to be easier. You don't need to think "was it
:parent:submit:parent, or :parent:parent:submit".

Thanks,

James

Revision history for this message
RLVJ (nathan-johnson) wrote :

>Could we close this bug as being fixed in the 1.6 release with the ":parent" notation?
Yes.

> It seems like it implements what you want.
Yes.

>Thanks,
No need for that. Thank _you_!

Revision history for this message
RLVJ (nathan-johnson) wrote :

I realize now I was unclear and not distinguishing between 2 things.

One is what is the parent branch. that is what ":parent" refers to.
The other is the repository of the parent branch (parent repository?) which is what one needs in the "switch" example.

As far as need goes, being able to refer to the parent branch (:parent) seems the more needed feature, but when switching branches from the same sever, being able to refer to the repository of the parent branch would be a convenience.

Revision history for this message
Dan Watkins (oddbloke) wrote :

On Tue, 29 Jul 2008 13:17:59 -0000
RLVJ <email address hidden> wrote:
> One is what is the parent branch. that is what ":parent" refers to.
> The other is the repository of the parent branch (parent repository?)
> which is what one needs in the "switch" example.
In many cases, the repository of the parent branch will be at the same
location as the parent branch itself. In this case, it isn't clear
what should happen.

> As far as need goes, being able to refer to the parent branch
> (:parent) seems the more needed feature, but when switching branches
> from the same sever, being able to refer to the repository of the
> parent branch would be a convenience.
bzr considers shared repositories (which seems to be what you mean when
you refer to repositories) to be a storage optimisation only. In that
context, assuming that you will want to switch between branches that
use a particular repository doesn't make a great deal of sense, as they
may well not be related.

Given these two points, I think it's unlikely that a change which
started using shared repositories differently would make it into the
core, as it could easily cause a great deal of confusion.

Having said that, something like this could almost certainly be done in
a plugin, if someone really wanted it (especially if it was just
special-casing switch). That would have the twin advantages of people
having to opt-in to this behaviour, and the bzr core devs not having to
deal with any problems it causes. :)

Regards,
--
Daniel Watkins (Odd_Bloke)

Dan Watkins (oddbloke)
Changed in bzr:
milestone: none → 1.6
status: Incomplete → Fix Released
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.