コード例 #1
0
 def gotCommitsContent(self,cont,commits,mycommits):
      obj=FileController(os.getcwd())
      obj.uncompressAndWrite(cont)
      common_commit=[x for x in commits if x in set(mycommits)]
      #print getLastCommit(common_commit),"\n"
      #print (parent_commit.split()[1])
      parent_file_list=obj.getFileList(getLastCommit(common_commit))
      my_file_list=obj.getFileList(getLastCommit(mycommits))
      #print my_file_list,"\n"
      other_file_list=obj.getFileList(getLastCommit(commits))
      #print other_file_list,"\n"
      flag=0
      for elem in my_file_list:
              for temp in other_file_list:
                      if(elem[0]==temp[0]):
                              dicts=merge3.devilMerge(obj.getFile(getLastCommit(common_commit),elem[0]),obj.getFile(getLastCommit(mycommits),elem[0]),obj.getFile(getLastCommit(commits),elem[0]))
                              #print dicts
                              #reactor.stop()
                              
                              print "opening file ",elem[0]
                              files=open(elem[0],'w')
                              files.write(dicts['md_content'])
                              files.close()
                              
                              if(dicts['conflict']==0 and dicts['merged']!=0):
                                      print("Merged "+elem[0]+"\n")
                              else:
                                      print("Merged with conflicts in "+elem[0]+" not commiting.Please commit after manually changing")
                                      flag=1
      if(flag==0):
              obj.commit('auto-merged successfull')
      reactor.stop()
コード例 #2
0
    def OnCommit(self, event):  # wxGlade: DevilMainFrame.<event_handler>
        msg = self.text_ctrl_2.GetValue()
        """ Commit code here using commit message as msg"""
        obj = FileController(self.directory)
        obj.commit(msg)
        #print msg

        # Update commit list in dialog box
        self.UpdateRevertList()
        self.sb.SetStatusText("Commited successfully ")
コード例 #3
0
    def OnCommit(self, event):  # wxGlade: DevilMainFrame.<event_handler>
        msg = self.text_ctrl_2.GetValue()
        """ Commit code here using commit message as msg"""
        obj=FileController(self.directory)
        obj.commit(msg)
        #print msg

        # Update commit list in dialog box 
        self.UpdateRevertList()
        self.sb.SetStatusText("Commited successfully ")