def SetIssue(self, issue=None):
    "Set this branch's issue.  If issue isn't given, clears the issue."
    issue_setting = self._codereview_impl.IssueSetting(self.GetBranch())
    codereview_setting = self._codereview_impl.GetCodereviewServerSetting()
    if issue:
        self.issue = issue
        RunGit(['config', issue_setting, str(issue)])
        codereview_server = self._codereview_impl.GetCodereviewServer()
        if codereview_server:
            RunGit(['config', codereview_setting, codereview_server])
    else:
        config_settings = [issue_setting, self._codereview_impl.PatchsetSetting()]
        for prop in (['last-upload-hash'] + self._codereview_impl._PostUnsetIssueProperties()):
            config_settings.append(('branch.%s.%s' % (self.GetBranch(), prop)))
        for setting in config_settings:
            RunGit(['config', '--unset', setting], error_ok=True)
        self.issue = None
        self.patchset = None
Set this branch's issue.  If issue isn't given, clears the issue.
def SetIssue(self, issue=None):
    
    issue_setting = self._codereview_impl.IssueSetting(self.GetBranch())
    codereview_setting = self._codereview_impl.GetCodereviewServerSetting()
    if issue:
        self.issue = issue
        RunGit(['config', issue_setting, str(issue)])
        codereview_server = self._codereview_impl.GetCodereviewServer()
        if codereview_server:
            RunGit(['config', codereview_setting, codereview_server])
    else:
        config_settings = [issue_setting, self._codereview_impl.PatchsetSetting()]
        for prop in (['last-upload-hash'] + self._codereview_impl._PostUnsetIssueProperties()):
            config_settings.append(('branch.%s.%s' % (self.GetBranch(), prop)))
        for setting in config_settings:
            RunGit(['config', '--unset', setting], error_ok=True)
        self.issue = None
        self.patchset = None