1880 @pyqtSlot() |
1880 @pyqtSlot() |
1881 def __branchActTriggered(self): |
1881 def __branchActTriggered(self): |
1882 """ |
1882 """ |
1883 Private slot to create a new branch starting at the selected commit. |
1883 Private slot to create a new branch starting at the selected commit. |
1884 """ |
1884 """ |
|
1885 from .GitBranchDialog import GitBranchDialog |
|
1886 |
1885 if len(self.logTree.selectedItems()) == 1: |
1887 if len(self.logTree.selectedItems()) == 1: |
1886 from .GitBranchDialog import GitBranchDialog |
|
1887 |
|
1888 itm = self.logTree.selectedItems()[0] |
1888 itm = self.logTree.selectedItems()[0] |
1889 commit = itm.text(self.CommitIdColumn) |
1889 commit = itm.text(self.CommitIdColumn) |
1890 branches = [ |
1890 branches = [ |
1891 b for b in itm.text(self.BranchColumn).split(", ") if "/" not in b |
1891 b for b in itm.text(self.BranchColumn).split(", ") if "/" not in b |
1892 ] |
1892 ] |
1918 def __branchSwitchActTriggered(self): |
1918 def __branchSwitchActTriggered(self): |
1919 """ |
1919 """ |
1920 Private slot to create a new branch starting at the selected commit |
1920 Private slot to create a new branch starting at the selected commit |
1921 and switch the work tree to it. |
1921 and switch the work tree to it. |
1922 """ |
1922 """ |
|
1923 from .GitBranchDialog import GitBranchDialog |
|
1924 |
1923 if len(self.logTree.selectedItems()) == 1: |
1925 if len(self.logTree.selectedItems()) == 1: |
1924 from .GitBranchDialog import GitBranchDialog |
|
1925 |
|
1926 itm = self.logTree.selectedItems()[0] |
1926 itm = self.logTree.selectedItems()[0] |
1927 commit = itm.text(self.CommitIdColumn) |
1927 commit = itm.text(self.CommitIdColumn) |
1928 branches = [ |
1928 branches = [ |
1929 b for b in itm.text(self.BranchColumn).split(", ") if "/" not in b |
1929 b for b in itm.text(self.BranchColumn).split(", ") if "/" not in b |
1930 ] |
1930 ] |