Can't push conflicting tags to remote branch

Bug #93947 reported by Gustavo Niemeyer
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Unassigned

Bug Description

There's currently no way to push tags in a way that would overwrite remote tags.

For instance:

[niemeyer@burma ~]% mkdir a
[niemeyer@burma ~]% cd a
[niemeyer@burma ~/a]% bzr init --format=dirstate-tags
[niemeyer@burma ~/a]% bzr commit --unchanged -m="Nothing."
Committed revision 1.
[niemeyer@burma ~/a]% bzr tag foo
Created tag foo.
[niemeyer@burma ~/a]% cd ..
[niemeyer@burma ~]% bzr branch a b
Branched 1 revision(s).
[niemeyer@burma ~]% cd a
[niemeyer@burma ~/a]% bzr commit --unchanged -m="Nothing."
Committed revision 2.
[niemeyer@burma ~/a]% bzr tag --force foo
Created tag foo.
[niemeyer@burma ~/a]% bzr push ../b
All changes applied successfully.
Pushed up to revision 2.
Conflicting tags:
    foo
[niemeyer@burma ~/a]% bzr push --overwrite ../b
No new revisions to push.
Conflicting tags:
    foo
[niemeyer@burma ~/a]% bzr push --overwrite ../b
No new revisions to push.
Conflicting tags:
    foo

Tags: tags
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

The same is true for pulling as well. In this case isn't such a big deal as the tag could be explicitly removed locally, but it'd still be nice to have a flag to force local tags to be replaced on conflicts.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

FWIW, the following command will replace the remote tags with the local ones.

scp .bzr/branch/tags $REMOTEBRANCH/.bzr/branch/tags

Revision history for this message
Matthew Fuller (fullermd) wrote :

Neither pull nor pull --overwrite will bring down moved or deleted tags (see mention at the bottom of http://bazaar-vcs.org/MatthewFuller/OtherIssues). I claim both should; when it came up, Martin expressed some disagreement, at least on the non--overwrite case.

Martin Pool (mbp)
Changed in bzr:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :

I believe this is fixed by Lukas's patch in 0.91.

Changed in bzr:
status: Confirmed → Fix Released
Revision history for this message
Seth (bugs-sehe) wrote :

i cannot agree. i'm on 1.5.1 and 1.3.1. still the same issue, no options to force the issue.

Revision history for this message
Adrian Wilkins (adrian-wilkins) wrote :

Just a minor poke at this issue ; encountered it today.

You have to manually delete the erroneous tag at the appropriate end, which is fine.

In my case, the tags were on revisions that were not part of the branch (having been on revisions that were uncommitted). Tags are a branch-level thing so this could potentially lead to tags on revisions that do not exist in the repository that you have. It would seem to be harmless to resolve conflicts like this by just ignoring the "dead" tag and replacing it.

Revision history for this message
John A Meinel (jameinel) wrote :

Just to comment that I believe our goal is to actually copy across the revisions referenced by tags, so that they don't go completely dead.

That said, push --overwrite should be forcing the new values to be copied across, and if it isn't then this bug should be re-opened.

However, I just tested it now, and doing:

bzr init xtag
cd xtag
bzr commit -m one --unchanged
bzr commit -m two --unchanged
bzr commit -m three --unchanged
bzr tag -r 2 x
bzr push ../ytag
bzr tags -d ../ytag

x 2

bzr tag -r 3 x --force
bzr push ../ytag

No new revisions to push.
Conflicting tags:
    x

bzr tags -d ../ytag

x 2

bzr push --overwrite ../ytag

No new revisions to push.

bzr tags -d ../ytag

x 3

Admittedly this is with bzr.dev which is soon to become 1.10rc1. However, I believe this was fixed a while ago. It is possible it still fails with a remote branch, or over bzr+ssh, etc. We may want to open a new bug for that.

As for "I'm on 1.5.1 and 1.3.1" do you mean "1.5" and "1.3.1" as there was never a 1.5.1 release. Or maybe 1.6.1 ? Did you try "--overwrite"?

Revision history for this message
David Gómez (dabisu) wrote :

I just tested it with 1.6.1 and "bzr push --overwrite" removes locally deleted tags.

Revision history for this message
SirVer (sirver) wrote :

Not for launchpad. This is for my ultisnips project:

$ bzr tags
Before refactoring of SnippetInstances 76
b4_implementation_of_triggerlist 176
before_making_to_recursive 23
$ bzr tag --delete 'Before refactoring of SnippetInstances'
Deleted tag Before refactoring of SnippetInstances.
$ bzr tag --delete 'b4_implementation_of_triggerlist'
Deleted tag b4_implementation_of_triggerlist.
$ bzr tag --delete 'before_making_to_recursive'
Deleted tag before_making_to_recursive.
$ bzr tags # no output
$ bzr push --overwrite # to launchpad trunk
...
$ bzr pull # from launchpad trunk
...
No revisions to pull.
$ bzr tags
Before refactoring of SnippetInstances 76
b4_implementation_of_triggerlist 176
before_making_to_recursive 23

Annoying :(. Bzr is 2.0.1. This bug is not fixed.

Changed in bzr:
status: Fix Released → Confirmed
status: Confirmed → Fix Released
Revision history for this message
SirVer (sirver) wrote :

Sorry for changing around the status of this bug. I didn't think I would have the right to do so :/

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 93947] Re: Can't push conflicting tags to remote branch

If the bug is actually still in the code you're welcome to reopen the
report, in fact we thank you for doing so.

Revision history for this message
SirVer (sirver) wrote :

if that is the case. The bug persists for me with bzr 2.0.1 and launchpad. I can't say if the bug is in launchpad though.

Changed in bzr:
status: Fix Released → Confirmed
Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

"bzr push --overwrite" with bzr 2.0.1 and Launchpad worked for me.

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

Launchpad recently changed its configuration to remove a mirroring step that probably wasn't propogating tags; closing this off again.

Changed in bzr:
status: Confirmed → 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.