Skip to content

Commit dc125ec

Browse files
mgierwJohnstonCode
authored andcommitted
feat: Added ability to copy revision number to clipboard (#780)
1 parent d401a3e commit dc125ec

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

package.json

+26
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@
168168
"category": "SVN",
169169
"title": "Copy message to clipboard"
170170
},
171+
{
172+
"command": "svn.repolog.copyrevision",
173+
"category": "SVN",
174+
"title": "Copy revision number to clipboard"
175+
},
171176
{
172177
"command": "svn.itemlog.openFileRemote",
173178
"title": "Open this revision",
@@ -197,6 +202,11 @@
197202
"category": "SVN",
198203
"title": "Copy message to clipboard"
199204
},
205+
{
206+
"command": "svn.itemlog.copyrevision",
207+
"category": "SVN",
208+
"title": "Copy revision number to clipboard"
209+
},
200210
{
201211
"command": "svn.branchchanges.openDiff",
202212
"category": "SVN",
@@ -601,6 +611,10 @@
601611
"command": "svn.repolog.copymsg",
602612
"when": "false"
603613
},
614+
{
615+
"command": "svn.repolog.copyrevision",
616+
"when": "false"
617+
},
604618
{
605619
"command": "svn.itemlog.openFileRemote",
606620
"when": "false"
@@ -621,6 +635,10 @@
621635
"command": "svn.itemlog.copymsg",
622636
"when": "false"
623637
},
638+
{
639+
"command": "svn.itemlog.copyrevision",
640+
"when": "false"
641+
},
624642
{
625643
"command": "svn.branchchanges.openDiff",
626644
"when": "false"
@@ -700,6 +718,10 @@
700718
"command": "svn.itemlog.copymsg",
701719
"when": "view == itemlog && viewItem == diffable"
702720
},
721+
{
722+
"command": "svn.itemlog.copyrevision",
723+
"when": "view == itemlog && viewItem == diffable"
724+
},
703725
{
704726
"command": "svn.repolog.openDiff",
705727
"when": "view == repolog && viewItem == diffable"
@@ -719,6 +741,10 @@
719741
{
720742
"command": "svn.repolog.copymsg",
721743
"when": "view == repolog && viewItem == commit"
744+
},
745+
{
746+
"command": "svn.repolog.copyrevision",
747+
"when": "view == repolog && viewItem == commit"
722748
}
723749
],
724750
"scm/title": [

src/historyView/itemLogProvider.ts

+6
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ export class ItemLogProvider
5252
async (item: ILogTreeItem) => copyCommitToClipboard("msg", item)
5353
)
5454
);
55+
this._dispose.push(
56+
commands.registerCommand(
57+
"svn.itemlog.copyrevision",
58+
async (item: ILogTreeItem) => copyCommitToClipboard("revision", item)
59+
)
60+
);
5561
this._dispose.push(
5662
commands.registerCommand(
5763
"svn.itemlog.openFileRemote",

src/historyView/repoLogProvider.ts

+6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ export class RepoLogProvider
9090
async (item: ILogTreeItem) => copyCommitToClipboard("msg", item)
9191
)
9292
);
93+
this._dispose.push(
94+
commands.registerCommand(
95+
"svn.repolog.copyrevision",
96+
async (item: ILogTreeItem) => copyCommitToClipboard("revision", item)
97+
)
98+
);
9399
this._dispose.push(
94100
commands.registerCommand(
95101
"svn.repolog.addrepolike",

0 commit comments

Comments
 (0)