Skip to content

Commit

Permalink
feat: Added ability to copy revision number to clipboard (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgierw authored and JohnstonCode committed Jan 26, 2020
1 parent d401a3e commit dc125ec
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@
"category": "SVN",
"title": "Copy message to clipboard"
},
{
"command": "svn.repolog.copyrevision",
"category": "SVN",
"title": "Copy revision number to clipboard"
},
{
"command": "svn.itemlog.openFileRemote",
"title": "Open this revision",
Expand Down Expand Up @@ -197,6 +202,11 @@
"category": "SVN",
"title": "Copy message to clipboard"
},
{
"command": "svn.itemlog.copyrevision",
"category": "SVN",
"title": "Copy revision number to clipboard"
},
{
"command": "svn.branchchanges.openDiff",
"category": "SVN",
Expand Down Expand Up @@ -601,6 +611,10 @@
"command": "svn.repolog.copymsg",
"when": "false"
},
{
"command": "svn.repolog.copyrevision",
"when": "false"
},
{
"command": "svn.itemlog.openFileRemote",
"when": "false"
Expand All @@ -621,6 +635,10 @@
"command": "svn.itemlog.copymsg",
"when": "false"
},
{
"command": "svn.itemlog.copyrevision",
"when": "false"
},
{
"command": "svn.branchchanges.openDiff",
"when": "false"
Expand Down Expand Up @@ -700,6 +718,10 @@
"command": "svn.itemlog.copymsg",
"when": "view == itemlog && viewItem == diffable"
},
{
"command": "svn.itemlog.copyrevision",
"when": "view == itemlog && viewItem == diffable"
},
{
"command": "svn.repolog.openDiff",
"when": "view == repolog && viewItem == diffable"
Expand All @@ -719,6 +741,10 @@
{
"command": "svn.repolog.copymsg",
"when": "view == repolog && viewItem == commit"
},
{
"command": "svn.repolog.copyrevision",
"when": "view == repolog && viewItem == commit"
}
],
"scm/title": [
Expand Down
6 changes: 6 additions & 0 deletions src/historyView/itemLogProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ export class ItemLogProvider
async (item: ILogTreeItem) => copyCommitToClipboard("msg", item)
)
);
this._dispose.push(
commands.registerCommand(
"svn.itemlog.copyrevision",
async (item: ILogTreeItem) => copyCommitToClipboard("revision", item)
)
);
this._dispose.push(
commands.registerCommand(
"svn.itemlog.openFileRemote",
Expand Down
6 changes: 6 additions & 0 deletions src/historyView/repoLogProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ export class RepoLogProvider
async (item: ILogTreeItem) => copyCommitToClipboard("msg", item)
)
);
this._dispose.push(
commands.registerCommand(
"svn.repolog.copyrevision",
async (item: ILogTreeItem) => copyCommitToClipboard("revision", item)
)
);
this._dispose.push(
commands.registerCommand(
"svn.repolog.addrepolike",
Expand Down

0 comments on commit dc125ec

Please sign in to comment.