852 |
852 |
853 res = ("", "") |
853 res = ("", "") |
854 if output: |
854 if output: |
855 for line in output.splitlines(): |
855 for line in output.splitlines(): |
856 if line.strip(): |
856 if line.strip(): |
857 try: |
857 with contextlib.suppress(ValueError): |
858 name, rev = line.strip().rsplit(None, 1) |
858 name, rev = line.strip().rsplit(None, 1) |
859 if name == tag: |
859 if name == tag: |
860 res = tuple(rev.split(":", 1)) |
860 res = tuple(rev.split(":", 1)) |
861 break |
861 break |
862 except ValueError: |
|
863 # ignore silently |
|
864 pass |
|
865 |
862 |
866 return res |
863 return res |
867 |
864 |
868 def __generateLogItem(self, author, date, message, revision, changedPaths, |
865 def __generateLogItem(self, author, date, message, revision, changedPaths, |
869 parents, branches, tags, phase, bookmarks, |
866 parents, branches, tags, phase, bookmarks, |
2624 @type str |
2621 @type str |
2625 """ |
2622 """ |
2626 if ":" in link: |
2623 if ":" in link: |
2627 scheme, parent = link.split(":", 1) |
2624 scheme, parent = link.split(":", 1) |
2628 if scheme == "diff": |
2625 if scheme == "diff": |
2629 try: |
2626 with contextlib.suppress(ValueError): |
2630 parent = int(parent) |
2627 parent = int(parent) |
2631 self.__generateDiffs(parent) |
2628 self.__generateDiffs(parent) |
2632 except ValueError: |
|
2633 # ignore silently |
|
2634 pass |
|
2635 |
2629 |
2636 @pyqtSlot(str) |
2630 @pyqtSlot(str) |
2637 def on_saveLabel_linkActivated(self, link): |
2631 def on_saveLabel_linkActivated(self, link): |
2638 """ |
2632 """ |
2639 Private slot to handle the selection of the save link. |
2633 Private slot to handle the selection of the save link. |