Skip to content

Commit 7021a79

Browse files
committed
Add warning in sync
1 parent c62aac2 commit 7021a79

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- Added 'git push --force' in expert mode (#527)
1212
- Add remote repository to settings page (#448)
1313
- Added environment awareness in configuration, and showing of environment name in UI (#124)
14+
- Warning on sync page if other users have unstaged changes (#493)
1415

1516
### Fixed
1617
- Fixed display of other users' username in workspace view on Unix (#530)

csp/sync.csp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,14 @@
110110
<div class="row">
111111
<div class="offset-sm-2 col-sm-8">
112112
<server>
113-
if ##class(SourceControl.Git.Utils).InDefaultBranchBasicMode() {
113+
if ##class(SourceControl.Git.Utils).InDefaultBranchBasicMode() || ##class(SourceControl.Git.Change).GetOtherDeveloperChanges().%Size() > 0 {
114+
set message = $case(##class(SourceControl.Git.Utils).InDefaultBranchBasicMode(),
115+
1:"Please change branches to make sure your changes are committed.",
116+
:"Other users have unstaged changes in this namespace, so merging to remote will fail")
114117
&html<
115118
<div class = "alert">
116119
<span class="closebtn" onclick="this.parentElement.style.display='none';">&times;</span>
117-
<strong>Warning!</strong> Please change branches to make sure your changes are committed.
120+
<strong>Warning!</strong> #(message)#
118121
</div>
119122
>
120123
}

0 commit comments

Comments
 (0)