Merge lp:~jelmer/brz/git-remote-tag-selector into lp:brz/3.1

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/git-remote-tag-selector
Merge into: lp:brz/3.1
Diff against target: 21 lines (+3/-1)
1 file modified
breezy/git/remote.py (+3/-1)
To merge this branch: bzr merge lp:~jelmer/brz/git-remote-tag-selector
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+379607@code.launchpad.net

Commit message

Add tag_selector support in GitRemoteDir.

Description of the change

Add tag_selector support in GitRemoteDir.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/git/remote.py'
2--- breezy/git/remote.py 2020-02-11 23:03:01 +0000
3+++ breezy/git/remote.py 2020-02-21 06:39:59 +0000
4@@ -555,7 +555,7 @@
5
6 def push_branch(self, source, revision_id=None, overwrite=False,
7 remember=False, create_prefix=False, lossy=False,
8- name=None):
9+ name=None, tag_selector=None):
10 """Push the source branch into this ControlDir."""
11 if revision_id is None:
12 # No revision supplied by the user, default to the branch
13@@ -600,6 +600,8 @@
14 ret[actual_refname] = new_sha
15 if fetch_tags:
16 for tagname, revid in viewitems(source.tags.get_tag_dict()):
17+ if tag_selector and not tag_selector(tagname):
18+ continue
19 if lossy:
20 try:
21 new_sha = source_store._lookup_revision_sha1(revid)

Subscribers

People subscribed via source and target branches