should show a message when pushing(overwriting?) tags

Bug #164450 reported by Martin Pool
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Jelmer Vernooij

Bug Description

bzr push
bzr tag FOO
bzr push
Using saved location: sftp://<email address hidden>/somewhere/
No new revisions to push.

Thankfully it does seem to push the new tag, but the message that it
displays leads me to believe that it actually didn't. It might be
useful to provide feedback when tags are pushed (or maybe even pulled).

Warren Togami

Related branches

Martin Pool (mbp)
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :
Revision history for this message
Parth Malwankar (parthm) wrote :


This would be a useful feature to have. I was about to file a new bug
when I read about this. I feel this applies to push as well as pull.

Below is the report I had already composed to be for filing as a bug:

While pushing/pulling tags bzr gives no indication
of it.

I applied tags to a local branch and pushed it to
our server using sftp. I get the "No revisions to push"
message. So I was not sure if the tags were pushed.

So for another branch I needed to tag I applied tags
directly to the repo on the server so that the tags can be
seen by everyone. On doing a pull locally I see the
"No revisions to pull" message but the tags command
shows that tags have been pulled.

[acpstable]% bzr pull
Using saved parent location: sftp://<email address hidden>/home/user0/repo/acpstable/
No revisions to pull
[acpstable]% bzr tags
v0.90.0 1455

It seems bzr is doing the right thing but as the user
does not get an indication of it its can be confusing.

It would be good if bzr can show some indication that
even though revisions are not pulled some meta data.
"Metadata updated", "Tags updated" or something.

Revision history for this message
Christian Faulhammer (fauli) wrote :

This behaviour of silently pushing tags lead to some confusion on the Emacs development please add some little display.

Revision history for this message
Parth Malwankar (parthm) wrote :
Download full text (3.2 KiB)

I decided to hack this a bit. I have the following working.

[foo]% bzr tag abc0
Created tag abc0.
[foo]% ~/src/ --no-plugins push ../bar
No new revisions to push.
Pushed 1 tags.
[foo]% ~/src/ --no-plugins push ../bar
No new revisions to push.
No tags to push.

.. but I am not too familiar with the way push/pull works, so I would
appreciate any help in understanding the existing design.

This is what I put together (push only right now). Updated methods are
branch.BzrBranch._basic_push,, and

Does this approach seem reasonable?
Would a similar approach apply to pull?

[bzrlib]% bzr cdiff -r -3
=== modified file 'bzrlib/'
--- bzrlib/ 2010-01-12 02:48:41 +0000
+++ bzrlib/ 2010-02-20 04:23:23 +0000
@@ -2328,7 +2328,7 @@
             target.update_revisions(self, stop_revision,
                 overwrite=overwrite, graph=graph)
         if self._push_should_merge_tags():
- result.tag_conflicts = self.tags.merge_to(target.tags,
+ result.tag_conflicts, result.copied_tag_count = self.tags.merge_to(target.tags,
         result.new_revno, result.new_revid = target.last_revision_info()
         return result
@@ -2831,6 +2831,10 @@
             note('No new revisions to push.')
             note('Pushed up to revision %d.' % self.new_revno)
+ if self.copied_tag_count == 0:
+ note('No tags to push.')
+ else:
+ note('Pushed %d tags.' % self.copied_tag_count)

=== modified file 'bzrlib/'
--- bzrlib/ 2009-06-10 03:56:49 +0000
+++ bzrlib/ 2010-02-20 03:44:48 +0000
@@ -208,13 +208,13 @@
             dest_dict = to_tags.get_tag_dict()
- result, conflicts = self._reconcile_tags(source_dict, dest_dict,
- overwrite)
+ result, conflicts, copied_tag_count = self._reconcile_tags(source_dict,
+ dest_dict, overwrite)
             if result != dest_dict:
- return conflicts
+ return conflicts, copied_tag_count

     def rename_revisions(self, rename_map):
         """Rename revisions in this tags dictionary.
@@ -241,14 +241,18 @@
         conflicts = []
         result = dict(dest_dict) # copy
+ copied_tag_count = 0
         for name, target in source_dict.items():
- if name not in result or overwrite:
+ name_not_in_result = name not in result
+ if name_not_in_result:
+ copied_tag_count += 1
+ if name_not_in_result or overwrite:
                 result[name] = target
             elif result[name] == target:
                 conflicts.append((name, target, result[name]))
- return result, conflicts
+ return result, conflicts, co...


Changed in bzr:
assignee: nobody → Parth Malwankar (parthm)
status: Confirmed → In Progress
Parth Malwankar (parthm)
Changed in bzr:
status: In Progress → Confirmed
assignee: Parth Malwankar (parthm) → nobody
Jelmer Vernooij (jelmer)
tags: added: pull push tags
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Setting to high, this can be very confusing.

Changed in bzr:
importance: Low → High
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in bzr:
status: Confirmed → In Progress
Jelmer Vernooij (jelmer)
Changed in bzr:
status: In Progress → Fix Released
milestone: none → 2.5b1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions