Merge lp:~jelmer/bzr/overwrite-tags into lp:bzr
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Jelmer Vernooij on 2012-04-16 | ||||
| Approved revision: | 6166 | ||||
| Merged at revision: | 6522 | ||||
| Proposed branch: | lp:~jelmer/bzr/overwrite-tags | ||||
| Merge into: | lp:bzr | ||||
| Diff against target: |
202 lines (+80/-10) 6 files modified
bzrlib/branch.py (+20/-5) bzrlib/builtins.py (+22/-3) bzrlib/push.py (+2/-2) bzrlib/tests/blackbox/test_pull.py (+17/-0) bzrlib/tests/blackbox/test_push.py (+16/-0) doc/en/release-notes/bzr-2.6.txt (+3/-0) |
||||
| To merge this branch: | bzr merge lp:~jelmer/bzr/overwrite-tags | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| bzr-core | 2012-02-24 | Pending | |
|
Review via email:
|
|||
Commit Message
Add --overwrite-tags option to push and pull.
Description of the Change
Add --overwrite-tags argument to "bzr push" and "bzr pull".
I'm not entirely sure about the API change. I don't really want to end up with overwrite-history, overwrite-tags, overwrite-
(There is also a merge proposal open for lp:bzr/2.5, this is a resubmission against lp:bzr)
| Vincent Ladeuil (vila) wrote : | # |
| Jelmer Vernooij (jelmer) wrote : | # |
Am 13/03/12 09:10, schrieb Vincent Ladeuil:
> I'm not sure we understood each other here :-/
>
> What I objected about was the addition of the --overwrite-tags parameter, all the rest is ~fine by me (I'm still wondering about _fix_overwrite_type being private but needed by the plugins but that's a minor concern).
>
> The rationale here is that we already know that the long term solution is to have versioned tags. Once we get there, --overwrite-tags will have to be deprecated/deleted as it will be replaced by some moral equivalent of 'bzr resolve --take-other'.
Even when we have versioned tags I still think it would be useful to
overwrite tags in some cases.
> Therefore, I'd rather implement this behavior behind a config option (that can still be used from the command line with -O) to address the edge case and not add a parameter that we'll have to remove. The option can be documented to explain that it's a temporary one that will eventually get removed once tags are versioned.
There are always going to be formats in bzr that don't support versioned tags, so I don't think we'd ever be able to delete it. Having it as a configuration option just makes it less explicit in the API I think.
Cheers,
jelmer
| Vincent Ladeuil (vila) wrote : | # |
> There are always going to be formats in bzr that don't support versioned tags,
> so I don't think we'd ever be able to delete it. Having it as a configuration
> option just makes it less explicit in the API I think.
Right, that's exactly where we disagree :) Tag conflicts occur rarely so only a few people are concerned by this feature and I argue that these people will be equally well served by a config option. *But* even the option and the command line parameter fall short about addressing the issue I faced for the 2.3.2 bzr release where lp:bzr/2.3 needed to have its tags overwritten but was (still is and will be) unreachable (without asking a losa which is cheating).
How about landing this stuff behind a config option and *then* discuss about adding the parameter to have some progress ? That would even allow landing in 2.5 in this case as this will not break compatibility (assuming you update the foreign plugins accordingly).
| Jelmer Vernooij (jelmer) wrote : | # |
Am 13/03/12 10:15, schrieb Vincent Ladeuil:
>> There are always going to be formats in bzr that don't support versioned tags,
>> so I don't think we'd ever be able to delete it. Having it as a configuration
>> option just makes it less explicit in the API I think.
> Right, that's exactly where we disagree :) Tag conflicts occur rarely so only a few people are concerned by this feature and I argue that these people will be equally well served by a config option. *But* even the option and the command line parameter fall short about addressing the issue I faced for the 2.3.2 bzr release where lp:bzr/2.3 needed to have its tags overwritten but was (still is and will be) unreachable (without asking a losa which is cheating).
It's come up a few times (the emacs folks have asked about it too), so I
would argue it's not unheard of. I don't really see the harm in adding a
option for "bzr push" / "bzr pull" and a command-line option is a lot
more discoverable than a configuration option. This also doesn't really
seem appropriate as a configuration option since you wouldn't really
want to set this option in e.g. branch.conf any more than you would want
to set 'overwrite = True'.
We can't directly push to lp: bzr/2.3 so I don't understand how that is
relevant to the discussion about 'bzr push --overwrite-tags' ?
>
> How about landing this stuff behind a config option and *then* discuss about adding the parameter to have some progress ? That would even allow landing in 2.5 in this case as this will not break compatibility (assuming you update the foreign plugins accordingly).
Doing this will break compatibility no more or less than my patch does,
in that anything that doesn't support it will ignore it and anything
that does support it will.
I don't really want to update the foreign plugins for this now, as it
means rolling three new releases and getting those packaged, etc.
Cheers,
Jelmer
| Vincent Ladeuil (vila) wrote : | # |
> It's come up a few times (the emacs folks have asked about it too), so I
> would argue it's not unheard of. I don't really see the harm in adding a
> option for "bzr push" / "bzr pull" and a command-line option is a lot
> more discoverable than a configuration option.
The fact that it's more exposed means more work associated with removing it
which is my point. Yes, some people need this option, I agree with that or I
wouldn't search for a way to land the associated feature :)
> This also doesn't really
> seem appropriate as a configuration option since you wouldn't really
> want to set this option in e.g. branch.conf any more than you would want
> to set 'overwrite = True'.
I disagree with that, if I maintaining an official branch mirrored to
apublic website I very well want to set this option locally.
>
> We can't directly push to lp: bzr/2.3 so I don't understand how that is
> relevant to the discussion about 'bzr push --overwrite-tags' ?
This is precicely what versioned tags could address :)
> >
> > How about landing this stuff behind a config option and *then* discuss about
> adding the parameter to have some progress ? That would even allow landing in
> 2.5 in this case as this will not break compatibility (assuming you update the
> foreign plugins accordingly).
> Doing this will break compatibility no more or less than my patch does,
> in that anything that doesn't support it will ignore it and anything
> that does support it will.
It won't break the command-line compatibility which is exactly what I'm
arguing against.
| Vincent Ladeuil (vila) wrote : | # |
> > We can't directly push to lp: bzr/2.3 so I don't understand how that is
> > relevant to the discussion about 'bzr push --overwrite-tags' ?
>
> This is precicely what versioned tags could address :)
I.e. since --overwrite-tags does not address what versioned tags should
address I'd rather not add a parameter that only partially address the use
case.
| Jelmer Vernooij (jelmer) wrote : | # |
Am 13/03/12 10:40, schrieb Vincent Ladeuil:
>> It's come up a few times (the emacs folks have asked about it too), so I
>> would argue it's not unheard of. I don't really see the harm in adding a
>> option for "bzr push" / "bzr pull" and a command-line option is a lot
>> more discoverable than a configuration option.
> The fact that it's more exposed means more work associated with removing it
> which is my point. Yes, some people need this option, I agree with that or I
> wouldn't search for a way to land the associated feature :)
I don't think we'll ever want to remove this option if we add it. There
are plenty of formats that don't support versioned tags and some of them
aren't going to go away (e.g. git, 2a, etc).
>
>> This also doesn't really
>> seem appropriate as a configuration option since you wouldn't really
>> want to set this option in e.g. branch.conf any more than you would want
>> to set 'overwrite = True'.
> I disagree with that, if I maintaining an official branch mirrored to
> apublic website I very well want to set this option locally.
By that reasoning "overwrite" should be a configuration option rather
than a command-line option too.... ?
>>> How about landing this stuff behind a config option and *then* discuss about
>> adding the parameter to have some progress ? That would even allow landing in
>> 2.5 in this case as this will not break compatibility (assuming you update the
>> foreign plugins accordingly).
>> Doing this will break compatibility no more or less than my patch does,
>> in that anything that doesn't support it will ignore it and anything
>> that does support it will.
> It won't break the command-line compatibility which is exactly what I'm
> arguing against.
How is adding a new command-line option breaking command-line compatibility?
If you mean that we'll break compatibility if we remove this
command-line option later then I think that a configuration option is no
better. In fact, in the case of a configuration option we'll *silently*
ignore what the user specified, which is probably a lot more confusing.
Cheers,
Jelmer
| Jelmer Vernooij (jelmer) wrote : | # |
Marking as approved, since the same branch is now approved for landing in 2.5.
- 6167. By Jelmer Vernooij on 2012-04-16
-
Merge bzr.dev.

I'm not sure we understood each other here :-/
What I objected about was the addition of the --overwrite-tags parameter, all the rest is ~fine by me (I'm still wondering about _fix_overwrite_type being private but needed by the plugins but that's a minor concern).
The rationale here is that we already know that the long term solution is to have versioned tags. Once we get there, --overwrite-tags will have to be deprecated/deleted as it will be replaced by some moral equivalent of 'bzr resolve --take-other'.
Therefore, I'd rather implement this behavior behind a config option (that can still be used from the command line with -O) to address the edge case and not add a parameter that we'll have to remove. The option can be documented to explain that it's a temporary one that will eventually get removed once tags are versioned.