diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2017-03-06 03:52:53 (GMT) |
|---|---|---|
| committer | Ravi R Kiran <aine.marina@gmail.com> | 2017-03-06 04:09:01 (GMT) |
| commit | 2abbccd18bbbd2d783ea6b1a3d6bfe468f3810c8 (patch) | |
| tree | 33cfce5296601d738713de378ea2bc6fc9bf1575 /lisp | |
| parent | 35d9dd9ff71881c3e162a6b9d0cd651e1636d542 (diff) | |
| download | dotemacs-2abbccd18bbbd2d783ea6b1a3d6bfe468f3810c8.zip dotemacs-2abbccd18bbbd2d783ea6b1a3d6bfe468f3810c8.tar.gz dotemacs-2abbccd18bbbd2d783ea6b1a3d6bfe468f3810c8.tar.bz2 | |
Sync to a different host if specified
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ravi-init-vc.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/ravi-init-vc.el b/lisp/ravi-init-vc.el index e464d2f..8ddba5c 100644 --- a/lisp/ravi-init-vc.el +++ b/lisp/ravi-init-vc.el @@ -41,6 +41,14 @@ (setq magit-restore-window-configuration t) (add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh) + (defun ravi/sync-top-level () + (when (and (boundp 'ravi/sync-top-level-host) + (not (s-equals? (car s-split-up-to "\\." (system-name) 1) + (car s-split-up-to "\\." ravi/sync-top-level-host 1)))) + (message "Synchronizing with %s" ravi/sync-top-level-host) + (shell-command (concat "rsync -a " (magit-toplevel) " " ravi/sync-top-level-host ":" (magit-toplevel))))) + (add-hook 'magit-post-refresh-hook 'ravi/sync-top-level) + (use-package magit-svn :config (add-hook 'magit-mode-hook 'magit-svn-mode) :ensure t) |
