Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git browser: add menu item to change project directory #392

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
initialize-release
initializeOn: anFSReference
reference := anFSReference.
self initializeCache.
self gitInitialize
self workingDir: anFSReference.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
workingDir: anFSReference
reference := anFSReference.
self initializeCache.
self gitInitialize
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"headsDir" : "CamilloBruni 8/9/2011 17:41",
"initializeCache" : "jr 3/10/2020 21:22",
"initializeHEAD" : "CamilloBruni 9/2/2012 11:47",
"initializeOn:" : "jr 3/22/2017 15:12",
"initializeOn:" : "ct 10/4/2022 20:16",
"isInitialized" : "CamilloBruni 9/2/2012 11:33",
"nameOf:in:" : "jr 11/23/2016 18:22",
"newUnitOfWork" : "jr 4/20/2020 21:21",
Expand All @@ -41,4 +41,5 @@
"unitOfWork" : "jr 2/29/2020 20:23",
"validateReferenceOrReferenceName:" : "pre 11/14/2018 16:50",
"withUnitOfWork:" : "jr 8/8/2020 16:30",
"workingDir" : "MaxLeske 6/24/2012 11:37" } }
"workingDir" : "MaxLeske 6/24/2012 11:37",
"workingDir:" : "ct 10/4/2022 20:16" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
actions on working copies
actionProjectChangeDirectory
| workingCopy directory gitRepository |
workingCopy := self projectSelection.
gitRepository := workingCopy repository gitRepository.
directory := SquotGUI
chooseDirectory: 'Repository directory'
from: (FileDirectory on: gitRepository workingDir pathName).
directory ifNil: [^ self].
gitRepository workingDir: (FileSystem disk root resolve: directory pathName).
self updateProjectSelection.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ buildProjectList: builder
dragItem: #dragFromProjectList:;
dropAccept: #wantsProjectListDrop:type:from:;
dropItem: #dropOnProjectList:at:copyIndicated:;
menu: #projectListMenu:;
menu: #projectListMenu:shifted:;
frame: (0@0 corner: [email protected])
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
ui menu
menuProjectListWorkingCopyHook: aMenu
menuProjectListWorkingCopyHook: aMenu shifted: shifted
<menuProjectList>
<menuPriority: 50>
self projectSelection ifNil: [^ aMenu].
aMenu addTitle: 'Working copy of ', self projectSelection name.
aMenu addList: {
{'Rename project'. #actionProjectRename}.
{'Remove project'. #actionProjectRemove}.
}.
aMenu addTitle: ('Working copy of {1}' format: {self projectSelection name}).
aMenu add: 'Rename project' action: #actionProjectRename.
(shifted or: [self projectSelection repository exists not]) ifTrue:
[aMenu addList: {
{'Change project directory'. #actionProjectChangeDirectory. 'Assign this project to a different directory. This does NOT move the existing repository to another location.'}
}].
aMenu add: 'Remove project' action: #actionProjectRemove.
aMenu addLine.
aMenu
addList: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@ ui
projectIndex: anIndex
anIndex > 1 ifFalse: [^ self].
projectIndex := anIndex.
repositoryExists := self projectSelection repository exists.
selectedHistorian := self projectSelection loadedHistorian.
self changed: #branchSelection.
commitSelection := nil.
commitToDiffAgainst := nil.
cachedCommitList := #().
repositoryExists ifFalse: [self informThatProjectDoesNotExist].
self refresh.
self updateProjectSelection.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ui menu
projectListMenu: aMenu shifted: aBoolean
^ self menu: aMenu for: #(menuProjectList) shifted: aBoolean
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ui
updateProjectSelection
repositoryExists := self projectSelection repository exists.
selectedHistorian := self projectSelection loadedHistorian.
self changed: #branchSelection.
commitSelection := nil.
commitToDiffAgainst := nil.
cachedCommitList := #().
repositoryExists ifFalse: [self informThatProjectDoesNotExist].
self refresh.
10 changes: 6 additions & 4 deletions src/Squit.package/SquitBrowser.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"actionPackageInfoObjectEditPreamble" : "jr 5/13/2017 21:16",
"actionPackageInfoObjectEditPreambleOfRemoval" : "jr 5/13/2017 21:16",
"actionProjectAdd" : "jr 5/11/2017 14:09",
"actionProjectChangeDirectory" : "ct 5/2/2024 19:05",
"actionProjectClone" : "jr 8/8/2020 00:31",
"actionProjectRemove" : "jr 8/10/2020 00:29",
"actionProjectRename" : "jr 7/24/2020 11:33",
Expand Down Expand Up @@ -92,7 +93,7 @@
"buildMenu:from:" : "jr 6/30/2017 22:48",
"buildObjectList:" : "jr 2/8/2020 23:47",
"buildProjectBranchPanel:" : "jr 12/22/2021 12:51",
"buildProjectList:" : "jr 2/8/2020 23:55",
"buildProjectList:" : "ct 10/4/2022 20:28",
"buildSearchBar:" : "jr 2/17/2022 23:01",
"buildSearchClearButton:" : "jr 2/17/2022 23:03",
"buildSearchPanel:" : "jr 2/17/2022 22:36",
Expand Down Expand Up @@ -154,7 +155,7 @@
"menuObjectListVersionObjectEdition:" : "jr 11/3/2020 14:41",
"menuObjectListWorkingCopyObject:" : "jr 11/3/2020 14:45",
"menuProjectListHook:" : "jr 10/17/2018 13:31",
"menuProjectListWorkingCopyHook:" : "jr 3/13/2022 17:19",
"menuProjectListWorkingCopyHook:shifted:" : "ct 10/4/2022 20:30",
"mergeBranch:into:" : "jr 8/7/2020 18:41",
"mergeCommit:into:" : "jr 8/7/2020 18:36",
"mergeCommit:into:mergeTitle:saveTitle:saveMessageTemplate:" : "jr 7/2/2022 22:44",
Expand All @@ -172,9 +173,9 @@
"offerToAddFirstProject" : "fn 4/26/2017 16:04",
"packageFormatMenuSpec" : "jr 8/31/2020 22:27",
"projectIndex" : "jr 8/10/2020 00:19",
"projectIndex:" : "jr 7/9/2022 09:37",
"projectIndex:" : "ct 5/2/2024 19:05",
"projectList" : "fn 4/11/2017 11:48",
"projectListMenu:" : "fn 4/11/2017 15:38",
"projectListMenu:shifted:" : "ct 5/2/2024 19:09",
"projectSelection" : "fn 4/11/2017 17:12",
"projectSelection:" : "jr 3/13/2022 18:05",
"projectsWithRepository:do:" : "jr 3/13/2022 18:00",
Expand Down Expand Up @@ -209,6 +210,7 @@
"timeOfLastListUpdate" : "fn 4/11/2017 18:00",
"toggleMetadata" : "jr 3/17/2019 22:07",
"updateHistorianDecorationsMap" : "jr 7/2/2022 21:56",
"updateProjectSelection" : "ct 5/2/2024 19:05",
"wantsBranchListDrop:type:from:" : "jr 5/9/2020 14:30",
"wantsCommitListDrop:type:from:" : "jr 5/9/2020 14:44",
"wantsObjectListDrop:type:from:" : "jr 2/9/2020 00:08",
Expand Down
Loading