-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add menu items for (un)setting the upstream branch
- Loading branch information
Showing
10 changed files
with
37 additions
and
9 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
src/Squot.package/SqueakWorkingCopy.class/instance/requestAndRememberRemoteNameAndRefFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
upstream | ||
requestAndRememberRemoteNameAndRefFor: aString | ||
| remoteNameAndRef | | ||
remoteNameAndRef := self requestRemoteNameAndRefFor: aString. | ||
(UIManager default confirm: 'Remember the remote branch for this branch?') | ||
ifTrue: [self setUpstreamRemoteNameAndRef: remoteNameAndRef for: aString]. | ||
^ remoteNameAndRef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/Squot.package/SqueakWorkingCopy.class/instance/setUpstreamRemoteNameAndRefFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
upstream | ||
setUpstreamRemoteNameAndRefFor: aString | ||
self | ||
setUpstreamRemoteNameAndRef: | ||
((self requestRemoteNameAndRefFor: aString) ifNil: [^ self]) | ||
for: aString. |
2 changes: 1 addition & 1 deletion
2
src/Squot.package/SqueakWorkingCopy.class/instance/upstreamRemoteNameAndRefFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
upstream | ||
upstreamRemoteNameAndRefFor: aString | ||
(self isSqueakBranchRef: aString) ifTrue: [^ self upstreamRemoteNameAndRefForBranch: aString]. | ||
^ self requestRemoteNameAndRefFor: aString | ||
^ self requestAndRememberRemoteNameAndRefFor: aString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/Squot.package/SquotBrowser.class/instance/actionSetUpstreamOfActiveBranch.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
actions | ||
actionSetUpstreamOfActiveBranch | ||
self activeRef ifNil: [^ self inform: 'Please select a branch first.']. | ||
self activeWorkingCopy setUpstreamRemoteNameAndRefFor: self activeRef. |
4 changes: 4 additions & 0 deletions
4
src/Squot.package/SquotBrowser.class/instance/actionUnsetUpstreamOfActiveBranch.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
actions | ||
actionUnsetUpstreamOfActiveBranch | ||
self activeRef ifNil: [^ self inform: 'Please select a branch first.']. | ||
self unitOfWork unsetUpstreamOfBranchNamed: self activeRef. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters