Always remember push target

Bug #795024 reported by Olaf van der Spek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned

Bug Description

Suppose you do bzr push target1. bzr remembers the target, you do tons of commits and some more pushes.
Then you want to push to a new target, target2, so you do bzr push target2. However, bzr still remembers the old target, target1. You do tons of commits and another push. Oops, it's pushed to target1.
Wouldn't it be better to always remember the push target or to at least ask to remember if it's different?

Revision history for this message
Vincent Ladeuil (vila) wrote :

That's what --remember is for (bzr help push).

So you want 'bzr push --remember target2'

The most common way to use 'bzr push' (which you already know) is to use it without a location, when you change your mind, you tell bzr to remember that.

Revision history for this message
Olaf van der Spek (olafvdspek) wrote : Re: [Bug 795024] Re: Always remember push target

On Thu, Jun 9, 2011 at 5:07 PM, Vincent Ladeuil
<email address hidden> wrote:
> That's what --remember is for (bzr help push).
>
> So you want 'bzr push --remember target2'
>
> The most common way to use 'bzr push' (which you already know) is to use
> it without a location, when you change your mind, you tell bzr to
> remember that.

Remembering to tell bzr to remember it is the problem.

--
Olaf

Revision history for this message
Vincent Ladeuil (vila) wrote :

Hehe, I refrain for doing that one.

But the inverse is also true: you may forget to tell bzr to *not* remember when doing a push somewhere else.

If you prefer this behavior, you can still say:

  bzr alias push=push --remember

Revision history for this message
Vincent Ladeuil (vila) wrote :

bah, I missed some quotes:

  bzr alias push='push --remember'

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Hi Olaf,

On 09/06/11 16:17, Olaf van der Spek wrote:
> On Thu, Jun 9, 2011 at 5:07 PM, Vincent Ladeuil
> <email address hidden> wrote:
>> That's what --remember is for (bzr help push).
>>
>> So you want 'bzr push --remember target2'
>>
>> The most common way to use 'bzr push' (which you already know) is to use
>> it without a location, when you change your mind, you tell bzr to
>> remember that.
> Remembering to tell bzr to remember it is the problem.
You should be able to set an alias to always specify --remember, e.g.:
'bzr alias push="push --remember"'

That said, I have the same frustration with the remembered push
location. Remembering the last push location is often going to be
incorrect for me, but remembering the first location seems even worse.

Cheers,

Jelmer

Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

On Thu, Jun 9, 2011 at 5:20 PM, Vincent Ladeuil
<email address hidden> wrote:
> But the inverse is also true: you may forget to tell bzr to *not*
> remember when doing a push somewhere else.

True, but is that a common operation?

--
Olaf

Revision history for this message
Vincent Ladeuil (vila) wrote :

Hmm, thinking more about it, you said: "Wouldn't it be better to always remember the push target or to at least ask to remember if it's different?"

Asking will require user intervention and we avoid that when possible.

But changing the the remembered location when it is *specified* sounds interesting.

Indeed when you specify a location, it's probably more common to want it to be remembered than the opposite.

'--no-remember' can still be used for random pushes.

Do I understand you better this way ?

This may need discussion as merge/push/pull/send currently use the same logic regarding their behaviour for remembering the provided locations.

Changed in bzr:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

On Thu, Jun 9, 2011 at 5:31 PM, Jelmer Vernooij
<email address hidden> wrote:
>> Remembering to tell bzr to remember it is the problem.
> You should be able to set an alias to always specify --remember, e.g.:
> 'bzr alias push="push --remember"'

Setting aliases merely works around the problem.

> That said, I have the same frustration with the remembered push
> location. Remembering the last push location is often going to be
> incorrect for me, but remembering the first location seems even worse.

How about having bzr ask what should be done if a target is specified?
When is remembering the last one incorrect for you?

--
Olaf

Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

On Thu, Jun 9, 2011 at 5:42 PM, Vincent Ladeuil
<email address hidden> wrote:
> Hmm, thinking more about it, you said: "Wouldn't it be better to always
> remember the push target or to at least ask to remember if it's
> different?"
>
> Asking will require user intervention and we avoid that when possible.
>
> But changing the the remembered location when it is *specified* sounds
> interesting.
>
> Indeed when you specify a location, it's probably more common to want it
> to be remembered than the opposite.
>
> '--no-remember' can still be used for random pushes.
>
> Do I understand you better this way ?

Yes, you do.
--
Olaf

Revision history for this message
Barry Warsaw (barry) wrote :

On Jun 09, 2011, at 03:31 PM, Jelmer Vernooij wrote:

>That said, I have the same frustration with the remembered push
>location. Remembering the last push location is often going to be
>incorrect for me, but remembering the first location seems even worse.

I rather like the current behavior, especially coupled with
`bzr push :parent`. It almost always does what I want, and I guess the way I
lay out my working directories means it always makes sense for me. When I'm
unsure though I just run `bzr info` to find out exactly where the push is
going to go.

Revision history for this message
Wouter van Heyst (larstiq) wrote :

On Thu, Jun 09, 2011 at 15:32:27 -0000, Olaf van der Spek wrote:
> On Thu, Jun 9, 2011 at 5:20 PM, Vincent Ladeuil
> <email address hidden> wrote:
> > But the inverse is also true: you may forget to tell bzr to *not*
> > remember when doing a push somewhere else.
>
> True, but is that a common operation?

For me it is. The remembered location is nearly always correct for me
and I only push somewhere else as a one-off.

(A different problem is having to do multi-pushes for a longer period of
time, but that is not what this is about as far as I understand it).

When using the remembered location we say "Using saved push location: ...",
but nothing seems to be printed when pusing to another location (new or
not). Perhaps it might sense to say

    "Not using saved push location, but instead: ..."

Or something like that?

Wouter

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

Martin

I think automatically remembering the first one used is problematic,
because the user might not associate that action with it being saved,
or have an intention to save it then.

> When using the remembered location we say "Using saved push location: ...",
> but nothing seems to be printed when pusing to another location (new or
> not).  Perhaps it might sense to say
>
>    "Not using saved push location, but instead: ..."

But if you specified a different location, wouldn't you know you specified it?

Revision history for this message
Wouter van Heyst (larstiq) wrote :

On Fri, Jun 10, 2011 at 00:20:28 -0000, Martin Pool wrote:
> Martin
>
> I think automatically remembering the first one used is problematic,
> because the user might not associate that action with it being saved,
> or have an intention to save it then.

Right, similar to merge setting submit_location I guess. As it matches
my workflow I happen to associate/intend it doing that, but then I'm
familiar with the current behaviour.

Do you mean push shouldn't be remembering at all, or it should change
its behaviour from "remember first, don't change unless asked" to
"always save last specified location"?

For the former, I can probably learn to specify --remember on the first
push with some grumbling.

But for the latter, what happens if you say `bzr push :parent/:submit`?
Will the push location be overwritten in that case too? That doesn't
seem a good idea me, nevermind me not being convinced it is the more
common case.

> > When using the remembered location we say "Using saved push location: ...",
> > but nothing seems to be printed when pusing to another location (new or
> > not).  Perhaps it might sense to say
> >
> >    "Not using saved push location, but instead: ..."
>
> But if you specified a different location, wouldn't you know you
> specified it?

Ah hmm, yes. I was trying to deal with Olaf's confusion that his last
push didn't autosave.

    "Not saving specified location but retaining: ..." ?

which would be moot when push no longer saves on first use but only when
--remember is specified.

Wouter van Heyst

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

What I meant was, "don't remember unless --remember is given". There
was a sizable thread about this in the last month which I don't want
to repeat here.

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.