[asterisk-commits] Various bug fixes. (repotools[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 15 21:22:19 CST 2015


Matt Jordan has submitted this change and it was merged.

Change subject: Various bug fixes.
......................................................................


Various bug fixes.

After creating a branch push it to remote and also issue a pull after checkout.
Also when creating the release summary be sure the 'coders' are properly.
Some names may contain unicode characters.

Change-Id: Ie03a379394ac3adedf51ec7f79f688b3f0e13f1a
---
M digium_git.py
M release_summary.py
2 files changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Matt Jordan: Looks good to me, approved; Verified



diff --git a/digium_git.py b/digium_git.py
index d2b277e..d54b326 100644
--- a/digium_git.py
+++ b/digium_git.py
@@ -151,7 +151,7 @@
         origin.fetch(progress=progress)
         if self.show_progress:
             progress = GitProgressBar()
-        origin.pull(progress=progress)
+        origin.fetch(progress=progress)
 
     def checkout_remote_branch(self, branch_name, local_name=None):
         """Set up a local tracking branch of a remote branch
@@ -164,19 +164,21 @@
         if not local_name:
             local_name = branch_name
 
+        origin = self.repo.remotes.origin
         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)
+            self.push_changes()
 
         self.current_branch = local_name
         local_branch.checkout()
+	origin.pull(refspec=['refs/heads/{0}:refs/heads/{0}'.format(local_name)])
 
 
     def switch_local_branch(self, name):
@@ -336,7 +338,7 @@
         if self.show_progress:
             progress = GitProgressBar()
 
-        assert self.current_current_branch is not None
+        assert self.current_branch is not None
         origin.push(refspec='refs/heads/{0}:refs/heads/{1}'.format(self.current_branch,
                                                                    self.current_branch),
                     progress=progress)
diff --git a/release_summary.py b/release_summary.py
index 834e0d3..1ae2d3d 100755
--- a/release_summary.py
+++ b/release_summary.py
@@ -391,7 +391,7 @@
                     log_message.raw.hexsha))
                 msg_link("[{0}]".format(log_message.raw.hexsha[:10]))
                 msg_li.raw_text("{0} {1} -- {2}".format(
-                    str(msg_link), coders, log_message.get_commit_summary()))
+                    str(msg_link), unicode(coders).encode('utf-8'), log_message.get_commit_summary()))
             else:
                 msg_li("{0} -- {1}".format(coders,
                     log_message.get_commit_summary()))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie03a379394ac3adedf51ec7f79f688b3f0e13f1a
Gerrit-PatchSet: 1
Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list