From adc5f9e64e0b33775191849fd764b803a014cabb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20D=C3=B6rbandt?= Date: Fri, 22 Dec 2023 18:15:42 +0100 Subject: [PATCH] Add Choose new repository location menu item --- .../actionChooseNewRepositoryLocationForActiveProject.st | 4 ++++ .../SquotBrowser.class/instance/activeWorkingCopy..st | 7 +------ .../SquotBrowser.class/instance/everythingChanged.st | 8 ++++++++ .../SquotBrowser.class/instance/projectListMenu..st | 1 + .../SquotBrowser.class/methodProperties.json | 6 ++++-- 5 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 src/Squot.package/SquotBrowser.class/instance/actionChooseNewRepositoryLocationForActiveProject.st create mode 100644 src/Squot.package/SquotBrowser.class/instance/everythingChanged.st diff --git a/src/Squot.package/SquotBrowser.class/instance/actionChooseNewRepositoryLocationForActiveProject.st b/src/Squot.package/SquotBrowser.class/instance/actionChooseNewRepositoryLocationForActiveProject.st new file mode 100644 index 000000000..fc1534154 --- /dev/null +++ b/src/Squot.package/SquotBrowser.class/instance/actionChooseNewRepositoryLocationForActiveProject.st @@ -0,0 +1,4 @@ +actions +actionChooseNewRepositoryLocationForActiveProject + (self activeWorkingCopyIfNilInformAnd: [^ self]) requestAndMoveToNewRepositoryLocation. + self everythingChanged. \ No newline at end of file diff --git a/src/Squot.package/SquotBrowser.class/instance/activeWorkingCopy..st b/src/Squot.package/SquotBrowser.class/instance/activeWorkingCopy..st index 00318f613..8362a3d11 100644 --- a/src/Squot.package/SquotBrowser.class/instance/activeWorkingCopy..st +++ b/src/Squot.package/SquotBrowser.class/instance/activeWorkingCopy..st @@ -3,9 +3,4 @@ activeWorkingCopy: aWorkingCopy activeWorkingCopy ifNotNil: [activeWorkingCopy removeDependent: self]. activeWorkingCopy := aWorkingCopy. activeWorkingCopy ifNotNil: [activeWorkingCopy addDependent: self]. - self - changed: #activeWorkingCopy; - changed: #refList; - changed: #commitList. - self activeRef: nil. - self activeCommit: (self activeWorkingCopy ifNotNil: #headCommit). \ No newline at end of file + self everythingChanged. \ No newline at end of file diff --git a/src/Squot.package/SquotBrowser.class/instance/everythingChanged.st b/src/Squot.package/SquotBrowser.class/instance/everythingChanged.st new file mode 100644 index 000000000..fd912c900 --- /dev/null +++ b/src/Squot.package/SquotBrowser.class/instance/everythingChanged.st @@ -0,0 +1,8 @@ +updating +everythingChanged + self + changed: #activeWorkingCopy; + changed: #refList; + changed: #commitList; + activeRef: nil; + activeCommit: (self activeWorkingCopy ifNotNil: #headCommit). \ No newline at end of file diff --git a/src/Squot.package/SquotBrowser.class/instance/projectListMenu..st b/src/Squot.package/SquotBrowser.class/instance/projectListMenu..st index b48e4b112..7af3db7f1 100644 --- a/src/Squot.package/SquotBrowser.class/instance/projectListMenu..st +++ b/src/Squot.package/SquotBrowser.class/instance/projectListMenu..st @@ -4,6 +4,7 @@ projectListMenu: aMenu aMenu target: self; add: 'Rename this project' action: #actionRenameActiveProject; + add: 'Choose new repository location' action: #actionChooseNewRepositoryLocationForActiveProject; add: 'Remove this project' action: #actionRemoveActiveProject; add: 'Manage remotes' target: SquotRemotesBrowser diff --git a/src/Squot.package/SquotBrowser.class/methodProperties.json b/src/Squot.package/SquotBrowser.class/methodProperties.json index 299691347..defe809b9 100644 --- a/src/Squot.package/SquotBrowser.class/methodProperties.json +++ b/src/Squot.package/SquotBrowser.class/methodProperties.json @@ -8,6 +8,7 @@ "unload" : "mad 9/26/2023 15:50", "unregisterFromWorldMenu" : "mad 9/19/2023 13:45" }, "instance" : { + "actionChooseNewRepositoryLocationForActiveProject" : "mad 12/22/2023 18:15", "actionCloneProject" : "mad 9/21/2023 11:43", "actionCommit" : "mad 10/22/2023 00:35", "actionCompareActiveCommitToImage" : "mad 11/29/2023 16:48", @@ -49,7 +50,7 @@ "activeRef:" : "mad 9/14/2023 19:21", "activeRefCommit" : "mad 9/14/2023 19:24", "activeWorkingCopy" : "mad 9/19/2023 12:38", - "activeWorkingCopy:" : "mad 9/20/2023 15:41", + "activeWorkingCopy:" : "mad 12/22/2023 17:59", "activeWorkingCopyIfNilInformAnd:" : "mad 9/19/2023 12:25", "addMappersProjectListMenu:" : "mad 9/19/2023 16:06", "buildBranchButton:" : "mad 9/14/2023 19:42", @@ -77,6 +78,7 @@ "commitMenu:forRef:" : "mad 11/29/2023 16:49", "currentBranchIfNilInformAnd:" : "mad 9/26/2023 16:56", "doesRef:comeBeforeRef:" : "mad 9/19/2023 14:45", + "everythingChanged" : "mad 12/22/2023 17:59", "ifRepositoryDoesNotExist:" : "mad 11/30/2023 17:08", "mergeCommitIntoHead:" : "mad 9/21/2023 13:47", "mergeCommitIntoHead:displayName:" : "mad 12/13/2023 18:05", @@ -96,7 +98,7 @@ "openDialogToShowChangeSetsFromCommit:to:" : "mad 10/22/2023 00:56", "openDialogToShowChangeSetsFromImageTo:" : "mad 11/29/2023 16:48", "otherMenu:" : "mad 10/24/2023 17:14", - "projectListMenu:" : "mad 12/8/2023 17:24", + "projectListMenu:" : "mad 12/22/2023 17:57", "refChanged:" : "mad 9/15/2023 11:04", "refList" : "mad 11/30/2023 21:44", "refListMenu:" : "mad 12/13/2023 19:10",