[Asterisk-code-review] mkrelease: Add a Python script that creates tarballs for Ast... (repotools[master])

Samuel Galarneau asteriskteam at digium.com
Mon May 11 16:51:51 CDT 2015


Samuel Galarneau has posted comments on this change.

Change subject: mkrelease: Add a Python script that creates tarballs for Asterisk
......................................................................


Patch Set 3: Code-Review-1

(26 comments)

https://gerrit.asterisk.org/#/c/383/3/mkrelease.py
File mkrelease.py:

Line 85:     if 'yes' in cont.lower() or 'y' in cont.lower():
Blank line here.


Line 87:     raise ExitException()
Blank line here.


Line 96: global version
       :     global version_object
       :     global release_name
       :     global interactive
       :     global debug
Why not return an options object with these properties and use it going forward?


Line 123:     return repo
Blank line here.


Line 130:     options - Parsed command line arguments
options doesn't appear to be there anymore.


Line 134: mainline = version[:version.index('.')]
        :     branch = version[:version.rindex('.')]
Can any of this be fetched more easily from the version_object?


Line 136:     if repo.remote_branch_exists(branch):
Blank line here.


Line 145:     repo.checkout_remote_branch(branch)
Blank line here.


Line 147:     return
Blank line here.


Line 162: global prev_version
        :     global start_version
Why not return a tuple of versions and use it going forward?


Line 166:     if len(version_object.modifiers) == 0 and version_object.patch == 0:
Blank line here.


Line 171:         while search:
Blank line here.


Line 196:     if options.previous_tag:
Blank line here.


Line 200: def create_tag(options, repo):
Perhaps this function should be renamed to better reflect it's intended use.


Line 275:             if fnmatch.fnmatch(f_name, '{0}-*-summary.*'.format(project)):
Blank line here.


Line 281:         if removed:
Blank line here.


Line 317:         with open(ver_file_path, 'w') as ver_file:
Blank line here.


Line 319:         dprint(".version file written as '{0}'".format(version))
Blank line here.


Line 367:         return
Blank line here.


Line 414:     if prev_obj.major != version_object.major:
Blank line here.


Line 420:     # Since we don't want to work with the diff, but merely dump it out,
Blank line here.


Line 437:     with tarfile.open(name=out_file, mode='w:gz') as tar_obj:
Blank line here.


Line 460:     with open(out_file, 'w') as fs:
Blank line here.


Line 462:     return out_file
Blank line here.


Line 515:         with tarfile.open(name=name, mode='w:gz') as tar_obj:
Blank line here.


Line 530:     return
Blank line here.


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

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



More information about the asterisk-code-review mailing list