[Asterisk-code-review] digium git: Repo's current branch set too late (repotools[master])
Joshua Colp
asteriskteam at digium.com
Thu Feb 4 12:46:27 CST 2016
Joshua Colp has submitted this change and it was merged.
Change subject: digium_git: Repo's current branch set too late
......................................................................
digium_git: Repo's current branch set too late
When checking out a remote branch the current_branch field was being set after
a potential call to push_changes. push_changes needs this value to be set or it
will assert. This moves the setting of current_branch to before the call.
Change-Id: Idd9bf79c2e367e23d53e8e76e84b4bdbb9fb5138
---
M digium_git.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Joshua Colp: Looks good to me, approved; Verified
diff --git a/digium_git.py b/digium_git.py
index d54b326..05a5454 100644
--- a/digium_git.py
+++ b/digium_git.py
@@ -164,6 +164,7 @@
if not local_name:
local_name = branch_name
+ self.current_branch = local_name
origin = self.repo.remotes.origin
if local_name in self.repo.heads:
# Local version already exists, just use it
@@ -176,7 +177,6 @@
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)])
--
To view, visit https://gerrit.asterisk.org/2194
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idd9bf79c2e367e23d53e8e76e84b4bdbb9fb5138
Gerrit-PatchSet: 1
Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
More information about the asterisk-code-review
mailing list