File tree 6 files changed +56
-2
lines changed
6 files changed +56
-2
lines changed Original file line number Diff line number Diff line change
1
+ ** v0.6.0**
2
+ =============================================
3
+
4
+ ## What's New
5
+ - Can add un-tracked files in source control view
6
+
1
7
** v0.5.1**
2
8
=============================================
3
9
Original file line number Diff line number Diff line change 2
2
"name" : " svn-scm" ,
3
3
"displayName" : " svn-scm" ,
4
4
"description" : " " ,
5
- "version" : " 0.5.1 " ,
5
+ "version" : " 0.6.0 " ,
6
6
"publisher" : " johnstoncode" ,
7
7
"engines" : {
8
8
"vscode" : " ^1.16.0"
32
32
"eslint" : " ^4.6.1" ,
33
33
"@types/node" : " ^7.0.0" ,
34
34
"@types/mocha" : " ^2.2.42"
35
+ },
36
+ "contributes" : {
37
+ "commands" : [
38
+ {
39
+ "command" : " svn.add" ,
40
+ "title" : " add" ,
41
+ "category" : " svn" ,
42
+ "icon" : {
43
+ "light" : " icons/add.svg" ,
44
+ "dark" : " icons/add.svg"
45
+ }
46
+ }
47
+ ],
48
+ "menus" : {
49
+ "commandPalette" : [],
50
+ "scm/title" : [],
51
+ "scm/resourceGroup/context" : [],
52
+ "scm/resourceState/context" : [
53
+ {
54
+ "command" : " svn.add" ,
55
+ "when" : " scmProvider == svn && scmResourceGroup == unversioned" ,
56
+ "group" : " inline"
57
+ }
58
+ ],
59
+ "editor/title" : []
60
+ },
61
+ "configuration" : {}
35
62
}
36
63
}
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const svn = require("./svn");
5
5
function SvnCommands ( ) {
6
6
commands . registerCommand ( "svn.fileOpen" , this . fileOpen ) ;
7
7
commands . registerCommand ( "svn.commitWithMessage" , this . commitWithMessage ) ;
8
+ commands . registerCommand ( "svn.add" , this . addFile ) ;
8
9
}
9
10
10
11
SvnCommands . prototype . fileOpen = resourceUri => {
@@ -24,4 +25,14 @@ SvnCommands.prototype.commitWithMessage = async function() {
24
25
}
25
26
} ;
26
27
28
+ SvnCommands . prototype . addFile = async uri => {
29
+ this . svn = new svn ( ) ;
30
+
31
+ try {
32
+ await this . svn . add ( uri . resourceUri . path ) ;
33
+ } catch ( error ) {
34
+ console . log ( error ) ;
35
+ }
36
+ } ;
37
+
27
38
module . exports = SvnCommands ;
Original file line number Diff line number Diff line change @@ -31,4 +31,13 @@ svn.prototype.commit = function(params) {
31
31
} ) ;
32
32
} ;
33
33
34
+ svn . prototype . add = function ( filePath ) {
35
+ return new Promise ( ( resolve , reject ) => {
36
+ this . client . add (
37
+ filePath ,
38
+ ( err , data ) => ( err ? reject ( err ) : resolve ( data ) )
39
+ ) ;
40
+ } ) ;
41
+ } ;
42
+
34
43
module . exports = svn ;
You can’t perform that action at this time.
0 commit comments