def compare(self, widget, data=None): for row in self.caller.selected_rows: url1 = self.caller.changes_table.get_row(row)[0] url2 = url1 if url1 == ".": url1 = "" url2 = "" url1 = helper.url_join(self.caller.first_urls.get_active_text(), url1) url2 = helper.url_join(self.caller.second_urls.get_active_text(), url2) rev1 = self.caller.get_first_revision() rev2 = self.caller.get_second_revision() helper.launch_ui_window("diff", [ "%s@%s" % (url1, helper.to_text(rev1)), "%s@%s" % (url2, helper.to_text(rev2)), "-s", "--vcs=%s" % self.caller.get_vcs_name() ])
def view_selected_diff(self, sidebyside=False): for row in self.selected_rows: url1 = self.changes_table.get_row(row)[0] url2 = url1 if url1 == ".": url1 = "" url2 = "" url1 = helper.url_join(self.first_urls.get_active_text(), url1) url2 = helper.url_join(self.second_urls.get_active_text(), url2) rev1 = self.get_first_revision() rev2 = self.get_second_revision() helper.launch_ui_window("diff", [ "%s@%s" % (url1, helper.to_text(rev1)), "%s@%s" % (url2, helper.to_text(rev2)), "%s" % (sidebyside and "-s" or ""), "--vcs=%s" % self.get_vcs_name() ])
def open_second(self, widget, data=None): path = self.caller.changes_table.get_row(self.caller.selected_rows[0])[0] if path == ".": path = "" url = helper.url_join(self.caller.second_urls.get_active_text(), path) rev = self.caller.get_second_revision() helper.launch_ui_window("open", [ "--vcs=%s" % self.caller.get_vcs_name(), url, "-r%s" % helper.to_text(rev) ])
def open_second(self, widget, data=None): path = self.caller.changes_table.get_row( self.caller.selected_rows[0])[0] if path == ".": path = "" url = helper.url_join(self.caller.second_urls.get_active_text(), path) rev = self.caller.get_second_revision() helper.launch_ui_window("open", [ "--vcs=%s" % self.caller.get_vcs_name(), url, "-r%s" % helper.to_text(rev) ])