-
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.
Push current branch instead of active ref
- Loading branch information
Showing
5 changed files
with
25 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
actions | ||
actionPush: refString | ||
self activeWorkingCopyIfNilInformAnd: [^ self]. | ||
(self activeWorkingCopy isSqueakBranchRef: refString) ifFalse: [ | ||
(UIManager default confirm: | ||
('The active ref ''{1}'' is not a branch. Push anyway?' | ||
format: {refString})) | ||
ifFalse: [^ self]]. | ||
self activeWorkingCopy pushRef: refString. |
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,10 +1,4 @@ | ||
actions | ||
actionPush | ||
self activeWorkingCopyIfNilInformAnd: [^ self]. | ||
self activeRef ifNil: [^ self inform: 'Select a ref first.']. | ||
(self activeWorkingCopy isSqueakBranchRef: self activeRef) ifFalse: [ | ||
(UIManager default confirm: | ||
('The active ref ''{1}'' is not a branch. Push anyway?' | ||
format: {self activeRef})) | ||
ifFalse: [^ self]]. | ||
self activeWorkingCopy pushRef: self activeRef. | ||
self actionPush: (self currentBranchIfNilInformAnd: [^ self]). |
9 changes: 9 additions & 0 deletions
9
src/Squot.package/SquotBrowser.class/instance/currentBranchIfNilInformAnd..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,9 @@ | ||
accessing | ||
currentBranchIfNilInformAnd: aBlock | ||
| branch headRef | | ||
headRef := self activeWorkingCopy headRef. | ||
(headRef isSymbolic and: [ | ||
branch := headRef targetRef. | ||
self activeWorkingCopy isSqueakBranchRef: branch]) | ||
ifFalse: [self inform: 'Please switch to a branch first.'. ^ aBlock value]. | ||
^ branch |
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