Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added 'git push --force' in expert mode (#527)
- Add remote repository to settings page (#448)
- Added environment awareness in configuration, and showing of environment name in UI (#124)
- Warning on sync page if other users have unstaged changes (#493)

### Fixed
- Fixed display of other users' username in workspace view on Unix (#530)
Expand Down
12 changes: 9 additions & 3 deletions csp/sync.csp
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,18 @@
<h1 class="text-center">Sync Repository</h1>
<div class="row">
<div class="offset-sm-2 col-sm-8">
<server>
if ##class(SourceControl.Git.Utils).InDefaultBranchBasicMode() {
<server>
set defaultBasic = ##class(SourceControl.Git.Utils).InDefaultBranchBasicMode()
if defaultBasic || ##class(SourceControl.Git.Change).GetOtherDeveloperChanges().%Size() > 0 {
if defaultBasic {
set message = "Please change branches to make sure your changes are committed."
} else {
set message = "Other users have unstaged changes in this namespace, so merging to remote will fail"
}
&html<
<div class = "alert">
<span class="closebtn" onclick="this.parentElement.style.display='none';">&times;</span>
<strong>Warning!</strong> Please change branches to make sure your changes are committed.
<strong>Warning!</strong> #(message)#
</div>
>
}
Expand Down
Loading