330 for file in allFiles: |
330 for file in allFiles: |
331 uptodate = True |
331 uptodate = True |
332 if file.repos_text_status != pysvn.wc_status_kind.none: |
332 if file.repos_text_status != pysvn.wc_status_kind.none: |
333 uptodate = uptodate and \ |
333 uptodate = uptodate and \ |
334 file.repos_text_status != \ |
334 file.repos_text_status != \ |
335 pysvn.wc_status_kind.modified |
335 pysvn.wc_status_kind.modified |
336 if file.repos_prop_status != pysvn.wc_status_kind.none: |
336 if file.repos_prop_status != pysvn.wc_status_kind.none: |
337 uptodate = uptodate and \ |
337 uptodate = uptodate and \ |
338 file.repos_prop_status != \ |
338 file.repos_prop_status != \ |
339 pysvn.wc_status_kind.modified |
339 pysvn.wc_status_kind.modified |
340 |
340 |
341 lockState = " " |
341 lockState = " " |
342 if file.entry is not None and \ |
342 if file.entry is not None and \ |
343 hasattr(file.entry, 'lock_token') and \ |
343 hasattr(file.entry, 'lock_token') and \ |
344 file.entry.lock_token is not None: |
344 file.entry.lock_token is not None: |
347 if lockState == "L" and file.repos_lock is None: |
347 if lockState == "L" and file.repos_lock is None: |
348 lockState = "B" |
348 lockState = "B" |
349 elif lockState == " " and file.repos_lock is not None: |
349 elif lockState == " " and file.repos_lock is not None: |
350 lockState = "O" |
350 lockState = "O" |
351 elif lockState == "L" and \ |
351 elif lockState == "L" and \ |
352 file.repos_lock is not None and \ |
352 file.repos_lock is not None and \ |
353 file.entry.lock_token != file.repos_lock["token"]: |
353 file.entry.lock_token != \ |
|
354 file.repos_lock["token"]: |
354 lockState = "S" |
355 lockState = "S" |
355 |
356 |
356 fpath = Utilities.normcasepath( |
357 fpath = Utilities.normcasepath( |
357 os.path.join(self.dname, file.path)) |
358 os.path.join(self.dname, file.path)) |
358 if fpath in changelistsDict: |
359 if fpath in changelistsDict: |
656 |
657 |
657 def __revert(self): |
658 def __revert(self): |
658 """ |
659 """ |
659 Private slot to handle the Revert context menu entry. |
660 Private slot to handle the Revert context menu entry. |
660 """ |
661 """ |
661 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ |
662 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) |
662 for itm in self.__getModifiedItems()] |
663 for itm in self.__getModifiedItems()] |
663 if not names: |
664 if not names: |
664 E5MessageBox.information( |
665 E5MessageBox.information( |
665 self, |
666 self, |
666 self.trUtf8("Revert"), |
667 self.trUtf8("Revert"), |
742 |
743 |
743 def __lock(self): |
744 def __lock(self): |
744 """ |
745 """ |
745 Private slot to handle the Lock context menu entry. |
746 Private slot to handle the Lock context menu entry. |
746 """ |
747 """ |
747 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ |
748 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) |
748 for itm in self.__getLockActionItems(self.unlockedIndicators)] |
749 for itm in self.__getLockActionItems(self.unlockedIndicators)] |
749 if not names: |
750 if not names: |
750 E5MessageBox.information( |
751 E5MessageBox.information( |
751 self, |
752 self, |
752 self.trUtf8("Lock"), |
753 self.trUtf8("Lock"), |
759 |
760 |
760 def __unlock(self): |
761 def __unlock(self): |
761 """ |
762 """ |
762 Private slot to handle the Unlock context menu entry. |
763 Private slot to handle the Unlock context menu entry. |
763 """ |
764 """ |
764 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ |
765 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) |
765 for itm in self.__getLockActionItems(self.lockedIndicators)] |
766 for itm in self.__getLockActionItems(self.lockedIndicators)] |
766 if not names: |
767 if not names: |
767 E5MessageBox.information( |
768 E5MessageBox.information( |
768 self, |
769 self, |
769 self.trUtf8("Unlock"), |
770 self.trUtf8("Unlock"), |
778 """ |
779 """ |
779 Private slot to handle the Break Lock context menu entry. |
780 Private slot to handle the Break Lock context menu entry. |
780 """ |
781 """ |
781 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) |
782 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) |
782 for itm in self.__getLockActionItems( |
783 for itm in self.__getLockActionItems( |
783 self.stealBreakLockIndicators)] |
784 self.stealBreakLockIndicators)] |
784 if not names: |
785 if not names: |
785 E5MessageBox.information( |
786 E5MessageBox.information( |
786 self, |
787 self, |
787 self.trUtf8("Break Lock"), |
788 self.trUtf8("Break Lock"), |
788 self.trUtf8("""There are no locked files""" |
789 self.trUtf8("""There are no locked files""" |
796 """ |
797 """ |
797 Private slot to handle the Break Lock context menu entry. |
798 Private slot to handle the Break Lock context menu entry. |
798 """ |
799 """ |
799 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) |
800 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) |
800 for itm in self.__getLockActionItems( |
801 for itm in self.__getLockActionItems( |
801 self.stealBreakLockIndicators)] |
802 self.stealBreakLockIndicators)] |
802 if not names: |
803 if not names: |
803 E5MessageBox.information( |
804 E5MessageBox.information( |
804 self, |
805 self, |
805 self.trUtf8("Steal Lock"), |
806 self.trUtf8("Steal Lock"), |
806 self.trUtf8("""There are no locked files""" |
807 self.trUtf8("""There are no locked files""" |
812 |
813 |
813 def __addToChangelist(self): |
814 def __addToChangelist(self): |
814 """ |
815 """ |
815 Private slot to add entries to a changelist. |
816 Private slot to add entries to a changelist. |
816 """ |
817 """ |
817 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ |
818 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) |
818 for itm in self.__getNonChangelistItems()] |
819 for itm in self.__getNonChangelistItems()] |
819 if not names: |
820 if not names: |
820 E5MessageBox.information( |
821 E5MessageBox.information( |
821 self, |
822 self, |
822 self.trUtf8("Remove from Changelist"), |
823 self.trUtf8("Remove from Changelist"), |
831 |
832 |
832 def __removeFromChangelist(self): |
833 def __removeFromChangelist(self): |
833 """ |
834 """ |
834 Private slot to remove entries from their changelists. |
835 Private slot to remove entries from their changelists. |
835 """ |
836 """ |
836 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ |
837 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) |
837 for itm in self.__getChangelistItems()] |
838 for itm in self.__getChangelistItems()] |
838 if not names: |
839 if not names: |
839 E5MessageBox.information( |
840 E5MessageBox.information( |
840 self, |
841 self, |
841 self.trUtf8("Remove from Changelist"), |
842 self.trUtf8("Remove from Changelist"), |