Mercurial > vim-lawrencium
comparison plugin/lawrencium.vim @ 69:8c9aca0e4322
Added return statement after calling s:error
author | lmytinsk |
---|---|
date | Wed, 25 Sep 2013 18:33:33 +0400 |
parents | 7afcd4d37062 |
children | 16e873b2a4a8 |
comparison
equal
deleted
inserted
replaced
68:7afcd4d37062 | 69:8c9aca0e4322 |
---|---|
879 function! s:HgStatus_AddRemove(linestart, lineend) abort | 879 function! s:HgStatus_AddRemove(linestart, lineend) abort |
880 " Get the selected filenames. | 880 " Get the selected filenames. |
881 let l:filenames = s:HgStatus_GetSelectedFiles(a:linestart, a:lineend, ['!', '?']) | 881 let l:filenames = s:HgStatus_GetSelectedFiles(a:linestart, a:lineend, ['!', '?']) |
882 if len(l:filenames) == 0 | 882 if len(l:filenames) == 0 |
883 call s:error("No files to add or remove in selection or current line.") | 883 call s:error("No files to add or remove in selection or current line.") |
884 return | |
884 endif | 885 endif |
885 | 886 |
886 " Run `addremove` on those paths. | 887 " Run `addremove` on those paths. |
887 let l:repo = s:hg_repo() | 888 let l:repo = s:hg_repo() |
888 call l:repo.RunCommand('addremove', l:filenames) | 889 call l:repo.RunCommand('addremove', l:filenames) |
894 function! s:HgStatus_Commit(linestart, lineend, bang, vertical) abort | 895 function! s:HgStatus_Commit(linestart, lineend, bang, vertical) abort |
895 " Get the selected filenames. | 896 " Get the selected filenames. |
896 let l:filenames = s:HgStatus_GetSelectedFiles(a:linestart, a:lineend, ['M', 'A', 'R']) | 897 let l:filenames = s:HgStatus_GetSelectedFiles(a:linestart, a:lineend, ['M', 'A', 'R']) |
897 if len(l:filenames) == 0 | 898 if len(l:filenames) == 0 |
898 call s:error("No files to commit in selection or file.") | 899 call s:error("No files to commit in selection or file.") |
900 return | |
899 endif | 901 endif |
900 | 902 |
901 " Run `Hgcommit` on those paths. | 903 " Run `Hgcommit` on those paths. |
902 call s:HgCommit(a:bang, a:vertical, l:filenames) | 904 call s:HgCommit(a:bang, a:vertical, l:filenames) |
903 endfunction | 905 endfunction |
922 function! s:HgStatus_QNew(linestart, lineend, patchname, ...) abort | 924 function! s:HgStatus_QNew(linestart, lineend, patchname, ...) abort |
923 " Get the selected filenames. | 925 " Get the selected filenames. |
924 let l:filenames = s:HgStatus_GetSelectedFiles(a:linestart, a:lineend, ['M', 'A', 'R']) | 926 let l:filenames = s:HgStatus_GetSelectedFiles(a:linestart, a:lineend, ['M', 'A', 'R']) |
925 if len(l:filenames) == 0 | 927 if len(l:filenames) == 0 |
926 call s:error("No files in selection or file to create patch.") | 928 call s:error("No files in selection or file to create patch.") |
929 return | |
927 endif | 930 endif |
928 | 931 |
929 " Run `Hg qnew` on those paths. | 932 " Run `Hg qnew` on those paths. |
930 let l:repo = s:hg_repo() | 933 let l:repo = s:hg_repo() |
931 call insert(l:filenames, a:patchname, 0) | 934 call insert(l:filenames, a:patchname, 0) |
940 function! s:HgStatus_QRefresh(linestart, lineend) abort | 943 function! s:HgStatus_QRefresh(linestart, lineend) abort |
941 " Get the selected filenames. | 944 " Get the selected filenames. |
942 let l:filenames = s:HgStatus_GetSelectedFiles(a:linestart, a:lineend, ['M', 'A', 'R']) | 945 let l:filenames = s:HgStatus_GetSelectedFiles(a:linestart, a:lineend, ['M', 'A', 'R']) |
943 if len(l:filenames) == 0 | 946 if len(l:filenames) == 0 |
944 call s:error("No files in selection or file to refresh the patch.") | 947 call s:error("No files in selection or file to refresh the patch.") |
948 return | |
945 endif | 949 endif |
946 | 950 |
947 " Run `Hg qrefresh` on those paths. | 951 " Run `Hg qrefresh` on those paths. |
948 let l:repo = s:hg_repo() | 952 let l:repo = s:hg_repo() |
949 call insert(l:filenames, '-s', 0) | 953 call insert(l:filenames, '-s', 0) |