66
66
"missing": "missing.png",
67
67
"deleted": "deleted.png",
68
68
"modified": "modified.png",
69
"conflicted": "conflicted.png",
70
69
"revision": "revision.png"
732
731
/* Subversion actions */
733
732
/* These are only useful if we are in a versioned directory and have some
734
733
* files selected. */
735
set_action_state(["svnadd", "svnremove", "svnrevert", "svncommit"], numsel >= 1 && current_file.svnstatus);
734
set_action_state(["svnadd", "svnrevert", "svncommit"], numsel >= 1 && current_file.svnstatus);
737
/* Diff, log and update only support one path at the moment, so we must
738
* have 0 or 1 versioned files selected. If 0, the directory must be
736
/* Diff and log only support one path at the moment, so we must have 0 or 1
737
* versioned files selected. If 0, the directory must be versioned. */
740
738
single_versioned_path = (
742
740
(numsel == 1 && (svnst = file_listing[selected_files[0]].svnstatus)) ||
743
741
(numsel == 0 && (svnst = current_file.svnstatus))
744
742
) && svnst != "unversioned");
745
set_action_state(["svndiff", "svnupdate"], single_versioned_path);
747
/* We can resolve if we have a file selected and it is conflicted. */
748
set_action_state("svnresolved", single_versioned_path && numsel == 1 && svnst == "conflicted");
743
set_action_state("svndiff", single_versioned_path);
750
745
/* Log should be available for revisions as well. */
751
746
set_action_state("svnlog", single_versioned_path, true);
842
837
action_add(selected_files);
845
action_remove(selected_files);
847
839
case "svnrevert":
848
840
action_revert(selected_files);
851
843
window.location = path_join(app_path('diff'), current_path, selected_files[0] || '');
854
action_update(selected_files);
857
action_resolved(selected_files);
859
845
case "svncommit":
860
846
action_commit(selected_files);