Beispiel #1
0
 def diff_selection(self, *args):
     lrow = self.view.lbox.get_selected_data()[0]
     rrow = self.view.rbox.get_selected_data()[0]
     lscript = TraitScript(self.conn, self.lsuite)
     rscript = TraitScript(self.conn, self.rsuite)
     lscript.set_trait(lrow.trait)
     rscript.set_trait(rrow.trait)
     ldata = lscript.scriptdata(lrow.script)
     rdata = rscript.scriptdata(rrow.script)
     differ = Differ(ldata, rdata)
     differ.diff()
     if differ.isdifferent('left', ldata):
         newdata = differ.get_data('left')
         lscript.update_scriptdata(lrow.script, newdata)
     if differ.isdifferent('right', rdata):
         newdata = differ.get_data('right')
         rscript.update_scriptdata(rrow.script, newdata)
Beispiel #2
0
 def diff_selection(self, *args):
     lrow = self.view.lbox.get_selected_data()[0]
     rrow = self.view.rbox.get_selected_data()[0]
     ltemplate = TraitTemplate(self.conn, self.lsuite)
     rtemplate = TraitTemplate(self.conn, self.rsuite)
     ltemplate.set_trait(lrow.trait)
     rtemplate.set_trait(rrow.trait)
     ldata = ltemplate.templatedata(lrow.package, lrow.template)
     rdata = rtemplate.templatedata(rrow.package, rrow.template)
     differ = Differ(ldata, rdata)
     differ.diff()
     if differ.isdifferent('left', ldata):
         newdata = differ.get_data('left')
         ltemplate.update_templatedata(lrow.package, lrow.template, newdata)
     if differ.isdifferent('right', rdata):
         newdata = differ.get_data('right')
         rtemplate.update_templatedata(rrow.package, rrow.template, newdata)
Beispiel #3
0
 def slotDiff(self):
     print 'diff me'
     #left_item = self.leftBox.currentItem()
     #right_item = self.rightBox.currentItem()
     ldata = self.leftBox.getData()
     rdata = self.rightBox.getData()
     if self.dtype == 'trait':
         differ = Differ(ldata, rdata)
         differ.diff()
         if differ.isdifferent('left', ldata):
             newdata = differ.get_data('left')
             self.leftBox.updateData(newdata)
         if differ.isdifferent('right', rdata):
             newdata = differ.get_data('right')
             self.rightBox.updateData(newdata)
     elif self.dtype == 'family':
         ldata.diff(rdata)
Beispiel #4
0
 def diff_selection(self, *args):
     lrow = self.view.lbox.get_selected_data()[0]
     rrow = self.view.rbox.get_selected_data()[0]
     lscript = TraitScript(self.conn, self.lsuite)
     rscript = TraitScript(self.conn, self.rsuite)
     lscript.set_trait(lrow.trait)
     rscript.set_trait(rrow.trait)
     ldata = lscript.scriptdata(lrow.script)
     rdata = rscript.scriptdata(rrow.script)
     differ = Differ(ldata, rdata)
     differ.diff()
     if differ.isdifferent('left', ldata):
         newdata = differ.get_data('left')
         lscript.update_scriptdata(lrow.script, newdata)
     if differ.isdifferent('right', rdata):
         newdata = differ.get_data('right')
         rscript.update_scriptdata(rrow.script, newdata)
Beispiel #5
0
 def diff_selection(self, *args):
     lrow = self.view.lbox.get_selected_data()[0]
     rrow = self.view.rbox.get_selected_data()[0]
     ltemplate = TraitTemplate(self.conn, self.lsuite)
     rtemplate = TraitTemplate(self.conn, self.rsuite)
     ltemplate.set_trait(lrow.trait)
     rtemplate.set_trait(rrow.trait)
     ldata = ltemplate.templatedata(lrow.package, lrow.template)
     rdata = rtemplate.templatedata(rrow.package, rrow.template)
     differ = Differ(ldata, rdata)
     differ.diff()
     if differ.isdifferent('left', ldata):
         newdata = differ.get_data('left')
         ltemplate.update_templatedata(lrow.package, lrow.template, newdata)
     if differ.isdifferent('right', rdata):
         newdata = differ.get_data('right')
         rtemplate.update_templatedata(rrow.package, rrow.template, newdata)
Beispiel #6
0
 def slotDiff(self):
     print 'diff me'
     #left_item = self.leftBox.currentItem()
     #right_item = self.rightBox.currentItem()
     ldata = self.leftBox.getData()
     rdata = self.rightBox.getData()
     if self.dtype == 'trait':
         differ = Differ(ldata, rdata)
         differ.diff()
         if differ.isdifferent('left', ldata):
             newdata = differ.get_data('left')
             self.leftBox.updateData(newdata)
         if differ.isdifferent('right', rdata):
             newdata = differ.get_data('right')
             self.rightBox.updateData(newdata)
     elif self.dtype == 'family':
         ldata.diff(rdata)