From 24ba77e775b3bf05bf60cbf6b28a195dfb438e0e Mon Sep 17 00:00:00 2001 From: dh Date: Thu, 24 May 2018 18:21:40 +0200 Subject: [PATCH] install magit-svn by default --- CHANGELOG.develop | 2 +- layers/+source-control/git/README.org | 37 +++++++------------------- layers/+source-control/git/config.el | 3 +++ layers/+source-control/git/packages.el | 10 +++---- 4 files changed, 18 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.develop b/CHANGELOG.develop index 07fc494f7..f53cde679 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -82,7 +82,7 @@ This file containes the change log for the next major version of Spacemacs. - Remove package =github-browse-file= which has been replaced by =browse-at-remote= in =version-control= layer **** Git -- enable magit-svn by default +- install magit-svn by default and activate with git-enable-magit-svn-plugin **** Gtags - Move key binding ~SPC m g c~ to ~SPC m g C~ (regenerate tags) **** Java diff --git a/layers/+source-control/git/README.org b/layers/+source-control/git/README.org index 51da0a680..89b3f40f7 100644 --- a/layers/+source-control/git/README.org +++ b/layers/+source-control/git/README.org @@ -10,17 +10,13 @@ - [[#magit-status-fullscreen][Magit status fullscreen]] - [[#magit-auto-complete][Magit auto-complete]] - [[#magit-svn-plugin][Magit SVN plugin]] - - [[#global-git-commit-mode][Global git commit mode]] - - [[#git][Git]] - - [[#git-flow][Git-Flow]] - - [[#org-integration][Org integration]] - [[#working-with-git][Working with Git]] - [[#magit][Magit]] - [[#staging-lines][Staging lines]] - [[#commit-message-editing-buffer][Commit message editing buffer]] - [[#interactive-rebase-buffer][Interactive rebase buffer]] - [[#quick-guide-for-recurring-use-cases-in-magit][Quick guide for recurring use cases in Magit]] - - [[#git-flow-1][Git-Flow]] + - [[#git-flow][Git-Flow]] - [[#git-time-machine][Git time machine]] - [[#git-links-to-web-services][Git links to web services]] - [[#repository-list][Repository list]] @@ -67,33 +63,18 @@ function, this is the folder where you keep all your git-controlled projects For more information, see [[http://magit.vc/manual/magit.html#Status-buffer][Magit-User-Manual#Status-buffer]] ** Magit SVN plugin - + The magit SVN plugin shows commits which were not pushed to svn yet in *Magit* buffer. Press ~!​~ *Magit* buffer to open the magit-svn-popup where you can dcommit to svn or rebase from svn. -** Global git commit mode -Spacemacs can be used as the =$EDITOR= (or =$GIT_EDITOR=) for editing git -commits messages. To enable this you have to add the following line to your -=dotspacemacs/user-config=: +#+BEGIN_SRC emacs-lisp + (defun dotspacemacs/user-init () + (setq-default git-enable-magit-svn-plugin t)) +#+END_SRC -#+begin_src emacs-lisp -(global-git-commit-mode t) -#+end_src - -** Git -Of course if your OS does not ship with git (!) you'll have to install it -on your machine. You can download it from the [[http://git-scm.com/downloads][download page]]. - -** Git-Flow -Git-flow is a standardized branching pattern for git repositories with the aim -of making things more manageable. While there are tools to assist with making -this easier, these do nothing you couldn't do manually. - -Support requires installation of the git-flow extensions. Please reference their -[[https://github.com/petervanderdoes/gitflow/wiki][installation page]] for assistance. - -** Org integration -See the commentary section of the package [[https://github.com/magit/orgit/blob/master/orgit.el#L28][here]]. +| Key Binding | Description | +|-------------+---------------------| +| ~!~ | open magit-svn menu | * Working with Git Git commands (start with ~g~): diff --git a/layers/+source-control/git/config.el b/layers/+source-control/git/config.el index d66e58bf3..eb822f01b 100644 --- a/layers/+source-control/git/config.el +++ b/layers/+source-control/git/config.el @@ -11,5 +11,8 @@ ;; Variables +(defvar git-enable-magit-svn-plugin nil + "If non nil `magit-svn' plugin is enabled.") + (defvar git-magit-status-fullscreen nil "If non nil magit-status buffer is displayed in fullscreen.") diff --git a/layers/+source-control/git/packages.el b/layers/+source-control/git/packages.el index e3b1331b3..c7e1a2963 100644 --- a/layers/+source-control/git/packages.el +++ b/layers/+source-control/git/packages.el @@ -203,12 +203,12 @@ Press [_b_] again to blame further in the history, [_q_] to go up or quit." (defun git/init-magit-svn () (use-package magit-svn + :if git-enable-magit-svn-plugin :commands turn-on-magit-svn - :init (progn - (add-hook 'magit-mode-hook 'turn-on-magit-svn) - (with-eval-after-load 'magit - (define-key magit-mode-map "!" 'magit-svn-popup))) - :config (spacemacs|diminish magit-svn-mode "SVN"))) + :init (add-hook 'magit-mode-hook 'turn-on-magit-svn) + :config (progn + (spacemacs|diminish magit-svn-mode "SVN") + (define-key magit-mode-map "!" 'magit-svn-popup)))) (defun git/init-orgit ())