Skip to content

Commit ad565be

Browse files
authored
Merge pull request #345 from edgardmessias/fix_280
fix: Fixed badge status count for changelists (Close #280)
2 parents 7bdfc7f + b179759 commit ad565be

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Example:
8989
|`svn.decorations.enabled`|Controls if SVN contributes colors and badges to the explorer and the open (VSCode \>= 1.18 with proposed-api)|`true`|
9090
|`svn.path`|Path to the svn executable|`null`|
9191
|`svn.ignoreMissingSvnWarning`|Ignores the warning when SVN is missing|`false`|
92+
|`svn.ignoreWorkingCopyIsTooOld`|Ignores the warning when working copy is too old|`false`|
9293
|`svn.diff.withHead`|Show diff changes using latest revision in the repository. Set false to use latest revision in local folder|`true`|
9394
|`svn.layout.trunkRegex`|Regex to detect path for 'trunk' in SVN URL, 'null' to disable. (Ex.: '(trunk)', '(main)')|`"(trunk)(/.*)?"`|
9495
|`svn.layout.trunkRegexName`|Regex group position for name of trunk|`1`|
@@ -101,15 +102,15 @@ Example:
101102
|`svn.multipleFolders.depth`|Maximum depth to find subfolders using SVN|`4`|
102103
|`svn.multipleFolders.ignore`|Folders to ignore using SVN|`["**/.git","**/.hg","**/vendor","**/node_modules"]`|
103104
|`svn.sourceControl.ignoreOnCommit`|Changelists to ignore on commit|`["ignore-on-commit"]`|
105+
|`svn.sourceControl.ignoreOnStatusCount`|Changelists to ignore on status count|`["ignore-on-commit"]`|
104106
|`svn.detectExternals`|Controls whether to automatically detect svn externals.|`true`|
105107
|`svn.sourceControl.combineExternalIfSameServer`|Combine the svn external in the main if is from the same server.|`false`|
106108
|`svn.sourceControl.countUnversioned`|Allow to count unversioned files in status count|`true`|
107-
|`svn.sourceControl.countIgnoreOnCommit`|Allow to count ignored files to commit in status count|`false`|
108-
|`svn.sourceControl.hideUnversioned`|Hide unversioned files in Source Control UI|`false`|
109109
|`svn.log.length`|Number of commit messages to log|`50`|
110110
|`svn.showOutput`|Show the output window when the extension starts|`false`|
111111
|`svn.conflicts.autoResolve`|Set file to status resolved after fix conflictss|`false`|
112112
|`svn.update.ignoreExternals`|Set to ignore externals definitions on update (add --ignore-externals)|`true`|
113113
|`svn.default.encoding`|Encoding of svn output if the output is not utf-8. When this parameter is null, the encoding is automatically detected. Example: 'windows-1252'.|`null`|
114114
|`svn.showUpdateMessage`|Show the update message when update is run|`true`|
115115
|`svn.remoteChanges.checkFrequency`|Set the interval in seconds to check changed files on remote repository and show in statusbar. 0 to disable|`300`|
116+
|`svn.sourceControl.hideUnversioned`|Hide unversioned files in Source Control UI|`false`|

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,13 @@
683683
"ignore-on-commit"
684684
]
685685
},
686+
"svn.sourceControl.ignoreOnStatusCount": {
687+
"type": "array",
688+
"description": "Changelists to ignore on status count",
689+
"default": [
690+
"ignore-on-commit"
691+
]
692+
},
686693
"svn.detectExternals": {
687694
"type": "boolean",
688695
"default": true,
@@ -698,11 +705,6 @@
698705
"description": "Allow to count unversioned files in status count",
699706
"default": true
700707
},
701-
"svn.sourceControl.countIgnoreOnCommit": {
702-
"type": "boolean",
703-
"description": "Allow to count ignored files to commit in status count",
704-
"default": false
705-
},
706708
"svn.log.length": {
707709
"type": "number",
708710
"minimum": 1,

src/repository.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -517,14 +517,14 @@ export class Repository {
517517

518518
const counts = [this.changes, this.conflicts];
519519

520-
const countIgnoreOnCommit = configuration.get<boolean>(
521-
"sourceControl.countIgnoreOnCommit",
522-
false
523-
);
524520
const ignoreOnCommitList = configuration.get<string[]>(
525521
"sourceControl.ignoreOnCommit"
526522
);
527523

524+
const ignoreOnStatusCountList = configuration.get<string[]>(
525+
"sourceControl.ignoreOnStatusCount"
526+
);
527+
528528
changelists.forEach((resources, changelist) => {
529529
let group = this.changelists.get(changelist);
530530
if (!group) {
@@ -541,7 +541,7 @@ export class Repository {
541541

542542
group.resourceStates = resources;
543543

544-
if (countIgnoreOnCommit && ignoreOnCommitList.includes(changelist)) {
544+
if (!ignoreOnStatusCountList.includes(changelist)) {
545545
counts.push(group);
546546
}
547547
});

0 commit comments

Comments
 (0)