コード例 #1
0
 def OnDeleteSpecRepo(self, event):
     item = self.dataListView.Selection
     if item != None:
         row = self.dataListView.ItemToRow(item)
         specRepo = PTCommandPathConfig.podspecList[row]
         PTCommand().removeSpecRepo(specRepo[0], self.logCallback,
                                    self.OnDeleteSpecRepoCompleteCallback)
コード例 #2
0
 def OnAddSpecRepo(self, event):
     name = self.specRepoNameText.GetValue()
     remotePath = self.specRepoPathText.GetValue()
     if len(name) > 0 and len(remotePath) > 0:
         PTCommand().addSpecRepo(name, remotePath, self.logCallback, self.callback)
     else:
         wx.MessageBox(u"Should fill all inputs.", u"Error", wx.OK | wx.ICON_INFORMATION)
コード例 #3
0
    def OnDropFileCallback(self, filepath):
        if self.loadingCtrl.IsPlaying() == True:
            self.OnEnterDropCallback(False)
            return

        self.ShowLoading(True)
        self.OnEnterDropCallback(False)
        PTCommand().svnCheckPath(filepath, self.logCallback,
                                 self.OnCheckSvnEnable)
コード例 #4
0
    def OnCheckPodCommand(self, event):
        self.checkPodLoadingCtrl.Show()
        self.checkPodLoadingCtrl.Play()
        self.checkPodCommandBtn.Enable(False)
        self.checkPodCommandBtn.SetLabelText(u"Checking")
        self.Layout()

        PTCommand().checkPodCommand(self.logCallback,
                                    self.OnCheckPodCommandCallback)
コード例 #5
0
 def OnSvnUpdateCallback(self, success, result):
     if success == 0:
         self.UpdateProgress(30, u"Svn check conflict...")
         PTCommand().svnCheckConflict(self.module, self.logCallback,
                                      self.OnSvnCheckConflictCallback)
     else:
         wx.MessageBox(u"Svn update failed.\n%s" % result, u"Error",
                       wx.OK | wx.ICON_INFORMATION)
         self.EndModal(wx.ID_OK)
コード例 #6
0
 def OnCommitFilesCallback(self, result):
     if result == True:
         self.UpdateProgress(70, u"Svn tag module...")
         PTCommand().tagModule(self.module, self.logCallback,
                               self.OnTagModuleCallback)
     else:
         wx.MessageBox(u"Svn committing files failed.\n%s" % result,
                       u"Error", wx.OK | wx.ICON_INFORMATION)
         self.EndModal(wx.ID_OK)
コード例 #7
0
 def OnSvnChooseCallback(self,
                         cancelCommit,
                         commitList=None,
                         addList=None,
                         deleteList=None,
                         commitMsg=None):
     if cancelCommit == True:
         self.EndModal(wx.ID_OK)
     else:
         self.UpdateProgress(60, u"Svn committing files...")
         PTCommand().svnCommitFiles(self.module, commitList, addList,
                                    deleteList, commitMsg, self.logCallback,
                                    self.OnCommitFilesCallback)
コード例 #8
0
 def OnTagModuleCallback(self, success, result):
     if success == 0:
         if len(self.module.sepcName) > 0:
             self.ContinueToPublish()
         else:
             if PTCommandPathConfig.podspecList == None:
                 self.UpdateProgress(75, u"Fetch podspec repo list...")
                 PTCommand().getSpecRepoList(self.logCallback,
                                             self.OnGetSpecListCallback)
             else:
                 self.UpdateProgress(85, u"Select module podspec repo...")
                 self.OnChooseSpecRepo()
     else:
         wx.MessageBox(u"Svn tag module failed.\n%s" % result, u"Error",
                       wx.OK | wx.ICON_INFORMATION)
         self.EndModal(wx.ID_OK)
コード例 #9
0
    def __init__(self, parent, logCallback, closeCallback):
        super(PTSpecRepoFrame,
              self).__init__(parent,
                             wx.ID_ANY,
                             u"Podspec Repo List",
                             size=(600, 400),
                             style=wx.CLOSE_BOX | wx.SYSTEM_MENU)

        self.logCallback = logCallback
        self.closeCallback = closeCallback

        hasList = (PTCommandPathConfig.podspecList != None)
        self.SetupUI(hasList)
        self.Bind(wx.EVT_CLOSE, self.OnClose)

        if hasList:
            self.OnSuccessGetSpecRepoList()
        else:
            PTCommand().getSpecRepoList(self.logCallback,
                                        self.OnGetSpecRepoListCompleteCallback)

        self.CentreOnScreen()
        self.Show(True)
コード例 #10
0
 def OnOKAction(self, event):
     if self.notWorkingCopy == True:
         self.OnCancelAction(event)
     else:
         PTCommand().svnUpgrade(self.path, self.logCallback,
                                self.OnSVNUpgradeCallback)
コード例 #11
0
 def publishModule(self):
     self.UpdateProgress(15, u"Svn updating...")
     PTCommand().svnUpdateModule(self.module, self.logCallback,
                                 self.OnSvnUpdateCallback)
コード例 #12
0
 def ContinueToPublish(self):
     self.UpdateProgress(90, u"Publish module to pod repo...")
     PTCommand().publishModule(self.module, self.logCallback,
                               self.OnPublishModuleCallback)