Skip to content

Commit

Permalink
Catch disappeared repository
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Nov 30, 2023
1 parent 6376aa5 commit bd9914d
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
testing
ifRepositoryDoesNotExist: aBlock
self repositoryExists ifTrue: [^ nil].
self inform:
('The repository ''{1}'' has disappeared from the disk (it was at {2}). ',
'The repository will now be removed from the Git Browser.'
format: {self name. self repository baseDir}).
self unregister.
^ aBlock value
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
repository
^ self fsgitRepository repository
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
repositoryExists
^ self repository exists
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"headRef" : "mad 11/30/2023 13:16",
"headRefBasename" : "mad 10/16/2023 22:47",
"headRefName" : "mad 10/16/2023 22:47",
"ifRepositoryDoesNotExist:" : "mad 11/30/2023 17:09",
"imageHash" : "mad 11/28/2023 19:19",
"initialRemoteRefNameFor:" : "mad 9/18/2023 13:58",
"initialize" : "mad 11/28/2023 19:19",
Expand Down Expand Up @@ -123,6 +124,8 @@
"remoteRefName:" : "mad 11/29/2023 16:15",
"removeCredentialsFor:" : "mad 10/17/2023 12:01",
"removeMapper:" : "mad 9/20/2023 17:30",
"repository" : "mad 11/30/2023 17:02",
"repositoryExists" : "mad 11/30/2023 17:03",
"requestCredentialsFor:ifCanceled:" : "mad 9/18/2023 12:49",
"requestRemoteNameAndRefFor:" : "mad 9/18/2023 20:04",
"requestUnmappedPathWithTitle:initialAnswer:" : "mad 11/21/2023 14:31",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ui
commitList
self ifRepositoryDoesNotExist: [^ {}].
self activeWorkingCopy ifNil: [^ {}].
^ self withUnitOfWork: [GitHistoryWalker new startingFromAll: self commitListStartingCommits]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ui
ifRepositoryDoesNotExist: aBlock
^ (self activeWorkingCopy ifNil: [^ self]) ifRepositoryDoesNotExist: aBlock
1 change: 1 addition & 0 deletions src/Squot.package/SquotBrowser.class/instance/refList.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ui
refList
| refs |
self ifRepositoryDoesNotExist: [^ {}].
refs := self activeWorkingCopy ifNotNil: #allReferences ifNil: [^ {}].
self showGitRefs ifFalse: [
refs := refs select: [:each |
Expand Down
5 changes: 3 additions & 2 deletions src/Squot.package/SquotBrowser.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@
"buildUpperLayout:" : "mad 9/19/2023 12:12",
"buildWindow:" : "mad 9/15/2023 16:22",
"buildWith:" : "mad 9/1/2023 14:44",
"commitList" : "mad 9/19/2023 12:45",
"commitList" : "mad 11/30/2023 17:11",
"commitListMenu:" : "mad 11/29/2023 15:58",
"commitListStartingCommits" : "mad 9/19/2023 12:32",
"commitMenu:forRef:" : "mad 11/29/2023 16:49",
"currentBranchIfNilInformAnd:" : "mad 9/26/2023 16:56",
"doesRef:comeBeforeRef:" : "mad 9/19/2023 14:45",
"ifRepositoryDoesNotExist:" : "mad 11/30/2023 17:08",
"mergeCommitIntoHead:" : "mad 9/21/2023 13:47",
"mergeCommitIntoHead:displayName:" : "mad 11/7/2023 15:27",
"mergeRefIntoHead:" : "mad 9/18/2023 17:22",
Expand All @@ -93,7 +94,7 @@
"otherMenu:" : "mad 10/24/2023 17:14",
"projectListMenu:" : "mad 11/3/2023 15:11",
"refChanged:" : "mad 9/15/2023 11:04",
"refList" : "mad 10/18/2023 14:42",
"refList" : "mad 11/30/2023 17:00",
"refListMenu:" : "mad 11/29/2023 16:16",
"refTypeName:" : "mad 11/29/2023 15:59",
"requestBranchNameFor:fromRef:" : "mad 11/29/2023 16:11",
Expand Down

0 comments on commit bd9914d

Please sign in to comment.