Skip to content

Commit 708ce31

Browse files
authored
Merge pull request #559 from intersystems/issue-493
Add alert when other users have unstaged changes
2 parents c34322c + f0cab1b commit 708ce31

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Added change context option to pull page (#468)
1414
- Added favorite namespaces setting for a user (#468, #510)
1515
- Added environment awareness in configuration, and showing of environment name in UI (#124)
16+
- Warning on sync page if other users have unstaged changes (#493)
1617
- Added "Export System Default Settings" menu item (#544)
1718

1819
### Fixed

csp/sync.csp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,18 @@
117117
<h1 class="text-center">Sync Repository</h1>
118118
<div class="row">
119119
<div class="offset-sm-2 col-sm-8">
120-
<server>
121-
if ##class(SourceControl.Git.Utils).InDefaultBranchBasicMode() {
120+
<server>
121+
set defaultBasic = ##class(SourceControl.Git.Utils).InDefaultBranchBasicMode()
122+
if defaultBasic || ##class(SourceControl.Git.Change).GetOtherDeveloperChanges().%Size() > 0 {
123+
if defaultBasic {
124+
set message = "Please change branches to make sure your changes are committed."
125+
} else {
126+
set message = "Other users have work in progress in this namespace. They must commit their work before you can sync, or you can commit their work after review in the Git WebUI before trying to sync again."
127+
}
122128
&html<
123129
<div class = "alert">
124130
<span class="closebtn" onclick="this.parentElement.style.display='none';">&times;</span>
125-
<strong>Warning!</strong> Please change branches to make sure your changes are committed.
131+
<strong>Warning!</strong> #(message)#
126132
</div>
127133
>
128134
}

0 commit comments

Comments
 (0)