[Asterisk-code-review] digium git: Add additional capabilities for manipulating bra... (repotools[master])

Samuel Galarneau asteriskteam at digium.com
Mon May 11 14:52:07 CDT 2015


Samuel Galarneau has posted comments on this change.

Change subject: digium_git: Add additional capabilities for manipulating branches/tags
......................................................................


Patch Set 3:

(3 comments)

https://gerrit.asterisk.org/#/c/381/3/digium_git.py
File digium_git.py:

Line 164: if not local_name:
        :             local_name = branch_name
        :         if local_name in self.repo.heads:
        :             # Local version already exists, just use it
        :             local_branch = self.repo.heads[local_name]
        :         else:
        :             origin = self.repo.remotes.origin
        :             remote_ref = [ref for ref in origin.refs
        :                           if branch_name in ref.name][0]
        :             local_branch = self.repo.create_head(local_name, remote_ref)
        :             local_branch.set_tracking_branch(remote_ref)
        :         local_branch.checkout()
Could use whitespace.


Line 184: tag = self.get_tag(name)
        :         if tag:
        :             self.repo.head.reference = tag
        :         else:
        :             local_branch = self.repo.heads[name]
        :             self.repo.head.reference = local_branch
        :         assert not self.repo.head.is_detached
        :         self.repo.head.reset(index=True, working_tree=True)
Could use whitespace.


Line 242: if self.get_tag(tag_name):
        :             raise ValueError("Tag '{0}' already exists!".format(tag_name))
        :         self.repo.create_tag(tag_name, message="Create '{0}'".format(tag_name))
        :         origin = self.repo.remotes.origin
        :         if self.show_progress:
        :             progress = GitProgressBar()
        :         origin.push(progress=progress, tags=True)
Could use whitespace.


-- 
To view, visit https://gerrit.asterisk.org/381
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2d13af5a8201d349b37f64f9855e45b70309aa95
Gerrit-PatchSet: 3
Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Samuel Galarneau <sgalarneau at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list