diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..db51ca154 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.filetree diff --git a/src/Squit.package/SquitBrowser.class/class/registerInWorldMenu.st b/src/Squit.package/SquitBrowser.class/class/registerInWorldMenu.st index 5e41f8169..e0aab7cee 100644 --- a/src/Squit.package/SquitBrowser.class/class/registerInWorldMenu.st +++ b/src/Squit.package/SquitBrowser.class/class/registerInWorldMenu.st @@ -1,8 +1,9 @@ world menu registerInWorldMenu + "self registerInWorldMenu" (self environment valueOf: #TheWorldMenu) ifNotNil: [:worldMenu | worldMenu registerOpenCommand: (Array - with: 'Git Browser' + with: 'Squit' with: (Array with: self with: #open))]. \ No newline at end of file diff --git a/src/Squit.package/SquitBrowser.class/methodProperties.json b/src/Squit.package/SquitBrowser.class/methodProperties.json index 9907900e2..b9df56157 100644 --- a/src/Squit.package/SquitBrowser.class/methodProperties.json +++ b/src/Squit.package/SquitBrowser.class/methodProperties.json @@ -4,7 +4,7 @@ "initialize" : "jr 4/18/2018 21:28", "initializeSelfUpdate" : "jr 4/18/2018 21:27", "open" : "fn 4/11/2017 09:09", - "registerInWorldMenu" : "jr 4/15/2017 13:34", + "registerInWorldMenu" : "ek 10/26/2021 20:45", "selfUpdate" : "jr 3/7/2020 00:09", "selfUpdateBranch" : "jr 4/21/2018 22:22", "selfUpdateBranch:" : "jr 4/18/2018 22:37", diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/README.md b/src/Squit.package/SquitCredentialsFillInMorph.class/README.md new file mode 100644 index 000000000..fcc761570 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/README.md @@ -0,0 +1 @@ +I provide an UI to edit all relevant credential fields at once. \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/class/requestCredentials.st b/src/Squit.package/SquitCredentialsFillInMorph.class/class/requestCredentials.st new file mode 100644 index 000000000..b11bb5c06 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/class/requestCredentials.st @@ -0,0 +1,4 @@ +instance creation +requestCredentials + + ^ self new getUserResponse \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/accept.st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/accept.st new file mode 100644 index 000000000..f3c082279 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/accept.st @@ -0,0 +1,6 @@ +as yet unclassified +accept + + self + textPanesAccept; + closeDialog: self result. \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/addTextPanesAndDescriptions.st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/addTextPanesAndDescriptions.st new file mode 100644 index 000000000..2c78aee52 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/addTextPanesAndDescriptions.st @@ -0,0 +1,33 @@ +initialization +addTextPanesAndDescriptions + + | otherMessageMorph | + + column := AlignmentMorph newColumn + hResizing: #shrinkWrap; + vResizing: #shrinkWrap; + cellGap: 4; + color: Color transparent. + self paneMorph addMorph: column. + + self message: 'GitHub username (authentication)'. + + column addMorphBack: textPaneUsername. + + otherMessageMorph := messageMorph copy. + otherMessageMorph contents: 'GitHub password/token (authentication)'. + column addMorphBack: otherMessageMorph. + + column addMorphBack: textPanePassword. + + otherMessageMorph := messageMorph copy. + otherMessageMorph contents: 'Name (used for commits, e.g. Maria Muster)'. + column addMorphBack: otherMessageMorph. + + column addMorphBack: textPaneDisplayName. + + otherMessageMorph := messageMorph copy. + otherMessageMorph contents: 'Email (used for commits)'. + column addMorphBack: otherMessageMorph. + + column addMorphBack: textPaneEmail. \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/configurePaneMorph.st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/configurePaneMorph.st new file mode 100644 index 000000000..fe580373e --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/configurePaneMorph.st @@ -0,0 +1,6 @@ +initialization +configurePaneMorph. + + self paneMorph + hResizing: #shrinkWrap; + vResizing: #shrinkWrap. \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/createPasswordTextPaneFor..st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/createPasswordTextPaneFor..st new file mode 100644 index 000000000..cc25dd66b --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/createPasswordTextPaneFor..st @@ -0,0 +1,4 @@ +initialization +createPasswordTextPaneFor: aSymbol + + ^ (self createTextPaneFor: aSymbol) font: (StrikeFont passwordFontSize: 12) \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/createTextPaneFor..st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/createTextPaneFor..st new file mode 100644 index 000000000..de70fb9a7 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/createTextPaneFor..st @@ -0,0 +1,25 @@ +initialization +createTextPaneFor: aSymbol + + | textPane | + textPane := PluggableTextMorph + on: self + text: aSymbol + accept: (aSymbol, #:) asSymbol + "readSelection: #selectionInterval + menu: #codePaneMenu:shifted:". + textPane + showScrollBarsOnlyWhenNeeded; + wantsFrameAdornments: false; + hasUnacceptedEdits: true; + askBeforeDiscardingEdits: false; + setProperty: #alwaysAccept toValue: true; + acceptOnCR: true; + setNameTo: aSymbol asString; + layoutFrame: (LayoutFrame fractions: (0@0 corner: 1@1)); + hResizing: #spaceFill; + vResizing: #spaceFill; + minimumExtent: 0@2; + updateMinimumExtent; + scrollToTop. + ^ textPane \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/createTextPanes.st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/createTextPanes.st new file mode 100644 index 000000000..bab3d9108 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/createTextPanes.st @@ -0,0 +1,7 @@ +initialization +createTextPanes + + textPaneUsername := self createTextPaneFor: #username. + textPanePassword := self createPasswordTextPaneFor: #password. + textPaneDisplayName := self createTextPaneFor: #displayName. + textPaneEmail := self createTextPaneFor: #email. \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/displayName..st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/displayName..st new file mode 100644 index 000000000..c553c4914 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/displayName..st @@ -0,0 +1,4 @@ +accessing +displayName: aString + + displayName := aString. \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/displayName.st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/displayName.st new file mode 100644 index 000000000..49e825249 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/displayName.st @@ -0,0 +1,4 @@ +accessing +displayName + + ^ displayName \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/email..st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/email..st new file mode 100644 index 000000000..b22fc4041 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/email..st @@ -0,0 +1,4 @@ +accessing +email: aString + + email := aString. \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/email.st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/email.st new file mode 100644 index 000000000..5f31f640b --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/email.st @@ -0,0 +1,4 @@ +accessing +email + + ^ email \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/initialize.st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/initialize.st new file mode 100644 index 000000000..b8f9dd955 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/initialize.st @@ -0,0 +1,15 @@ +initialization +initialize + + super initialize. + + self title: 'GitHub credentials requested' translated. + self initializeTextPanes. + + self createAcceptButton + action: [self accept]. + self createCancelButton + action: [self closeDialog: nil]. + + self preferredPosition: ActiveHand cursorPoint. + self setDefaultParameters. \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/initializeTextPanes.st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/initializeTextPanes.st new file mode 100644 index 000000000..990eb205c --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/initializeTextPanes.st @@ -0,0 +1,6 @@ +initialization +initializeTextPanes + + self createTextPanes. + self addTextPanesAndDescriptions. + self configurePaneMorph. \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/password..st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/password..st new file mode 100644 index 000000000..4be77ff5d --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/password..st @@ -0,0 +1,4 @@ +accessing +password: aString + + password := aString. \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/password.st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/password.st new file mode 100644 index 000000000..8cd21fde1 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/password.st @@ -0,0 +1,4 @@ +accessing +password + + ^ password \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/result.st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/result.st new file mode 100644 index 000000000..7d9bfe9bb --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/result.st @@ -0,0 +1,10 @@ +as yet unclassified +result + + ^ Dictionary new + at: #username put: self username asString; + at: #password put: self password asString; + at: #displayName put: self displayName asString; + at: #email put: self email asString; + yourself + \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/textPanesAccept.st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/textPanesAccept.st new file mode 100644 index 000000000..8087a71cc --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/textPanesAccept.st @@ -0,0 +1,8 @@ +as yet unclassified +textPanesAccept + + textPaneUsername accept. + textPanePassword accept. + textPaneDisplayName accept. + textPaneEmail accept. + ^ 'meep' \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/username..st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/username..st new file mode 100644 index 000000000..8f1f46025 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/username..st @@ -0,0 +1,4 @@ +accessing +username: aString + + username := aString. \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/instance/username.st b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/username.st new file mode 100644 index 000000000..12b3e01fb --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/instance/username.st @@ -0,0 +1,4 @@ +accessing +username + + ^ username \ No newline at end of file diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/methodProperties.json b/src/Squit.package/SquitCredentialsFillInMorph.class/methodProperties.json new file mode 100644 index 000000000..07a396292 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/methodProperties.json @@ -0,0 +1,22 @@ +{ + "class" : { + "requestCredentials" : "ek 9/21/2021 16:53" }, + "instance" : { + "accept" : "ek 9/21/2021 18:23", + "addTextPanesAndDescriptions" : "mad 9/9/2022 14:06", + "configurePaneMorph" : "mad 9/9/2022 14:06", + "createPasswordTextPaneFor:" : "ek 9/21/2021 17:27", + "createTextPaneFor:" : "ek 9/21/2021 17:58", + "createTextPanes" : "ek 9/21/2021 17:28", + "displayName" : "ek 9/21/2021 17:31", + "displayName:" : "ek 9/21/2021 17:31", + "email" : "ek 9/21/2021 17:31", + "email:" : "ek 9/21/2021 17:31", + "initialize" : "ek 9/21/2021 18:22", + "initializeTextPanes" : "ek 9/21/2021 17:26", + "password" : "ek 9/21/2021 17:30", + "password:" : "ek 9/21/2021 17:30", + "result" : "ek 9/21/2021 18:26", + "textPanesAccept" : "ek 9/21/2021 18:14", + "username" : "ek 9/21/2021 17:29", + "username:" : "ek 9/21/2021 17:30" } } diff --git a/src/Squit.package/SquitCredentialsFillInMorph.class/properties.json b/src/Squit.package/SquitCredentialsFillInMorph.class/properties.json new file mode 100644 index 000000000..bf5c7dba8 --- /dev/null +++ b/src/Squit.package/SquitCredentialsFillInMorph.class/properties.json @@ -0,0 +1,22 @@ +{ + "category" : "Squit-Lecture", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "ek 10/14/2021 13:27", + "instvars" : [ + "username", + "password", + "displayName", + "email", + "textPaneUsername", + "textPanePassword", + "textPaneDisplayName", + "textPaneEmail", + "column" ], + "name" : "SquitCredentialsFillInMorph", + "pools" : [ + ], + "super" : "DialogWindow", + "type" : "normal" } diff --git a/src/Squit.package/SwaSquitBrowser.class/README.md b/src/Squit.package/SwaSquitBrowser.class/README.md new file mode 100644 index 000000000..0e0882ea9 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/README.md @@ -0,0 +1 @@ +I provide a UI to browse and manipulate exactly one Git repository and its history. I am intended to be a simpler version of the SquitBrowser that can be used in the SWA lecture. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/class/initialize.st b/src/Squit.package/SwaSquitBrowser.class/class/initialize.st new file mode 100644 index 000000000..ed3d3574d --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/class/initialize.st @@ -0,0 +1,4 @@ +class initialization +initialize + + self registerInWorldMenu. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/class/open.st b/src/Squit.package/SwaSquitBrowser.class/class/open.st new file mode 100644 index 000000000..a212f01d9 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/class/open.st @@ -0,0 +1,3 @@ +instance creation +open + ToolBuilder open: self new \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/class/registerInWorldMenu.st b/src/Squit.package/SwaSquitBrowser.class/class/registerInWorldMenu.st new file mode 100644 index 000000000..7ebb67fa6 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/class/registerInWorldMenu.st @@ -0,0 +1,9 @@ +world menu +registerInWorldMenu + "self registerInWorldMenu" + (self environment valueOf: #TheWorldMenu) ifNotNil: [:worldMenu | + worldMenu registerOpenCommand: (Array + with: 'SWA Git Browser' + with: (Array + with: self + with: #open))]. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/class/unregisterFromWorldMenu.st b/src/Squit.package/SwaSquitBrowser.class/class/unregisterFromWorldMenu.st new file mode 100644 index 000000000..0b43f7315 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/class/unregisterFromWorldMenu.st @@ -0,0 +1,5 @@ +world menu +unregisterFromWorldMenu + "self unregisterFromWorldMenu" + (self environment valueOf: #TheWorldMenu) ifNotNil: + [:worldMenu | worldMenu unregisterOpenCommandWithReceiver: self]. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/actionAddOrRemoveTrackedPackages.st b/src/Squit.package/SwaSquitBrowser.class/instance/actionAddOrRemoveTrackedPackages.st new file mode 100644 index 000000000..237e48308 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/actionAddOrRemoveTrackedPackages.st @@ -0,0 +1,4 @@ +actions +actionAddOrRemoveTrackedPackages + + ^ self withUnitOfWork: [SquitPackageChooser chooseFor: self selectedRepository] \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/actionCloneAndMerge.st b/src/Squit.package/SwaSquitBrowser.class/instance/actionCloneAndMerge.st new file mode 100644 index 000000000..c4cd68ea4 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/actionCloneAndMerge.st @@ -0,0 +1,13 @@ +actions +actionCloneAndMerge + + | operation | + + operation := SwaSquitInteractiveClone new. + [operation clone] on: SquitBadRemote do: [:e | e retry]. + self changed: #repositoryList. + self selectRepository: operation repository. + self actionMergeInteractive: false. + Project current addDeferredUIMessage: [self refresh]. + self browseRepository. + self refresh. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/actionCommitAndPush.st b/src/Squit.package/SwaSquitBrowser.class/instance/actionCommitAndPush.st new file mode 100644 index 000000000..1a7145103 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/actionCommitAndPush.st @@ -0,0 +1,4 @@ +actions +actionCommitAndPush + + self actionCommitAndThenDo: [self actionPush]. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/actionCommitAndThenDo..st b/src/Squit.package/SwaSquitBrowser.class/instance/actionCommitAndThenDo..st new file mode 100644 index 000000000..ac5c67bc8 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/actionCommitAndThenDo..st @@ -0,0 +1,15 @@ +actions +actionCommitAndThenDo: aBlock + + | workingCopy | + self hasSelectedRepository ifFalse: [^ self]. + + workingCopy := self selectedRepository. + self withUnitOfWork: [ + [SquotGUI waitFor: + ((workingCopy newInteractiveSaveOperation + title: 'Select changes and message for the new version'; + applyToWorkingCopy) + then: [:result | self refresh. aBlock value] + ifRejected: [:reason | nil])] + on: BrokenPromise do: [:e | e ifNotError: []]]. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/actionCommitDiffWithParent.st b/src/Squit.package/SwaSquitBrowser.class/instance/actionCommitDiffWithParent.st new file mode 100644 index 000000000..713416537 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/actionCommitDiffWithParent.st @@ -0,0 +1,9 @@ +actions +actionCommitDiffWithParent + + self withUnitOfWork: + [(SquotDiffExplorer + from: (self selectedCommit parents at: 1 ifAbsent: [SquotSnapshot empty]) + to: self selectedCommit) + workingCopy: self selectedRepository; + openLabel: 'Comparing versions']. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/actionCommitSelectionCheckout.st b/src/Squit.package/SwaSquitBrowser.class/instance/actionCommitSelectionCheckout.st new file mode 100644 index 000000000..07d0af0a7 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/actionCommitSelectionCheckout.st @@ -0,0 +1,5 @@ +actions +actionCommitSelectionCheckout + + self withUnitOfWork: + [self selectedRepository loadVersionInteractively: self selectedCommit ifCanceled: [^ self]]. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/actionCredentialsEdit.st b/src/Squit.package/SwaSquitBrowser.class/instance/actionCredentialsEdit.st new file mode 100644 index 000000000..8262f6e21 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/actionCredentialsEdit.st @@ -0,0 +1,24 @@ +actions +actionCredentialsEdit + + | credentials repository gitRepository remoteUrl displayName email | + + repository := self selectedRepository repository. + gitRepository := repository git. + remoteUrl := (repository remoteNames collect: + [:each | (gitRepository remoteUrl: each)] + thenSelect: [:each | each beginsWith: 'http']) first. + credentials := SquitCredentialsFillInMorph requestCredentials. + credentials ifNil: [^ nil]. + + repository + addCredentialsFor: remoteUrl + user: (credentials at: #username) + password: (credentials at: #password). + + displayName := credentials at: #displayName. + email := credentials at: #email. + displayName ifNotNil: [GitStamp defaultName: displayName]. + email ifNotNil: [GitStamp defaultEmail: email]. + gitRepository configAt: 'user.name' put: displayName. + gitRepository configAt: 'user.email' put: email. diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/actionMergeInteractive..st b/src/Squit.package/SwaSquitBrowser.class/instance/actionMergeInteractive..st new file mode 100644 index 000000000..2d29b1dd4 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/actionMergeInteractive..st @@ -0,0 +1,7 @@ +actions +actionMergeInteractive: aBoolean + + self withUnitOfWork: [ + self selectedRepository + loadVersion: self selectedCommit + interactive: aBoolean]. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/actionPull.st b/src/Squit.package/SwaSquitBrowser.class/instance/actionPull.st new file mode 100644 index 000000000..6a45862bb --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/actionPull.st @@ -0,0 +1,18 @@ +actions +actionPull + + [(SquitInteractivePullFromUpstream workingCopy: self selectedRepository) + pull] + on: SquitUpstreamUndefined do: + [:e | + self inform: + 'You can''t pull as this repository has no remote repository configured (e. g. on GitHub). ', + 'Please set one using the advanced Git Browser, then pull again.'. + ^ self] + on: SquitBadRemote do: + [:e | + self inform: + 'Something went wrong while pulling from the remote repository. ', + 'Please try fixing the issue with the advanced Git Browser or seek help from slack.'. + ^ self]. + ^ Project current addDeferredUIMessage: [self refresh] \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/actionPush.st b/src/Squit.package/SwaSquitBrowser.class/instance/actionPush.st new file mode 100644 index 000000000..71cf2aa5f --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/actionPush.st @@ -0,0 +1,13 @@ +actions +actionPush + + self withUnitOfWork: [ + | historian | + historian := self selectedRepository loadedHistorian. + [[(SquitInteractivePushToUpstream historian: historian) push] + on: SquitBadRemote do: + [:e | + Project current addDeferredUIMessage: [self error: 'bad remote: ' , e remote]. + e resume]] + on: SquotCannotExportEmptyHistory do: + [self inform: 'No commits to push on ', historian shortName, ' yet.'].]. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/actionRepositoryButtonClicked.st b/src/Squit.package/SwaSquitBrowser.class/instance/actionRepositoryButtonClicked.st new file mode 100644 index 000000000..cabfb3059 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/actionRepositoryButtonClicked.st @@ -0,0 +1,6 @@ +actions +actionRepositoryButtonClicked + + self selectedRepository + ifNotNil: [self actionCredentialsEdit] + ifNil: [self actionCloneAndMerge] \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/actionRepositoryRemove.st b/src/Squit.package/SwaSquitBrowser.class/instance/actionRepositoryRemove.st new file mode 100644 index 000000000..34eff66b4 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/actionRepositoryRemove.st @@ -0,0 +1,12 @@ +actions +actionRepositoryRemove + + | repository | + repository := self selectedRepository ifNil: [^ self]. + (self confirm: 'Really delete project ', repository name, '?') + ifFalse: [^ self]. + repository unregister. + self repositoryListIndex: (self repositoryListIndex min: self projectList size). + self hasRepositories ifFalse: [self refresh]. + + \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/addRepository.st b/src/Squit.package/SwaSquitBrowser.class/instance/addRepository.st new file mode 100644 index 000000000..9823fc5c8 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/addRepository.st @@ -0,0 +1,7 @@ +actions +addRepository + + | operation | + operation := SwaSquitInteractiveClone new. + [operation clone] on: SquitBadRemote do: [:e | e retry]. + Project current addDeferredUIMessage: [self refresh] \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/browseRepository.st b/src/Squit.package/SwaSquitBrowser.class/instance/browseRepository.st new file mode 100644 index 000000000..28bcc80cc --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/browseRepository.st @@ -0,0 +1,4 @@ +actions +browseRepository + + ((self selectedRepository ifNil: [^ self]) store artifacts collect: #object) detect: [:artifact | artifact isKindOf: PackageInfo] ifFound: #browse \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/buildCommitList..st b/src/Squit.package/SwaSquitBrowser.class/instance/buildCommitList..st new file mode 100644 index 000000000..c59b20cf4 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/buildCommitList..st @@ -0,0 +1,18 @@ +toolbuilder +buildCommitList: aBuilder + + ^ aBuilder pluggableMultiColumnListSpec new + model: self; + list: #commitColumns; + getIndex: #commitListIndex; + hScrollBarPolicy: #whenNeeded; + setIndex: #commitListIndex:; + columnResizings: #(#shrinkWrap #shrinkWrap #shrinkWrap #spaceFill); + itemAlignments: #(#right #left #left #left); + itemPaddings: {5 @ 0. 5 @ 0. 5 @ 0. 5 @ 0}; + menu: #commitListMenu:; + frame: (LayoutFrame new + leftFraction: 0 offset: 0; + topFraction: 0 offset: self buttonHeight; + rightFraction: 1 offset: 0; + bottomFraction: 1 offset: self buttonHeight negated) \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/buildRepositoryButton..st b/src/Squit.package/SwaSquitBrowser.class/instance/buildRepositoryButton..st new file mode 100644 index 000000000..68913fd5f --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/buildRepositoryButton..st @@ -0,0 +1,12 @@ +toolbuilder +buildRepositoryButton: aBuilder + + ^ aBuilder pluggableButtonSpec new + model: self; + label: #repositoryButtonText; + action: #actionRepositoryButtonClicked; + frame: (LayoutFrame new + leftFraction: 0.8 offset: 0; + topFraction: 0 offset: 0; + rightFraction: 1 offset: 0; + bottomFraction: 0 offset: self buttonHeight) \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/buildRepositoryButtons..st b/src/Squit.package/SwaSquitBrowser.class/instance/buildRepositoryButtons..st new file mode 100644 index 000000000..dc1232b1b --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/buildRepositoryButtons..st @@ -0,0 +1,19 @@ +toolbuilder +buildRepositoryButtons: aBuilder + + ^ aBuilder pluggablePanelSpec new + layout: #horizontal; + children: { + aBuilder pluggableButtonSpec new + model: self; + label: 'Pull (Fetch & Merge)'; + action: #actionPull. + aBuilder pluggableButtonSpec new + model: self; + label: 'Commit & Push'; + action: #actionCommitAndPush }; + frame: (LayoutFrame new + leftFraction: 0 offset: 0; + topFraction: 1 offset: self buttonHeight negated; + rightFraction: 1 offset: 0; + bottomFraction: 1 offset: 0) \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/buildRepositoryLabel..st b/src/Squit.package/SwaSquitBrowser.class/instance/buildRepositoryLabel..st new file mode 100644 index 000000000..4d87efba2 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/buildRepositoryLabel..st @@ -0,0 +1,13 @@ +toolbuilder +buildRepositoryLabel: aBuilder + + ^ aBuilder pluggableTextSpec new + model: self; + getText: #repositoryText; + readOnly: true; + indicateUnacceptedChanges: false; + frame: (LayoutFrame new + leftFraction: 0 offset: 0; + topFraction: 0 offset: 0; + rightFraction: 0.8 offset: 0; + bottomFraction: 0 offset: self buttonHeight) \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/buildWith..st b/src/Squit.package/SwaSquitBrowser.class/instance/buildWith..st new file mode 100644 index 000000000..822d6026c --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/buildWith..st @@ -0,0 +1,10 @@ +toolbuilder +buildWith: aBuilder + + ^ aBuilder build: ((self buildWindowWith: aBuilder) + children: { + self buildRepositoryLabel: aBuilder. + self buildCommitList: aBuilder. + self buildRepositoryButton: aBuilder. + self buildRepositoryButtons: aBuilder}; + yourself) \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/buttonHeight.st b/src/Squit.package/SwaSquitBrowser.class/instance/buttonHeight.st new file mode 100644 index 000000000..bec9a6a6a --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/buttonHeight.st @@ -0,0 +1,4 @@ +toolbuilder +buttonHeight + + ^ TextStyle defaultFont height * 2 \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/commitColumns.st b/src/Squit.package/SwaSquitBrowser.class/instance/commitColumns.st new file mode 100644 index 000000000..9b9149fef --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/commitColumns.st @@ -0,0 +1,10 @@ +toolbuilder +commitColumns + + | commits | + commits := self commitList. + ^ { + [:commit | self formatDate: commit timestamp]. + [:commit | String streamContents: [:s | commit timestamp printHMSOn: s]]. + [:commit | commit metadata at: #author]. + [:commit | commit message]} withIndexCollect: [:columnBlock :columnIndex | commits collect: [:commit | columnBlock value: commit]] \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/commitList.st b/src/Squit.package/SwaSquitBrowser.class/instance/commitList.st new file mode 100644 index 000000000..395ef7c54 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/commitList.st @@ -0,0 +1,11 @@ +toolbuilder +commitList + + | walker count | + walker := (self selectedRepository ifNil: [^ #()]) loadedHistorian repository historyWalkClass new. + walker nextPut: self selectedRepository loadedHistorian version. + count := 0. + ^ Array streamContents: [:stream | + [walker atEnd or: [count > 30]] whileFalse: [ + stream nextPut: walker next. + count := count + 1]] diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/commitListIndex..st b/src/Squit.package/SwaSquitBrowser.class/instance/commitListIndex..st new file mode 100644 index 000000000..e2f29c625 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/commitListIndex..st @@ -0,0 +1,5 @@ +accessing +commitListIndex: aNumber + + commitListIndex := aNumber. + self changed: #commitListIndex \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/commitListIndex.st b/src/Squit.package/SwaSquitBrowser.class/instance/commitListIndex.st new file mode 100644 index 000000000..e4215d777 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/commitListIndex.st @@ -0,0 +1,4 @@ +accessing +commitListIndex + + ^ commitListIndex \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/commitListMenu..st b/src/Squit.package/SwaSquitBrowser.class/instance/commitListMenu..st new file mode 100644 index 000000000..efc45417d --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/commitListMenu..st @@ -0,0 +1,4 @@ +ui menu +commitListMenu: aMenu + + ^ self menu: aMenu for: #(menuCommitList) \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/fetch..st b/src/Squit.package/SwaSquitBrowser.class/instance/fetch..st new file mode 100644 index 000000000..0e9b323eb --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/fetch..st @@ -0,0 +1,10 @@ +actions +fetch: aWorkingCopy + + | repository gitRepository remoteNames | + repository := aWorkingCopy repository. + gitRepository := repository fsgitRepository. + remoteNames := gitRepository remoteNames. + remoteNames ifNil: [^ self]. + remoteNames ifEmpty: [self inform: 'Nothing selected.'. ^ self]. + self fetchFrom: repository remoteNames: remoteNames. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/fetchFrom.remoteNames..st b/src/Squit.package/SwaSquitBrowser.class/instance/fetchFrom.remoteNames..st new file mode 100644 index 000000000..165f0ce1e --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/fetchFrom.remoteNames..st @@ -0,0 +1,10 @@ +actions +fetchFrom: aRepository remoteNames: aCollection + + [(SquitInteractiveFetch repository: aRepository remoteNames: aCollection) + fetch] + on: SquitBadRemote do: + [:e | + Project current addDeferredUIMessage: [self error: 'bad remote: ' , e remote]. + e resume]. + self refresh. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/formatDate..st b/src/Squit.package/SwaSquitBrowser.class/instance/formatDate..st new file mode 100644 index 000000000..ac19bf1c7 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/formatDate..st @@ -0,0 +1,12 @@ +toolbuilder +formatDate: aDateAndTime + + | YY MM DD hh mm | + YY := aDateAndTime year. + MM := aDateAndTime monthAbbreviation. + DD := aDateAndTime dayOfMonth asString. + hh := aDateAndTime hours. + mm := aDateAndTime minutes asString. + ^ aDateAndTime year = DateAndTime now year + ifTrue: [DD, ' ', MM] + ifFalse: [DD, ' ', MM, ' ', YY] \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/hasRepositories.st b/src/Squit.package/SwaSquitBrowser.class/instance/hasRepositories.st new file mode 100644 index 000000000..04b83a0cb --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/hasRepositories.st @@ -0,0 +1,4 @@ +accessing +hasRepositories + + ^ self repositoryList size > 1 \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/hasSelectedRepository.st b/src/Squit.package/SwaSquitBrowser.class/instance/hasSelectedRepository.st new file mode 100644 index 000000000..99baacef8 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/hasSelectedRepository.st @@ -0,0 +1,4 @@ +testing +hasSelectedRepository + + ^ self selectedRepository notNil \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/initialize.st b/src/Squit.package/SwaSquitBrowser.class/instance/initialize.st new file mode 100644 index 000000000..c3311d34f --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/initialize.st @@ -0,0 +1,8 @@ +initialize-release +initialize + + super initialize. + commitListIndex := 1. + self repositoryList + ifEmpty: [repositoryListIndex := 0] + ifNotEmpty: [repositoryListIndex := 1]. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/menuCommitListHook..st b/src/Squit.package/SwaSquitBrowser.class/instance/menuCommitListHook..st new file mode 100644 index 000000000..7bbb2596a --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/menuCommitListHook..st @@ -0,0 +1,11 @@ +ui menu +menuCommitListHook: aMenu + + + self selectedCommit ifNil: [^ aMenu]. + aMenu addList: { + {'Checkout objects'. #actionCommitSelectionCheckout. 'Checkout objects from this commit. You will be able to select what will actually be loaded.', String cr, 'NOTE: unless you change the selection, your uncommitted changes will be reverted, so that what is loaded matches the objects in this commit!'}. + {'Compare with parent commit'. #actionCommitDiffWithParent. 'Compare selected commit with parent commit.'}. + }. + + ^ aMenu \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/refresh.st b/src/Squit.package/SwaSquitBrowser.class/instance/refresh.st new file mode 100644 index 000000000..d8bed1578 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/refresh.st @@ -0,0 +1,6 @@ +toolbuilder +refresh + + self changed: #commitColumns. + self changed: #repositoryButtonText. + self changed: #repositoryText \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/repositoryButtonText.st b/src/Squit.package/SwaSquitBrowser.class/instance/repositoryButtonText.st new file mode 100644 index 000000000..998669505 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/repositoryButtonText.st @@ -0,0 +1,6 @@ +toolbuilder +repositoryButtonText + + ^ self selectedRepository + ifNotNil: ['Edit Credentials'] + ifNil: ['Clone & Merge'] \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/repositoryList.st b/src/Squit.package/SwaSquitBrowser.class/instance/repositoryList.st new file mode 100644 index 000000000..214129d63 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/repositoryList.st @@ -0,0 +1,4 @@ +accessing +repositoryList + + ^ SquotWorkingCopy registered \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/repositoryListIndex..st b/src/Squit.package/SwaSquitBrowser.class/instance/repositoryListIndex..st new file mode 100644 index 000000000..b913164f4 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/repositoryListIndex..st @@ -0,0 +1,6 @@ +accessing +repositoryListIndex: aNumber + + repositoryListIndex := aNumber. + self changed: #repositoryListIndex. + self changed: #commitColumns. diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/repositoryListIndex.st b/src/Squit.package/SwaSquitBrowser.class/instance/repositoryListIndex.st new file mode 100644 index 000000000..5b5b68ead --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/repositoryListIndex.st @@ -0,0 +1,4 @@ +accessing +repositoryListIndex + + ^ repositoryListIndex \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/repositoryText.st b/src/Squit.package/SwaSquitBrowser.class/instance/repositoryText.st new file mode 100644 index 000000000..6147e397d --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/repositoryText.st @@ -0,0 +1,6 @@ +toolbuilder +repositoryText + + ^ self selectedRepository + ifNotNilDo: [:repository | repository asString] + ifNil: ['No repository selected/cloned'] \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/selectRepository..st b/src/Squit.package/SwaSquitBrowser.class/instance/selectRepository..st new file mode 100644 index 000000000..e85680e9b --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/selectRepository..st @@ -0,0 +1,6 @@ +accessing +selectRepository: repository + + self repositoryListIndex: (repository + ifNotNil: [self repositoryList findFirst: [:ea | ea repository = repository]] + ifNil: [0]). \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/selectedCommit.st b/src/Squit.package/SwaSquitBrowser.class/instance/selectedCommit.st new file mode 100644 index 000000000..b02c750d1 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/selectedCommit.st @@ -0,0 +1,5 @@ +accessing +selectedCommit + + self commitListIndex = 0 ifTrue: [^ nil]. + ^ self commitList at: self commitListIndex \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/selectedRepository.st b/src/Squit.package/SwaSquitBrowser.class/instance/selectedRepository.st new file mode 100644 index 000000000..3b9e36322 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/selectedRepository.st @@ -0,0 +1,5 @@ +accessing +selectedRepository + + self repositoryListIndex = 0 ifTrue: [^ nil]. + ^ self repositoryList at: self repositoryListIndex \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/instance/withUnitOfWork..st b/src/Squit.package/SwaSquitBrowser.class/instance/withUnitOfWork..st new file mode 100644 index 000000000..ec4cebb0e --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/instance/withUnitOfWork..st @@ -0,0 +1,10 @@ +actions +withUnitOfWork: aBlock + + | unitOfWork | + self hasSelectedRepository ifFalse: [^ aBlock value]. + + unitOfWork := self selectedRepository repository unitOfWork. + unitOfWork start. + ^ [unitOfWork activateDuring: aBlock] + ensure: [unitOfWork finish] \ No newline at end of file diff --git a/src/Squit.package/SwaSquitBrowser.class/methodProperties.json b/src/Squit.package/SwaSquitBrowser.class/methodProperties.json new file mode 100644 index 000000000..0cff0c6e3 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/methodProperties.json @@ -0,0 +1,49 @@ +{ + "class" : { + "initialize" : "ek 10/14/2021 13:40", + "open" : "ek 7/18/2021 10:05", + "registerInWorldMenu" : "ek 10/26/2021 20:49", + "unregisterFromWorldMenu" : "ek 10/14/2021 13:43" }, + "instance" : { + "actionAddOrRemoveTrackedPackages" : "ek 9/21/2021 19:24", + "actionCloneAndMerge" : "ek 10/14/2021 13:20", + "actionCommitAndPush" : "ct 8/30/2021 16:55", + "actionCommitAndThenDo:" : "ct 8/30/2021 16:53", + "actionCommitDiffWithParent" : "ek 10/14/2021 13:12", + "actionCommitSelectionCheckout" : "ek 9/21/2021 19:34", + "actionCredentialsEdit" : "ek 10/14/2021 13:18", + "actionMergeInteractive:" : "ct 8/30/2021 15:43", + "actionPull" : "mad 9/9/2022 13:12", + "actionPush" : "ct 8/30/2021 17:02", + "actionRepositoryButtonClicked" : "ek 10/14/2021 13:06", + "actionRepositoryRemove" : "ek 9/21/2021 19:13", + "addRepository" : "ct 8/30/2021 17:20:35", + "browseRepository" : "ct 8/30/2021 16:16", + "buildCommitList:" : "ek 10/14/2021 12:47", + "buildRepositoryButton:" : "ek 10/14/2021 13:06", + "buildRepositoryButtons:" : "mad 9/7/2022 19:15", + "buildRepositoryLabel:" : "ek 10/14/2021 13:25", + "buildWith:" : "ek 10/14/2021 13:24", + "buttonHeight" : "tobe 7/17/2021 14:49", + "commitColumns" : "ct 8/30/2021 15:27", + "commitList" : "ct 8/30/2021 16:01", + "commitListIndex" : "tobe 7/17/2021 15:06", + "commitListIndex:" : "tobe 7/17/2021 15:05", + "commitListMenu:" : "ek 9/21/2021 19:31", + "fetch:" : "ct 8/30/2021 15:52", + "fetchFrom:remoteNames:" : "ct 8/30/2021 15:54", + "formatDate:" : "tobe 7/17/2021 15:37", + "hasRepositories" : "ek 9/21/2021 19:13", + "hasSelectedRepository" : "ct 8/30/2021 15:36", + "initialize" : "ek 9/19/2021 18:45", + "menuCommitListHook:" : "ek 10/14/2021 13:11", + "refresh" : "ek 10/14/2021 13:23", + "repositoryButtonText" : "ek 10/14/2021 13:04", + "repositoryList" : "tobe 7/17/2021 14:59", + "repositoryListIndex" : "tobe 7/17/2021 14:58", + "repositoryListIndex:" : "ct 8/30/2021 15:49", + "repositoryText" : "ek 10/14/2021 13:02", + "selectRepository:" : "ct 8/30/2021 16:07", + "selectedCommit" : "ct 8/30/2021 15:39", + "selectedRepository" : "ct 8/30/2021 15:18", + "withUnitOfWork:" : "ct 8/30/2021 15:36" } } diff --git a/src/Squit.package/SwaSquitBrowser.class/properties.json b/src/Squit.package/SwaSquitBrowser.class/properties.json new file mode 100644 index 000000000..65d6a6b47 --- /dev/null +++ b/src/Squit.package/SwaSquitBrowser.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "Squit-Lecture", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "ek 10/14/2021 13:27", + "instvars" : [ + "repositoryListIndex", + "commitListIndex" ], + "name" : "SwaSquitBrowser", + "pools" : [ + ], + "super" : "Model", + "type" : "normal" } diff --git a/src/Squit.package/SwaSquitInteractiveClone.class/README.md b/src/Squit.package/SwaSquitInteractiveClone.class/README.md new file mode 100644 index 000000000..fc9a48aab --- /dev/null +++ b/src/Squit.package/SwaSquitInteractiveClone.class/README.md @@ -0,0 +1 @@ +I am a streamlined version of SquitInteractiveClone. I only need a repository URL, I create folders and names automatically. \ No newline at end of file diff --git a/src/Squit.package/SwaSquitInteractiveClone.class/instance/clone.st b/src/Squit.package/SwaSquitInteractiveClone.class/instance/clone.st new file mode 100644 index 000000000..ff8230601 --- /dev/null +++ b/src/Squit.package/SwaSquitInteractiveClone.class/instance/clone.st @@ -0,0 +1,9 @@ +running +clone + + self requestUrl ifNil: [^ nil]. + name := (remoteUrl splitBy: '/') last copyReplaceAll: '.git' with: ''. + + self createRepository ifNil: [^ nil]. + repository withUnitOfWork: [self fetchAndSetUp ifNil: [^ nil]]. + self registerWorkingCopy ifNil: [^ nil] \ No newline at end of file diff --git a/src/Squit.package/SwaSquitInteractiveClone.class/instance/createRepository.st b/src/Squit.package/SwaSquitInteractiveClone.class/instance/createRepository.st new file mode 100644 index 000000000..5c0765240 --- /dev/null +++ b/src/Squit.package/SwaSquitInteractiveClone.class/instance/createRepository.st @@ -0,0 +1,9 @@ +private +createRepository + + | repositoryPath | + directory := (FileDirectory default on: 'squot-repositories', FileDirectory slash, name) assureExistence. + directory ifNil: [^ nil]. + repositoryPath := directory pathName. + repository := SquitRepository new initializeInDirectory: (FileSystem disk root resolve: repositoryPath). + ^ repository \ No newline at end of file diff --git a/src/Squit.package/SwaSquitInteractiveClone.class/instance/registerWorkingCopy.st b/src/Squit.package/SwaSquitInteractiveClone.class/instance/registerWorkingCopy.st new file mode 100644 index 000000000..032a86332 --- /dev/null +++ b/src/Squit.package/SwaSquitInteractiveClone.class/instance/registerWorkingCopy.st @@ -0,0 +1,9 @@ +running +registerWorkingCopy + + workingCopy := SquotWorkingCopy newOnObjectMemory. + workingCopy repository: repository. + self setLoadedHistorianFromHead. + workingCopy name: name. + workingCopy register. + ^ workingCopy \ No newline at end of file diff --git a/src/Squit.package/SwaSquitInteractiveClone.class/instance/requestAndStoreCredentialsFor.remoteUrl.ifCanceled..st b/src/Squit.package/SwaSquitInteractiveClone.class/instance/requestAndStoreCredentialsFor.remoteUrl.ifCanceled..st new file mode 100644 index 000000000..a88663d5d --- /dev/null +++ b/src/Squit.package/SwaSquitInteractiveClone.class/instance/requestAndStoreCredentialsFor.remoteUrl.ifCanceled..st @@ -0,0 +1,21 @@ +error handling +requestAndStoreCredentialsFor: repository remoteUrl: remoteUrl ifCanceled: cancelBlock + + | credentials gitRepository displayName email | + credentials := SquitCredentialsFillInMorph requestCredentials + ifNil: [^ cancelBlock value]. + + repository + addCredentialsFor: remoteUrl + user: (credentials at: #username) + password: (credentials at: #password). + + gitRepository := repository git. + displayName := credentials at: #displayName. + email := credentials at: #email. + displayName ifNotNil: [GitStamp defaultName: displayName]. + email ifNotNil: [GitStamp defaultEmail: email]. + gitRepository configAt: 'user.name' put: displayName. + gitRepository configAt: 'user.email' put: email. + + ^ repository credentialsFor: remoteUrl diff --git a/src/Squit.package/SwaSquitInteractiveClone.class/methodProperties.json b/src/Squit.package/SwaSquitInteractiveClone.class/methodProperties.json new file mode 100644 index 000000000..0dc4f8b51 --- /dev/null +++ b/src/Squit.package/SwaSquitInteractiveClone.class/methodProperties.json @@ -0,0 +1,8 @@ +{ + "class" : { + }, + "instance" : { + "clone" : "tobe 7/17/2021 15:34", + "createRepository" : "tobe 7/17/2021 15:35", + "registerWorkingCopy" : "ek 7/17/2021 12:01", + "requestAndStoreCredentialsFor:remoteUrl:ifCanceled:" : "ek 9/21/2021 18:38" } } diff --git a/src/Squit.package/SwaSquitInteractiveClone.class/properties.json b/src/Squit.package/SwaSquitInteractiveClone.class/properties.json new file mode 100644 index 000000000..2336529c8 --- /dev/null +++ b/src/Squit.package/SwaSquitInteractiveClone.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Squit-Lecture", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "ek 10/14/2021 13:28", + "instvars" : [ + "name" ], + "name" : "SwaSquitInteractiveClone", + "pools" : [ + ], + "super" : "SquitInteractiveClone", + "type" : "normal" } diff --git a/src/Squit.package/monticello.meta/categories.st b/src/Squit.package/monticello.meta/categories.st index 3f0e30f61..82cc92096 100644 --- a/src/Squit.package/monticello.meta/categories.st +++ b/src/Squit.package/monticello.meta/categories.st @@ -3,4 +3,5 @@ SystemOrganization addCategory: #'Squit-Exceptions'! SystemOrganization addCategory: #'Squit-UI'! SystemOrganization addCategory: #'Squit-UI-Support'! SystemOrganization addCategory: #'Squit-Tests'! +SystemOrganization addCategory: #'Squit-Lecture'! SystemOrganization addCategory: #'Squit-Tests-UI'! diff --git a/src/Squit.package/monticello.meta/package b/src/Squit.package/monticello.meta/package new file mode 100644 index 000000000..60638520d --- /dev/null +++ b/src/Squit.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'Squit') \ No newline at end of file diff --git a/src/Squit.package/monticello.meta/version b/src/Squit.package/monticello.meta/version new file mode 100644 index 000000000..c63c324bb --- /dev/null +++ b/src/Squit.package/monticello.meta/version @@ -0,0 +1 @@ +(name 'Squit-mad.15' message 'Fix SquitCredentialsFillInMorph sizing' id '3e484930-f622-4dec-bc6e-c8411f9978cc' date '9 September 2022' time '2:30:42.655016 pm' author 'mad' ancestors ((name 'Squit-mad.14' message 'Remove unused methods' id '84b87d9b-be06-45ce-90e0-6a3777390d34' date '9 September 2022' time '1:38:14.434284 pm' author 'mad' ancestors ((name 'Squit-mad.13' message 'Add SwaSquitBrowser>>actionPull using SquitInteractivePullFromUpstream' id '3284d489-b024-4119-bab8-addfc18cbce6' date '9 September 2022' time '1:28:37.17515 pm' author 'mad' ancestors ((name 'Squit-mad.11' message 'Add SwaSquitBrowser>>actionPull using SquitInteractivePullFromUpstream' id 'afe96613-c13e-46a1-b2dd-0eac5eb43724' date '9 September 2022' time '1:15:12.737264 pm' author 'mad' ancestors ((name 'Squit-ek.10' message 'add second registration method' id '64325ee2-e821-4ce2-8e94-d1afbb360686' date '26 October 2021' time '8:51:31.569315 pm' author 'ek' ancestors ((name 'Squit-ek.9' message 'Tool handles only exactly one repository' id 'd87a7aa7-ff7b-4555-953b-5f4f5606211d' date '14 October 2021' time '1:36:06.083263 pm' author 'ek' ancestors ((name 'Squit-ek.8' message 'renaming' id '57b59ac5-ca24-4ee8-af6f-0057d1fbd0a2' date '14 October 2021' time '11:40:48.185265 am' author 'ek' ancestors ((name 'Squit-ek.7' message 'remove back-up tool' id '94063854-60c8-4d76-bcc2-09a36d965af9' date '14 October 2021' time '11:38:49.527581 am' author 'ek' ancestors ((name 'Squit-ek.6' message 'add credentials Morph, minor fixes' id 'ee1af622-08d6-4cc5-a562-987443b92c69' date '13 October 2021' time '4:48:06.072503 pm' author 'ek' ancestors ((name 'Squit-ct.5' message 'empty log message' id 'f05de4c6-5f71-6f4c-9080-f5fd744b072c' date '30 August 2021' time '5:20:35.40661 pm' author 'ct' ancestors ((name 'Squit-ct.4' message 'empty log message' id '555ffaf2-7cbe-e747-9fd1-fc706de0aa88' date '30 August 2021' time '5:19:42.73361 pm' author 'ct' ancestors ((name 'Squit-cypress.1' message 'fabricated from a Cypress format repository' id '4a5f3775-51a1-2145-beb7-ebcdb560f31a' date '30 August 2021' time '3:16:59.539657 pm' author '' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/PackageInfo.extension/class/squotTonelSerializer.st b/src/SquotTonel-Tests.package/PackageInfo.extension/class/squotTonelSerializer.st new file mode 100644 index 000000000..7c4f52147 --- /dev/null +++ b/src/SquotTonel-Tests.package/PackageInfo.extension/class/squotTonelSerializer.st @@ -0,0 +1,4 @@ +*SquotTonel-Core-trackable +squotTonelSerializer + + ^ SquotTonelSerializer \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/PackageInfo.extension/methodProperties.json b/src/SquotTonel-Tests.package/PackageInfo.extension/methodProperties.json new file mode 100644 index 000000000..f90b78f65 --- /dev/null +++ b/src/SquotTonel-Tests.package/PackageInfo.extension/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + "squotTonelSerializer" : "jr 3/17/2019 00:37" }, + "instance" : { + } } diff --git a/src/SquotTonel-Tests.package/PackageInfo.extension/properties.json b/src/SquotTonel-Tests.package/PackageInfo.extension/properties.json new file mode 100644 index 000000000..7da79deb3 --- /dev/null +++ b/src/SquotTonel-Tests.package/PackageInfo.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "PackageInfo" } diff --git a/src/SquotTonel-Tests.package/SquotFileStoreArtifactGuessingTest.extension/instance/testFindTonelPackage.st b/src/SquotTonel-Tests.package/SquotFileStoreArtifactGuessingTest.extension/instance/testFindTonelPackage.st deleted file mode 100644 index f289cdb44..000000000 --- a/src/SquotTonel-Tests.package/SquotFileStoreArtifactGuessingTest.extension/instance/testFindTonelPackage.st +++ /dev/null @@ -1,12 +0,0 @@ -*SquotTonel-Tests-tests -testFindTonelPackage - | packageDir snapshot | - packageDir := fileStore directory / 'src' / 'Test'. - packageDir ensureDirectory. - (packageDir / 'package.st') ensureFile. - self assert: ((snapshot := fileStore captureLazySnapshot) - includesObjectAt: 'src/Test'); - assert: SquotTonelSerializer name - equals: ((snapshot artifactAt: 'src/Test') storeInfo serializer); - assert: ((snapshot artifactAt: 'src/Test') shadowOfTrackedObject respondsTo: #packageName) - description: 'not a SquotPackageShadow'. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotFileStoreArtifactGuessingTest.extension/methodProperties.json b/src/SquotTonel-Tests.package/SquotFileStoreArtifactGuessingTest.extension/methodProperties.json deleted file mode 100644 index 3580f0f6b..000000000 --- a/src/SquotTonel-Tests.package/SquotFileStoreArtifactGuessingTest.extension/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testFindTonelPackage" : "jr 4/7/2019 21:39" } } diff --git a/src/SquotTonel-Tests.package/SquotFileStoreArtifactGuessingTest.extension/properties.json b/src/SquotTonel-Tests.package/SquotFileStoreArtifactGuessingTest.extension/properties.json deleted file mode 100644 index dc673c211..000000000 --- a/src/SquotTonel-Tests.package/SquotFileStoreArtifactGuessingTest.extension/properties.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "name" : "SquotFileStoreArtifactGuessingTest" } diff --git a/src/SquotTonel-Tests.package/SquotFileSystemStore.extension/instance/isInsideCypressDirectory..st b/src/SquotTonel-Tests.package/SquotFileSystemStore.extension/instance/isInsideCypressDirectory..st new file mode 100644 index 000000000..94b63c6b9 --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotFileSystemStore.extension/instance/isInsideCypressDirectory..st @@ -0,0 +1,5 @@ +*SquotTonel-Core-guessing +isInsideCypressDirectory: aFile + " guess if we are inside a Cypress directory right now which happens to contain a package.st file " + + ^ (aFile resolve: '../..') name endsWith: '.package' diff --git a/src/SquotTonel-Tests.package/SquotFileSystemStore.extension/instance/tonelPackageLocator.st b/src/SquotTonel-Tests.package/SquotFileSystemStore.extension/instance/tonelPackageLocator.st new file mode 100644 index 000000000..3af6b7b4a --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotFileSystemStore.extension/instance/tonelPackageLocator.st @@ -0,0 +1,18 @@ +*SquotTonel-Core-guessing +tonelPackageLocator + + "Look for directories with package.st" + ^ SquotArtifactLocator new + detectBlock: [:fileOrDirectory :search :locator | + fileOrDirectory isDirectory + ifTrue: [(fileOrDirectory entries + anySatisfy: [:eachEntry | + eachEntry basename = 'package.st' and: + [eachEntry isFile and: [(self isInsideCypressDirectory: fileOrDirectory) not]]]) + ifTrue: [search addArtifact: + (self forgeLazyArtifactAt: fileOrDirectory + deserializerFactory: SquotTonelDeserializer + serializerFactory: SquotTonelSerializer + objectClass: PackageInfo)] + ifFalse: [search visitSubdirectories: fileOrDirectory with: locator]]]; + yourself \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotFileSystemStore.extension/methodProperties.json b/src/SquotTonel-Tests.package/SquotFileSystemStore.extension/methodProperties.json new file mode 100644 index 000000000..0f4e1c22c --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotFileSystemStore.extension/methodProperties.json @@ -0,0 +1,6 @@ +{ + "class" : { + }, + "instance" : { + "isInsideCypressDirectory:" : "tobe 1/6/2021 12:58", + "tonelPackageLocator" : "tobe 1/6/2021 12:58" } } diff --git a/src/SquotTonel-Tests.package/SquotFileSystemStore.extension/properties.json b/src/SquotTonel-Tests.package/SquotFileSystemStore.extension/properties.json new file mode 100644 index 000000000..053072453 --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotFileSystemStore.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "SquotFileSystemStore" } diff --git a/src/SquotTonel-Tests.package/SquotTonelAutotrackingTest.class/instance/trackPackage.st b/src/SquotTonel-Tests.package/SquotTonelAutotrackingTest.class/instance/trackPackage.st deleted file mode 100644 index 0408f8145..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelAutotrackingTest.class/instance/trackPackage.st +++ /dev/null @@ -1,4 +0,0 @@ -as yet unclassified -trackPackage - workingCopy addPackageNamed: package name at: 'src/', package name. - (workingCopy artifactAt: self packagePath) serializer: SquotTonelSerializer. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelAutotrackingTest.class/methodProperties.json b/src/SquotTonel-Tests.package/SquotTonelAutotrackingTest.class/methodProperties.json deleted file mode 100644 index 828f55f6f..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelAutotrackingTest.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "trackPackage" : "jr 1/26/2020 23:20" } } diff --git a/src/SquotTonel-Tests.package/SquotTonelAutotrackingTest.class/README.md b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/README.md similarity index 100% rename from src/SquotTonel-Tests.package/SquotTonelAutotrackingTest.class/README.md rename to src/SquotTonel-Tests.package/SquotTonelDeserializer.class/README.md diff --git a/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/class/canReadObjectSerializedBy..st b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/class/canReadObjectSerializedBy..st new file mode 100644 index 000000000..98029d77b --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/class/canReadObjectSerializedBy..st @@ -0,0 +1,3 @@ +Squot deserialization +canReadObjectSerializedBy: serializerName + ^ serializerName beginsWith: 'SquotTonelSerializer' "version?" \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/class/initialize.st b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/class/initialize.st new file mode 100644 index 000000000..ce381df76 --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/class/initialize.st @@ -0,0 +1,4 @@ +class initialization +initialize + "SquotTonelDeserializer initialize" + SquotFileSystemStore addDeserializerFactory: self. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/class/unload.st b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/class/unload.st new file mode 100644 index 000000000..a90349574 --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/class/unload.st @@ -0,0 +1,3 @@ +initialize-release +unload + SquotFileSystemStore removeDeserializerFactory: self. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/instance/fillContentOf.from..st b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/instance/fillContentOf.from..st new file mode 100644 index 000000000..1b527b445 --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/instance/fillContentOf.from..st @@ -0,0 +1,11 @@ +Squot deserialization +fillContentOf: anArtifact from: aDirectory + | packageName snapshot packageShadow reader | + packageName := aDirectory basename. + reader := TonelReader on: aDirectory parent fileName: packageName. + snapshot := reader snapshot. + packageShadow := SquotPackageShadow + forPackageNamed: packageName + withSnapshot: snapshot + tonelProperties: reader currentPackageProperties. + anArtifact content: (SquotShadowGraph withSingleShadow: packageShadow). \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/methodProperties.json b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/methodProperties.json new file mode 100644 index 000000000..b9fbb629d --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/methodProperties.json @@ -0,0 +1,7 @@ +{ + "class" : { + "canReadObjectSerializedBy:" : "jr 2/16/2019 18:04", + "initialize" : "jr 3/10/2019 22:18", + "unload" : "jr 8/9/2020 21:30" }, + "instance" : { + "fillContentOf:from:" : "jr 12/4/2020 23:38" } } diff --git a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/properties.json b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/properties.json similarity index 51% rename from src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/properties.json rename to src/SquotTonel-Tests.package/SquotTonelDeserializer.class/properties.json index d79345eb4..1c289bc21 100644 --- a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/properties.json +++ b/src/SquotTonel-Tests.package/SquotTonelDeserializer.class/properties.json @@ -1,14 +1,14 @@ { - "category" : "SquotTonel-Tests", + "category" : "SquotTonel-Core", "classinstvars" : [ ], "classvars" : [ ], "commentStamp" : "", "instvars" : [ - ], - "name" : "SquotTonelPackageLocatorTest", + "directory" ], + "name" : "SquotTonelDeserializer", "pools" : [ ], - "super" : "SquotArtifactLocatorTest", + "super" : "SquotDeserializer", "type" : "normal" } diff --git a/src/SquotTonel-Tests.package/SquotTonelDeserializerTest.class/instance/testCanReadFromTonelSerializer.st b/src/SquotTonel-Tests.package/SquotTonelDeserializerTest.class/instance/testCanReadFromTonelSerializer.st deleted file mode 100644 index 8ec04f910..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelDeserializerTest.class/instance/testCanReadFromTonelSerializer.st +++ /dev/null @@ -1,4 +0,0 @@ -tests -testCanReadFromTonelSerializer - self assert: - (SquotTonelDeserializer canReadObjectSerializedBy: SquotTonelSerializer new name). \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelDeserializerTest.class/methodProperties.json b/src/SquotTonel-Tests.package/SquotTonelDeserializerTest.class/methodProperties.json deleted file mode 100644 index 31d38b393..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelDeserializerTest.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testCanReadFromTonelSerializer" : "jr 2/16/2019 18:05" } } diff --git a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/package.st b/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/package.st deleted file mode 100644 index 15bb7f680..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/package.st +++ /dev/null @@ -1,3 +0,0 @@ -tests -package - ^ workingCopy artifacts detect: [:each | each isLoaded] \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/setUp.st b/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/setUp.st deleted file mode 100644 index e5f48be09..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/setUp.st +++ /dev/null @@ -1,12 +0,0 @@ -running -setUp - repository := SquotFileTestRepository new initializeInDirectory: FileSystem memory root. - workingCopy := - repository createWorkingCopy - store: SquotImageStore new; - yourself. - classFactory := ClassFactoryForTestCase new. - (SystemChangeNotifier uniqueInstance doSilently: [classFactory newClass]) - compileSilently: 'testMethod ^ 42'. - self suppressProgressDisplayDuring: - [workingCopy add: (PackageInfo named: classFactory packageName) at: 'src']. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/tearDown.st b/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/tearDown.st deleted file mode 100644 index 7a52eedf8..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/tearDown.st +++ /dev/null @@ -1,3 +0,0 @@ -running -tearDown - SystemChangeNotifier uniqueInstance doSilently: [classFactory cleanUp]. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/testCypressToTonel.st b/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/testCypressToTonel.st deleted file mode 100644 index 661ae3f74..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/testCypressToTonel.st +++ /dev/null @@ -1,24 +0,0 @@ -tests -testCypressToTonel - | originalPath newPath directoryDepth | - self package serializer: SquotCypressCodeSerializer. - originalPath := self package path. - directoryDepth := originalPath occurrencesOf: $/. - workingCopy saveVersionWithMessage: 'write as Cypress'. - self deny: ((workingCopy baseVersion snapshotDirectory / 'src') entries - includes: classFactory packageName) - description: 'Tonel directory exists'. - self package serializer: SquotTonelSerializer. - self assert: 1 equals: (workingCopy artifacts select: #isLoaded) size description: 'duplicate artifacts'. - newPath := self package path. - workingCopy saveVersionWithMessage: 'convert to Tonel'. - self deny: ((workingCopy baseVersion snapshotDirectory / 'src') entries - includes: classFactory packageName, '.package') - description: 'Cypress directory still exists'. - self deny: originalPath = newPath description: ['Package path should have changed']. - self assert: directoryDepth - equals: (newPath occurrencesOf: $/) - description: 'Profileration of subdirectories'. - self assert: 1 equals: directoryDepth description: 'Too many subdirectories'. - (workingCopy baseVersion snapshotDirectory / 'src' / '.properties') readStreamDo: - [:stream | self assert: (stream upToEnd includesSubstring: '#tonel')]. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/testTonelToCypress.st b/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/testTonelToCypress.st deleted file mode 100644 index 80dae8cc7..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/instance/testTonelToCypress.st +++ /dev/null @@ -1,24 +0,0 @@ -tests -testTonelToCypress - | originalPath newPath directoryDepth | - self package serializer: SquotTonelSerializer. - originalPath := self package path. - directoryDepth := originalPath occurrencesOf: $/. - workingCopy saveVersionWithMessage: 'write as Tonel'. - self deny: ((workingCopy baseVersion snapshotDirectory / 'src') entries - includes: classFactory packageName, '.package') - description: 'Cypress directory exists'. - self package serializer: SquotCypressCodeSerializer. - self assert: 1 equals: (workingCopy artifacts select: #isLoaded) size description: 'duplicate artifacts'. - newPath := self package path. - workingCopy saveVersionWithMessage: 'convert to Cypress'. - self deny: ((workingCopy baseVersion snapshotDirectory / 'src') entries - includes: classFactory packageName) - description: 'Tonel directory still exists'. - self deny: originalPath = newPath description: ['Package path should have changed']. - self assert: directoryDepth - equals: (newPath occurrencesOf: $/) - description: 'Profileration of subdirectories'. - self assert: 1 equals: directoryDepth description: 'Too many subdirectories'. - (workingCopy baseVersion snapshotDirectory / 'src' / '.properties') readStreamDo: - [:stream | self assert: (stream upToEnd includesSubstring: '#filetree')]. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/methodProperties.json b/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/methodProperties.json deleted file mode 100644 index 5e5a980f0..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/methodProperties.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "package" : "jr 10/12/2020 23:12", - "setUp" : "jr 9/13/2020 22:59", - "tearDown" : "jr 12/23/2019 17:11", - "testCypressToTonel" : "jr 10/12/2020 23:11", - "testTonelToCypress" : "jr 10/12/2020 23:11" } } diff --git a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/properties.json b/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/properties.json deleted file mode 100644 index 322aac58d..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/properties.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "category" : "SquotTonel-Tests", - "classinstvars" : [ - ], - "classtraitcomposition" : "TTestCaseSuppressingProgressDisplay classTrait", - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - "repository", - "workingCopy", - "classFactory" ], - "name" : "SquotTonelFileTreeConversionTest", - "pools" : [ - ], - "super" : "TestCase", - "traitcomposition" : "TTestCaseSuppressingProgressDisplay", - "type" : "normal" } diff --git a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/instance/testFindsMultiplePackages.st b/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/instance/testFindsMultiplePackages.st deleted file mode 100644 index 38836ef88..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/instance/testFindsMultiplePackages.st +++ /dev/null @@ -1,18 +0,0 @@ -tests -testFindsMultiplePackages - | artifactsFound | - "given" - #('X' 'Y') - do: [:each | (rootDirectory / each) ensureDirectory. - (rootDirectory / each / 'package.st') ensureFile ]. - "decoys" - (rootDirectory / 'WithoutPackageSt') ensureDirectory. - "when" - artifactsFound := SquotFileSearchForArtifacts new - visit: rootDirectory with: fileStore tonelPackageLocator; - runSearch; - artifactsFound. - "then" - self assert: (artifactsFound anySatisfy: [:each | each path = 'X']); - assert: (artifactsFound anySatisfy: [:each | each path = 'Y']); - assert: artifactsFound size = 2. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/instance/testFindsPackageInSubdirectory.st b/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/instance/testFindsPackageInSubdirectory.st deleted file mode 100644 index 5dfdab0bc..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/instance/testFindsPackageInSubdirectory.st +++ /dev/null @@ -1,10 +0,0 @@ -tests -testFindsPackageInSubdirectory - | artifactsFound | - (rootDirectory / 'src' / 'Xyz') ensureDirectory. - (rootDirectory / 'src' / 'Xyz' / 'package.st') ensureFile. - artifactsFound := SquotFileSearchForArtifacts new - visit: rootDirectory with: fileStore tonelPackageLocator; - runSearch; - artifactsFound. - self assert: (artifactsFound anySatisfy: [:each | each path = 'src/Xyz']). \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/instance/testFindsPackageUnderRoot.st b/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/instance/testFindsPackageUnderRoot.st deleted file mode 100644 index 517e31d5a..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/instance/testFindsPackageUnderRoot.st +++ /dev/null @@ -1,10 +0,0 @@ -tests -testFindsPackageUnderRoot - | artifactsFound | - (rootDirectory / 'Xyz') ensureDirectory. - (rootDirectory / 'Xyz' / 'package.st') ensureFile. - artifactsFound := SquotFileSearchForArtifacts new - visit: rootDirectory with: fileStore tonelPackageLocator; - runSearch; - artifactsFound. - self assert: (artifactsFound anySatisfy: [:each | each path = 'Xyz']). \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/instance/testIgnoresCypressPackagesWithMethodNamedPackage.st b/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/instance/testIgnoresCypressPackagesWithMethodNamedPackage.st deleted file mode 100644 index ef747a93a..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/instance/testIgnoresCypressPackagesWithMethodNamedPackage.st +++ /dev/null @@ -1,10 +0,0 @@ -tests -testIgnoresCypressPackagesWithMethodNamedPackage - | artifactsFound | - (rootDirectory / 'Xyz.package' / 'A.class' / 'instance') ensureDirectory. - (rootDirectory / 'Xyz.package' / 'A.class' / 'instance' / 'package.st') ensureFile. - artifactsFound := SquotFileSearchForArtifacts new - visit: rootDirectory with: fileStore tonelPackageLocator; - runSearch; - artifactsFound. - self assert: artifactsFound isEmpty. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/methodProperties.json b/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/methodProperties.json deleted file mode 100644 index 2b853c2f7..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/methodProperties.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testFindsMultiplePackages" : "jr 3/10/2019 21:29", - "testFindsPackageInSubdirectory" : "jr 3/10/2019 21:30", - "testFindsPackageUnderRoot" : "jr 3/10/2019 21:30", - "testIgnoresCypressPackagesWithMethodNamedPackage" : "jr 1/9/2021 15:09" } } diff --git a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/README.md b/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/README.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/artifactWithoutTimestamps..st b/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/artifactWithoutTimestamps..st deleted file mode 100644 index 81b2469ca..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/artifactWithoutTimestamps..st +++ /dev/null @@ -1,9 +0,0 @@ -test data -artifactWithoutTimestamps: anArtifact - | packageShadow | - packageShadow := anArtifact shadowOfTrackedObject. - ^ anArtifact copyWithDifferentContent: - (SquotShadowGraph withSingleShadow: - (packageShadow copy - snapshot: (self withoutTimestamps: packageShadow asMCSnapshot); - yourself)) \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/sampleArtifact.st b/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/sampleArtifact.st deleted file mode 100644 index 18d6ce781..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/sampleArtifact.st +++ /dev/null @@ -1,17 +0,0 @@ -test data -sampleArtifact - | sampleMethod definitions | - (sampleClass isNil or: [sampleClass isObsolete]) ifTrue: - [sampleClass := classFactory newClass. - sampleClass compile: 'a ^ #a' classified: 'constants' withStamp: 'jr 12/4/2020 20:39' notifying: nil. - sampleClass classComment: 'This is a test class' stamp: 'jr 12/4/2020 20:39']. - sampleMethod := sampleClass >> #a. - samplePackage := PackageInfo named: sampleClass category. - definitions := {sampleClass asClassDefinition. - sampleMethod methodReference asMethodDefinition. - MCOrganizationDefinition categories: (Array with: sampleClass category)}. - ^ (((MCSnapshot fromDefinitions: definitions) - asSquotArtifactForPackage: samplePackage) - path: (sampleArtifactPath := 'src/', samplePackage name); - initializeDefaultStoreInfoFor: samplePackage; - yourself) \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/sampleArtifactWithoutTimestamps.st b/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/sampleArtifactWithoutTimestamps.st deleted file mode 100644 index 8be174b82..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/sampleArtifactWithoutTimestamps.st +++ /dev/null @@ -1,9 +0,0 @@ -test data -sampleArtifactWithoutTimestamps - | artifact | - artifact := self sampleArtifact. - artifact shadowOfTrackedObject - setPackageName: samplePackage name - snapshot: (self withoutTimestamps: artifact shadowOfTrackedObject asMCSnapshot) - tonelProperties: Dictionary new. - ^ artifact \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/setUp.st b/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/setUp.st deleted file mode 100644 index cf80ebd5e..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/setUp.st +++ /dev/null @@ -1,8 +0,0 @@ -running -setUp - rootDirectory := FileSystem memory root. - serializer := SquotTonelSerializer writingBelow: rootDirectory. - deserializer := SquotTonelDeserializer new. - classFactory := ClassFactoryForTestCase new. - changesFile := TemporarySystemChangeFile new. - changesFile useTemporaryChangesFile. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/tearDown.st b/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/tearDown.st deleted file mode 100644 index 076920ec7..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/tearDown.st +++ /dev/null @@ -1,7 +0,0 @@ -running -tearDown - [classFactory cleanUp] - ensure: - [changesFile - useStandardChangesFile; - delete]. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/testWriteAndReadOfPackage.st b/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/testWriteAndReadOfPackage.st deleted file mode 100644 index b2c672576..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/testWriteAndReadOfPackage.st +++ /dev/null @@ -1,21 +0,0 @@ -tests -testWriteAndReadOfPackage - | classFile original readArtifact | - original := self sampleArtifact. - serializer write: original. - classFile := rootDirectory - resolve: 'src/', samplePackage name, '/', sampleClass name, '.class.st'. - self assert: classFile exists description: 'class source not found'. - readArtifact := original copyWithDifferentContent: nil. - classFactory cleanUp. - deserializer - fillContentOf: readArtifact - from: (rootDirectory resolve: sampleArtifactPath). - self assert: (readArtifact shadowOfTrackedObject isKindOf: SquotPackageShadow); - assert: samplePackage name - equals: readArtifact shadowOfTrackedObject packageName; - assert: (readArtifact shadowOfTrackedObject asMCSnapshot - patchRelativeToBase: - (self artifactWithoutTimestamps: original) shadowOfTrackedObject asMCSnapshot) - isEmpty; - deny: (readArtifact diffAgainst: (self artifactWithoutTimestamps: original)) hasChanges. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/testWriteAndReadOfPackageWithTimestamps.st b/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/testWriteAndReadOfPackageWithTimestamps.st deleted file mode 100644 index 7545add25..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/testWriteAndReadOfPackageWithTimestamps.st +++ /dev/null @@ -1,25 +0,0 @@ -tests -testWriteAndReadOfPackageWithTimestamps - | original shadow readArtifact | - original := self sampleArtifact. - classFactory cleanUp. - original := original copyWithDifferentContent: - (SquotShadowGraph withSingleShadow: - ((shadow := original shadowOfTrackedObject) copy - setPackageName: shadow packageName snapshot: shadow asMCSnapshot tonelProperties: (shadow tonelProperties at: TonelWriter squeakChangestamp put: true; yourself))). - "Full roundtrip: write-read-write-read." - serializer write: original. - readArtifact := original copyWithDifferentContent: nil. - deserializer - fillContentOf: readArtifact - from: (rootDirectory resolve: sampleArtifactPath). - serializer write: readArtifact. - readArtifact content: nil. - deserializer - fillContentOf: readArtifact - from: (rootDirectory resolve: sampleArtifactPath). - self assert: (readArtifact shadowOfTrackedObject asMCSnapshot - patchRelativeToBase: - original shadowOfTrackedObject asMCSnapshot) - isEmpty; - deny: (readArtifact diffAgainst: original) hasChanges. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/withoutTimestamps..st b/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/withoutTimestamps..st deleted file mode 100644 index 03aa61c7a..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/instance/withoutTimestamps..st +++ /dev/null @@ -1,13 +0,0 @@ -tests -withoutTimestamps: aMCSnapshot - ^ MCSnapshot fromDefinitions: - (aMCSnapshot definitions collect: - [:each | each isMethodDefinition - ifTrue: [MCMethodDefinition - className: each className - classIsMeta: each classIsMeta - selector: each selector - category: each category - timeStamp: nil - source: each source] - ifFalse: [each]]) \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/methodProperties.json b/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/methodProperties.json deleted file mode 100644 index d566a7c93..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/methodProperties.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "artifactWithoutTimestamps:" : "jr 12/4/2020 22:26", - "sampleArtifact" : "jr 12/6/2020 19:49", - "sampleArtifactWithoutTimestamps" : "jr 12/4/2020 20:23", - "setUp" : "jr 12/4/2020 22:58", - "tearDown" : "jr 12/4/2020 23:49", - "testWriteAndReadOfPackage" : "jr 12/4/2020 22:24", - "testWriteAndReadOfPackageWithTimestamps" : "jr 12/4/2020 23:19", - "withoutTimestamps:" : "jr 2/16/2019 18:36" } } diff --git a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/properties.json b/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/properties.json deleted file mode 100644 index 533c55e0b..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelReadWriteTest.class/properties.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "category" : "SquotTonel-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "jr 12/4/2020 20:42", - "instvars" : [ - "rootDirectory", - "serializer", - "sampleClass", - "samplePackage", - "sampleArtifactPath", - "deserializer", - "classFactory", - "changesFile" ], - "name" : "SquotTonelReadWriteTest", - "pools" : [ - ], - "super" : "TestCase", - "type" : "normal" } diff --git a/src/SquotTonel-Tests.package/SquotTonelDeserializerTest.class/README.md b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/README.md similarity index 100% rename from src/SquotTonel-Tests.package/SquotTonelDeserializerTest.class/README.md rename to src/SquotTonel-Tests.package/SquotTonelSerializer.class/README.md diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializer.class/class/rewritePath.for..st b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/class/rewritePath.for..st new file mode 100644 index 000000000..0550e1536 --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/class/rewritePath.for..st @@ -0,0 +1,12 @@ +path rewriting +rewritePath: path for: anObjectGraph + "Append package directory if necessary." + | elements packageName | + elements := path squotPathSegments. + packageName := anObjectGraph startShadow packageName. + elements ifEmpty: [^ packageName]. + (elements last = packageName) ifTrue: [^ path]. + (elements last beginsWith: packageName) + ifTrue: [^ elements allButLast, {packageName} + joinSeparatedBy: SquotPath delimiter asString] + ifFalse: [^ path, SquotPath delimiter, packageName] \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializer.class/class/userFriendlyTitle.st b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/class/userFriendlyTitle.st new file mode 100644 index 000000000..eb54cef58 --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/class/userFriendlyTitle.st @@ -0,0 +1,3 @@ +user interface +userFriendlyTitle + ^ 'Tonel format' \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/propertiesFileContents.st b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/propertiesFileContents.st new file mode 100644 index 000000000..0e3d2207a --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/propertiesFileContents.st @@ -0,0 +1,7 @@ +serializing +propertiesFileContents + "To mimic IceBerg repositories." + ^ '{ + #format : #tonel +} +' \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/version.st b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/version.st new file mode 100644 index 000000000..27cb7b3ab --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/version.st @@ -0,0 +1,3 @@ +Squot serialization +version + ^ '1' \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/write..st b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/write..st new file mode 100644 index 000000000..fd2fd6cd6 --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/write..st @@ -0,0 +1,8 @@ +Squot serialization +write: anArtifact + self assert: anArtifact storeInfo objectClassName = 'PackageInfo'. + directory := rootDirectory resolve: anArtifact path. + anArtifact shadowOfTrackedObject squotWrite: anArtifact asTonelWith: self. + (directory parent / '.properties') writeStreamDo: + [:stream | + stream truncate; nextPutAll: self propertiesFileContents]. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/writeMCSnapshot.forPackageNamed.from..st b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/writeMCSnapshot.forPackageNamed.from..st new file mode 100644 index 000000000..12b06d73d --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/writeMCSnapshot.forPackageNamed.from..st @@ -0,0 +1,5 @@ +serializing +writeMCSnapshot: aMonticelloSnapshot forPackageNamed: aString from: anArtifact + (TonelWriterForFileSystem on: directory parent "the writer creates the package directory") + packageName: aString; + writeSnapshot: aMonticelloSnapshot. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/writeMCSnapshot.forPackageNamed.packageProperties.from..st b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/writeMCSnapshot.forPackageNamed.packageProperties.from..st new file mode 100644 index 000000000..82c8135d7 --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/instance/writeMCSnapshot.forPackageNamed.packageProperties.from..st @@ -0,0 +1,9 @@ +serializing +writeMCSnapshot: aMonticelloSnapshot forPackageNamed: aString packageProperties: aDictionary from: anArtifact + directory ensureDirectory / 'package.st' writeStreamDo: + [:file | "Write package properties in advance, to the TonelWriter will pick up some settings." + file nextPutAll: 'Package '. + STON put: aDictionary onStream: file. + file cr. + self flag: #duplication. "TonelWriter>>writePackage:"]. + self writeMCSnapshot: aMonticelloSnapshot forPackageNamed: aString from: anArtifact. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializer.class/methodProperties.json b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/methodProperties.json new file mode 100644 index 000000000..775245e57 --- /dev/null +++ b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/methodProperties.json @@ -0,0 +1,10 @@ +{ + "class" : { + "rewritePath:for:" : "jr 3/17/2019 00:15", + "userFriendlyTitle" : "jr 3/16/2019 15:52" }, + "instance" : { + "propertiesFileContents" : "jr 9/3/2020 22:47", + "version" : "jr 2/16/2019 16:30", + "write:" : "jr 12/4/2020 20:25", + "writeMCSnapshot:forPackageNamed:from:" : "jr 3/16/2019 23:35", + "writeMCSnapshot:forPackageNamed:packageProperties:from:" : "jr 12/4/2020 20:28" } } diff --git a/src/SquotTonel-Tests.package/SquotTonelAutotrackingTest.class/properties.json b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/properties.json similarity index 51% rename from src/SquotTonel-Tests.package/SquotTonelAutotrackingTest.class/properties.json rename to src/SquotTonel-Tests.package/SquotTonelSerializer.class/properties.json index 623394f82..2684c19d4 100644 --- a/src/SquotTonel-Tests.package/SquotTonelAutotrackingTest.class/properties.json +++ b/src/SquotTonel-Tests.package/SquotTonelSerializer.class/properties.json @@ -1,14 +1,14 @@ { - "category" : "SquotTonel-Tests", + "category" : "SquotTonel-Core", "classinstvars" : [ ], "classvars" : [ ], "commentStamp" : "", "instvars" : [ - ], - "name" : "SquotTonelAutotrackingTest", + "directory" ], + "name" : "SquotTonelSerializer", "pools" : [ ], - "super" : "SquotPackageAutotrackingTest", + "super" : "SquotSerializer", "type" : "normal" } diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/README.md b/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/README.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testRewriteCypressPath.st b/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testRewriteCypressPath.st deleted file mode 100644 index 0efd5f10e..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testRewriteCypressPath.st +++ /dev/null @@ -1,8 +0,0 @@ -tests -testRewriteCypressPath - | path serializerClass | - serializerClass := SquotTonelSerializer. - path := serializerClass rewritePath: 'src/test/Test.package' for: - (SquotShadowGraph withSingleShadow: - (PackageInfo new squotShadowFactory forPackageNamed: 'Test' withSnapshot: nil)). - self assert: 'src/test/Test' equals: path. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testRewriteEmptyPathAddsPackageDirectory.st b/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testRewriteEmptyPathAddsPackageDirectory.st deleted file mode 100644 index c68088bae..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testRewriteEmptyPathAddsPackageDirectory.st +++ /dev/null @@ -1,8 +0,0 @@ -tests -testRewriteEmptyPathAddsPackageDirectory - | path serializerClass | - serializerClass := SquotTonelSerializer. - path := serializerClass rewritePath: '' for: - (SquotShadowGraph withSingleShadow: - (PackageInfo new squotShadowFactory forPackageNamed: 'Test' withSnapshot: nil)). - self assert: 'Test' equals: path. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testRewritePathAddsPackageDirectory.st b/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testRewritePathAddsPackageDirectory.st deleted file mode 100644 index 26c9603b1..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testRewritePathAddsPackageDirectory.st +++ /dev/null @@ -1,8 +0,0 @@ -tests -testRewritePathAddsPackageDirectory - | path serializerClass | - serializerClass := SquotTonelSerializer. - path := serializerClass rewritePath: 'src/tests' for: - (SquotShadowGraph withSingleShadow: - (PackageInfo new squotShadowFactory forPackageNamed: 'Test' withSnapshot: nil)). - self assert: 'src/tests/Test' equals: path. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testRewritePathWithPackageAlreadyIncluded.st b/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testRewritePathWithPackageAlreadyIncluded.st deleted file mode 100644 index 0593214c4..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testRewritePathWithPackageAlreadyIncluded.st +++ /dev/null @@ -1,8 +0,0 @@ -tests -testRewritePathWithPackageAlreadyIncluded - | path serializerClass | - serializerClass := SquotTonelSerializer. - path := serializerClass rewritePath: 'src/test/Test' for: - (SquotShadowGraph withSingleShadow: - (PackageInfo new squotShadowFactory forPackageNamed: 'Test' withSnapshot: nil)). - self assert: 'src/test/Test' equals: path. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testWritesPropertiesFile.st b/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testWritesPropertiesFile.st deleted file mode 100644 index 5a9581778..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/instance/testWritesPropertiesFile.st +++ /dev/null @@ -1,12 +0,0 @@ -tests -testWritesPropertiesFile - | directory serializer artifact | - directory := FileSystem memory root. - serializer := SquotTonelSerializer writingBelow: directory. - artifact := (MCSnapshot fromDefinitions: {MCOrganizationDefinition categories: #('Empty')}) - asSquotArtifactForPackage: (PackageInfo new packageName: 'Empty'). - serializer write: artifact. - self assert: (directory / '.properties') exists. - directory / '.properties' readStreamDo: - [:stream | - (STON fromStream: stream) = (Dictionary new at: #format put: #tonel; yourself)]. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/methodProperties.json b/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/methodProperties.json deleted file mode 100644 index 257b46f75..000000000 --- a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/methodProperties.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "testRewriteCypressPath" : "jr 3/17/2019 00:09", - "testRewriteEmptyPathAddsPackageDirectory" : "jr 3/12/2019 22:09", - "testRewritePathAddsPackageDirectory" : "jr 3/12/2019 22:09", - "testRewritePathWithPackageAlreadyIncluded" : "jr 3/12/2019 22:09", - "testWritesPropertiesFile" : "jr 9/3/2020 22:10" } } diff --git a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/README.md b/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/README.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/delete.st b/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/delete.st deleted file mode 100644 index 010afc6ba..000000000 --- a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/delete.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -delete - tempChangesFile ifNotNil: - [self directory deleteFileNamed: tempChangesFile localName]. \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/directory.st b/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/directory.st deleted file mode 100644 index d71df2eaf..000000000 --- a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/directory.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -directory - "Where we want to place the temporary changes file" - ^FileDirectory default \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/genericChangesName.st b/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/genericChangesName.st deleted file mode 100644 index 04faa7449..000000000 --- a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/genericChangesName.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -genericChangesName - ^self prefixChangesName, self randomString, '.changes' \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/prefixChangesName.st b/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/prefixChangesName.st deleted file mode 100644 index b76f9db2a..000000000 --- a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/prefixChangesName.st +++ /dev/null @@ -1,3 +0,0 @@ -private -prefixChangesName - ^self prefixGeneral \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/prefixGeneral.st b/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/prefixGeneral.st deleted file mode 100644 index 0a6a2b547..000000000 --- a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/prefixGeneral.st +++ /dev/null @@ -1,3 +0,0 @@ -private -prefixGeneral - ^self class name select: [:each | each isUppercase] \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/randomString.st b/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/randomString.st deleted file mode 100644 index 2068ac5ca..000000000 --- a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/randomString.st +++ /dev/null @@ -1,3 +0,0 @@ -private -randomString - ^Character alphabet shuffled \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/tempChangesName.st b/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/tempChangesName.st deleted file mode 100644 index b47e4792c..000000000 --- a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/tempChangesName.st +++ /dev/null @@ -1,3 +0,0 @@ -private -tempChangesName - ^tempChangesName ifNil: [tempChangesName := self genericChangesName] \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/useStandardChangesFile.st b/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/useStandardChangesFile.st deleted file mode 100644 index aa705dc38..000000000 --- a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/useStandardChangesFile.st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -useStandardChangesFile - Smalltalk - closeSourceFiles; - openSourceFiles \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/useTemporaryChangesFile.st b/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/useTemporaryChangesFile.st deleted file mode 100644 index 1365cd448..000000000 --- a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/instance/useTemporaryChangesFile.st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -useTemporaryChangesFile - Smalltalk closeSourceFiles. - tempChangesFile := self directory forceNewFileNamed: self tempChangesName. - SourceFiles at: 2 put: tempChangesFile \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/methodProperties.json b/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/methodProperties.json deleted file mode 100644 index b13095e8c..000000000 --- a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/methodProperties.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "delete" : "jr 12/4/2020 23:54", - "directory" : "laza 9/28/2011 07:22", - "genericChangesName" : "laza 11/21/2011 15:43", - "prefixChangesName" : "laza 11/21/2011 15:43", - "prefixGeneral" : "laza 11/2/2011 12:30", - "randomString" : "laza 11/1/2011 18:58", - "tempChangesName" : "laza 11/21/2011 15:44", - "useStandardChangesFile" : "laza 11/1/2011 21:26", - "useTemporaryChangesFile" : "laza 11/2/2011 10:17" } } diff --git a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/properties.json b/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/properties.json deleted file mode 100644 index 92601df2f..000000000 --- a/src/SquotTonel-Tests.package/TemporarySystemChangeFile.class/properties.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "category" : "SquotTonel-Tests", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "", - "instvars" : [ - "tempChangesFile", - "tempChangesName" ], - "name" : "TemporarySystemChangeFile", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } diff --git a/src/SquotTonel-Tests.package/TonelReader.extension/instance/currentPackageProperties.st b/src/SquotTonel-Tests.package/TonelReader.extension/instance/currentPackageProperties.st new file mode 100644 index 000000000..24488faaa --- /dev/null +++ b/src/SquotTonel-Tests.package/TonelReader.extension/instance/currentPackageProperties.st @@ -0,0 +1,9 @@ +*SquotTonel-Core +currentPackageProperties + ^ (self packageDirectory notNil and: [self fileUtils filePathExists: 'package.st' relativeTo: self packageDirectory]) + ifTrue: [ + (self packageDirectory / 'package.st') readStreamDo: [:stream | + ((stream upTo: Character space) = 'Package') + ifTrue: [STON fromStream: stream] + ifFalse: [Dictionary new]]] + ifFalse: [Dictionary new] \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/TonelReader.extension/methodProperties.json b/src/SquotTonel-Tests.package/TonelReader.extension/methodProperties.json new file mode 100644 index 000000000..b2836d9a7 --- /dev/null +++ b/src/SquotTonel-Tests.package/TonelReader.extension/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + }, + "instance" : { + "currentPackageProperties" : "jr 12/5/2020 00:18" } } diff --git a/src/SquotTonel-Tests.package/TonelReader.extension/properties.json b/src/SquotTonel-Tests.package/TonelReader.extension/properties.json new file mode 100644 index 000000000..5b633f5ab --- /dev/null +++ b/src/SquotTonel-Tests.package/TonelReader.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "TonelReader" } diff --git a/src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/README.md b/src/SquotTonel-Tests.package/TonelReaderForFileSystem.class/README.md similarity index 100% rename from src/SquotTonel-Tests.package/SquotTonelFileTreeConversionTest.class/README.md rename to src/SquotTonel-Tests.package/TonelReaderForFileSystem.class/README.md diff --git a/src/SquotTonel-Tests.package/TonelReaderForFileSystem.class/instance/fileUtils.st b/src/SquotTonel-Tests.package/TonelReaderForFileSystem.class/instance/fileUtils.st new file mode 100644 index 000000000..b8c10ba1a --- /dev/null +++ b/src/SquotTonel-Tests.package/TonelReaderForFileSystem.class/instance/fileUtils.st @@ -0,0 +1,3 @@ +accessing +fileUtils + ^ TonelFileSystemUtils \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/TonelReaderForFileSystem.class/methodProperties.json b/src/SquotTonel-Tests.package/TonelReaderForFileSystem.class/methodProperties.json new file mode 100644 index 000000000..7f70b98c0 --- /dev/null +++ b/src/SquotTonel-Tests.package/TonelReaderForFileSystem.class/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + }, + "instance" : { + "fileUtils" : "jr 2/16/2019 17:24" } } diff --git a/src/SquotTonel-Tests.package/SquotTonelDeserializerTest.class/properties.json b/src/SquotTonel-Tests.package/TonelReaderForFileSystem.class/properties.json similarity index 58% rename from src/SquotTonel-Tests.package/SquotTonelDeserializerTest.class/properties.json rename to src/SquotTonel-Tests.package/TonelReaderForFileSystem.class/properties.json index 759bc3994..7762e3050 100644 --- a/src/SquotTonel-Tests.package/SquotTonelDeserializerTest.class/properties.json +++ b/src/SquotTonel-Tests.package/TonelReaderForFileSystem.class/properties.json @@ -1,5 +1,5 @@ { - "category" : "SquotTonel-Tests", + "category" : "SquotTonel-Core", "classinstvars" : [ ], "classvars" : [ @@ -7,8 +7,8 @@ "commentStamp" : "", "instvars" : [ ], - "name" : "SquotTonelDeserializerTest", + "name" : "TonelReaderForFileSystem", "pools" : [ ], - "super" : "TestCase", + "super" : "TonelReader", "type" : "normal" } diff --git a/src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/README.md b/src/SquotTonel-Tests.package/TonelWriterForFileSystem.class/README.md similarity index 100% rename from src/SquotTonel-Tests.package/SquotTonelPackageLocatorTest.class/README.md rename to src/SquotTonel-Tests.package/TonelWriterForFileSystem.class/README.md diff --git a/src/SquotTonel-Tests.package/TonelWriterForFileSystem.class/instance/fileUtils.st b/src/SquotTonel-Tests.package/TonelWriterForFileSystem.class/instance/fileUtils.st new file mode 100644 index 000000000..b8c10ba1a --- /dev/null +++ b/src/SquotTonel-Tests.package/TonelWriterForFileSystem.class/instance/fileUtils.st @@ -0,0 +1,3 @@ +accessing +fileUtils + ^ TonelFileSystemUtils \ No newline at end of file diff --git a/src/SquotTonel-Tests.package/TonelWriterForFileSystem.class/methodProperties.json b/src/SquotTonel-Tests.package/TonelWriterForFileSystem.class/methodProperties.json new file mode 100644 index 000000000..f24c85347 --- /dev/null +++ b/src/SquotTonel-Tests.package/TonelWriterForFileSystem.class/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + }, + "instance" : { + "fileUtils" : "jr 2/16/2019 17:23" } } diff --git a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/properties.json b/src/SquotTonel-Tests.package/TonelWriterForFileSystem.class/properties.json similarity index 58% rename from src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/properties.json rename to src/SquotTonel-Tests.package/TonelWriterForFileSystem.class/properties.json index 76dc99396..1319a8cb5 100644 --- a/src/SquotTonel-Tests.package/SquotTonelSerializerTest.class/properties.json +++ b/src/SquotTonel-Tests.package/TonelWriterForFileSystem.class/properties.json @@ -1,5 +1,5 @@ { - "category" : "SquotTonel-Tests", + "category" : "SquotTonel-Core", "classinstvars" : [ ], "classvars" : [ @@ -7,8 +7,8 @@ "commentStamp" : "", "instvars" : [ ], - "name" : "SquotTonelSerializerTest", + "name" : "TonelWriterForFileSystem", "pools" : [ ], - "super" : "TestCase", + "super" : "TonelWriter", "type" : "normal" } diff --git a/src/SquotTonel-Tests.package/monticello.meta/categories.st b/src/SquotTonel-Tests.package/monticello.meta/categories.st index dc7876dd3..81c3d9808 100644 --- a/src/SquotTonel-Tests.package/monticello.meta/categories.st +++ b/src/SquotTonel-Tests.package/monticello.meta/categories.st @@ -1 +1 @@ -SystemOrganization addCategory: #'SquotTonel-Tests'! +SystemOrganization addCategory: #'SquotTonel-Core'!