File tree Expand file tree Collapse file tree 2 files changed +27
-9
lines changed
Expand file tree Collapse file tree 2 files changed +27
-9
lines changed Original file line number Diff line number Diff line change 256256 },
257257 "svn.multipleFolders.ignore" : {
258258 "type" : " array" ,
259- "minimum" : 4 ,
260259 "description" : " Folders to ignore using SVN" ,
261260 "default" : [" **/.git" , " **/.hg" , " **/vendor" , " **/node_modules" ]
262261 },
262+ "svn.sourceControl.ignoreOnCommit" : {
263+ "type" : " array" ,
264+ "description" : " Changelists to ignore on commit" ,
265+ "default" : [" ignore-on-commit" ]
266+ },
263267 "svn.sourceControl.showExternal" : {
264268 "type" : " boolean" ,
265269 "description" :
Original file line number Diff line number Diff line change @@ -177,8 +177,17 @@ export class SvnCommands {
177177 picks . push ( new ChangeListItem ( repository . changes ) ) ;
178178 }
179179
180+ const svnConfig = workspace . getConfiguration ( "svn" , Uri . file ( repository . workspaceRoot ) ) ;
181+ const ignoreOnCommitList = svnConfig . get < string [ ] > (
182+ "sourceControl.ignoreOnCommit" ,
183+ [ ]
184+ ) ;
185+
180186 repository . changelists . forEach ( ( group , changelist ) => {
181- if ( group . resourceStates . length ) {
187+ if (
188+ group . resourceStates . length &&
189+ ! ignoreOnCommitList . includes ( changelist )
190+ ) {
182191 picks . push ( new ChangeListItem ( group ) ) ;
183192 }
184193 } ) ;
@@ -188,13 +197,18 @@ export class SvnCommands {
188197 return ;
189198 }
190199
191- let choice = picks [ 0 ] ;
192- if ( picks . length > 1 ) {
193- const selectedChoice = await window . showQuickPick ( picks , { } ) ;
194- if ( ! selectedChoice ) {
195- return ;
196- }
197- choice = selectedChoice ;
200+ let choice ;
201+ // If has only changes, not prompt to select changelist
202+ if ( picks . length === 1 && repository . changes . resourceStates . length ) {
203+ choice = picks [ 0 ] ;
204+ } else {
205+ choice = await window . showQuickPick ( picks , {
206+ placeHolder : "Select a changelist to commit"
207+ } ) ;
208+ }
209+
210+ if ( ! choice ) {
211+ return ;
198212 }
199213
200214 const filePaths = choice . resourceGroup . resourceStates . map ( state => {
You can’t perform that action at this time.
0 commit comments