void (@NotNull AnActionEvent e) { ChangeList[] changeLists = e.getData(VcsDataKeys.CHANGE_LISTS); if (changeLists != null && changeLists[0] instanceof HgCommittedChangeList) { HgRevisionNumber revisionNumber = ((HgCommittedChangeList)changeLists[0]).getRevisionNumber(); CopyPasteManager.getInstance().setContents(new StringSelection(revisionNumber.getChangeset())); } }