From 7cb3be14606f3e2f2e7d01adbf2cf64db4176606 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 23 Oct 2006 00:07:18 +0200 Subject: [PATCH] * /etc/skel/.zshrc: add functions for mercurial * Added /etc/skel/.hgrc - configuration file for mercurial. * Added /etc/skel/.vim/plugin/DirDiff.vim (plugin to diff and merge two directories recursively), taken from http://www.vim.org/scripts/script.php?script_id=102 --- debian/changelog | 10 + etc/skel/.hgrc | 91 ++++ etc/skel/.vim/plugin/DirDiff.vim | 1069 ++++++++++++++++++++++++++++++++++++++ etc/skel/.zshrc | 18 +- 4 files changed, 1187 insertions(+), 1 deletion(-) create mode 100644 etc/skel/.hgrc create mode 100644 etc/skel/.vim/plugin/DirDiff.vim diff --git a/debian/changelog b/debian/changelog index f8093bb..6852e68 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +grml-etc-core (0.1-25) unstable; urgency=low + + * /etc/skel/.zshrc: add functions for mercurial + * Added /etc/skel/.hgrc - configuration file for mercurial. + * Added /etc/skel/.vim/plugin/DirDiff.vim (plugin to diff and merge + two directories recursively), taken from + http://www.vim.org/scripts/script.php?script_id=102 + + -- Michael Prokop Sun, 22 Oct 2006 21:24:39 +0200 + grml-etc-core (0.1-24) unstable; urgency=low * Code improvements to /etc/zsh/zshrc and /etc/skel/.zshrc, diff --git a/etc/skel/.hgrc b/etc/skel/.hgrc new file mode 100644 index 0000000..0263696 --- /dev/null +++ b/etc/skel/.hgrc @@ -0,0 +1,91 @@ +# Filename: $HOME/.hgrc +# Purpose: configuration file for mercurial +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2. +# Latest change: Mon Okt 23 00:06:34 CEST 2006 [mika] +################################################################################ + +# See 'man 5 hgrc' and http://www.selenic.com/mercurial/hgrc.5.html +# for more details about possibilities for configuration of mercurial. + +[ui] +username = Michael Prokop +# debug = true +# verbose = true +# merge = hgmergevim + +# useful for patchbomb extension (e.g.: 'hg email -t grml@localhost tip') +[email] +from = grml User +method = /usr/sbin/sendmail + +# Extension stuff, see /etc/mercurial/hgrc.d/hgext.rc +# and http://www.selenic.com/mercurial/wiki/index.cgi/ExtensionHowto + +[extensions] + +# Hooks to control commit access to parts of a tree. +# acl=/usr/share/python-support/mercurial/hgext/acl.py + +# Update Bugzilla bugs when changesets mention them (> 0.9-1). +# bugzilla = /home/grml/mercurial-snapshot/hgext/bugzilla.py + +# Graph amount of code changed per author over time (> 0.9-1). +# churn = /home/grml/mercurial-snapshot/contrib/churn.py +# churn = + +# Extension for using an external program to diff repository (or +# selected files). Available in 0.9.1. +# extdiff=/usr/share/python-support/mercurial/hgext/extdiff.py +hgext.extdiff= + +# Convenience wrapper for pulling and merging. +# fetch = + +# Extension that provides commands to help working with trees +# composed of many Mercurial repositories. See +# http://www.terminus.org/hg/hgforest +# forest = + +# Extension for signing and checking signatures. +# gpg=/usr/share/python-support/mercurial/hgext/gpg.py +# gpg= + +# Extension for binary searching in O(log2(n)) for the changeset +# introducing a (mis)feature, see +# http://www.selenic.com/mercurial/wiki/index.cgi/UsingBisect +# hbisect=/usr/share/python-support/mercurial/hgext/hbisect.py + +# Graphical gitk-like repository browser, invoked with hg view. +# hgk=/usr/share/python-support/mercurial/hgext/hgk.py + +# Mercurial Queue management extension - see +# http://www.selenic.com/mercurial/wiki/index.cgi/MqExtension +# mq=/usr/share/python-support/mercurial/hgext/mq.py + +# Template-driven email notifications, see +# http://www.selenic.com/mercurial/wiki/index.cgi/NotifyExtension +# notify=/usr/share/python-support/mercurial/hgext/notify.py +# hgext.notify = + +# Extension providing the hg email command for sending a collection of +# Mercurial changesets as a series of patch emails. +# patchbomb=/usr/share/python-support/mercurial/hgext/patchbomb.py + +# Cherry-picking, rebasing and changeset rewriting - see +# http://www.selenic.com/mercurial/wiki/index.cgi/TransplantExtension +# transplant = + +# Extension for line ending conversion filters for the Windows platform. +# win32text=/usr/share/python-support/mercurial/hgext/win32text.py + +[extdiff] +# DirDiff script for Vim: http://www.vim.org/scripts/script.php?script_id=102 +# wget http://www.vim.org/scripts/download_script.php?src_id=5306 -O ~/.vim/plugin/DirDiff.vim +# Notice: opts.* works only in Mercurial >0.9.1, use hgvimdiff as wrapper therefore +cmd.vimdiff=/usr/bin/hgvimdiff +# cmd.vimdiff=/usr/bin/vim.basic +# opts.vimdiff=-f '+next' '+execute "DirDiff" argv(0) argv(1)' + +# vim: ft=config diff --git a/etc/skel/.vim/plugin/DirDiff.vim b/etc/skel/.vim/plugin/DirDiff.vim new file mode 100644 index 0000000..f761743 --- /dev/null +++ b/etc/skel/.vim/plugin/DirDiff.vim @@ -0,0 +1,1069 @@ +" -*- vim -*- +" FILE: "C:\Documents and Settings\William Lee\vimfiles\plugin\DirDiff.vim" {{{ +" LAST MODIFICATION: "Wed, 22 Feb 2006 22:31:59 Central Standard Time" +" HEADER MAINTAINED BY: N/A +" VERSION: 1.1.0 +" (C) 2001-2006 by William Lee, +" }}} + +" Source taken from: +" http://www.vim.org/scripts/script.php?script_id=102 +" +" PURPOSE: {{{ +" - Diffing a directory recursively and enable easy merging, copying and +" deleting of files and directories. +" +" REQUIREMENTS: +" - Make sure you have GNU diff in your path on Unix and Windows. I only +" tested this on cygwin's version on Windows. If you have a diff that +" doesn't support -x or -I flag, do not set variable g:DirDiffExcludes and +" g:DirDiffIgnore to "". It should still work. +" - On Windows, you need to have "xcopy", "copy", "del", and "rd" in your +" path. +" - On Unix, you need to have "rm" and "cp" in your path. +" +" USAGE: +" Put this file in your ~/.vim/plugin +" +" Doing the following will generate a diff window. +" +" :DirDiff +" e.g. +" :DirDiff ../something/dir1 /usr/bin/somethingelse/dir2 +" +" The following commands can be used inside the diff window: +" 'Enter','o' - Diff open: open the diff file(s) where your cursor is at +" 's' - Synchronize the current diff. You can also select +" a range (through visual) and press 's' to synchronize differences +" across a range. +" +" - There are 6 Options you can choose when you hit 's': +" 1. A -> B +" Copy A to overwrite B +" If A's file actually points to a directory, it'll copy it to B +" recursively. +" 2. B -> A +" Copy B to overwrite A +" If B's file actually points to a directory, it'll copy it to A +" recursively. +" 3. Always A +" For the rest of the items that you've selected, +" synchronize like (1). +" 4. Always B +" For the rest of the items that you've selected, +" synchronize like (2). +" 5. Skip +" Skip this diff entry. +" 6. Cancel +" Quit the loop and exit. +" +" 'u' - Diff update: update the diff window +" 'x' - Sets the exclude pattern, separated by ',' +" 'i' - Sets the ignore pattern, separated by ',' +" 'a' - Sets additional arguments for diff, eg. -w to ignore white space, +" etc. +" 'q' - Quit DirDiff +" +" The following comamnds can be used in the Vim diff mode +" \dg - Diff get: maps to :diffget +" \dp - Diff put: maps to :diffput +" \dj - Diff next: (think j for down) +" \dk - Diff previous: (think k for up) +" +" You can set the following DirDiff variables. You can add the following +" "let" lines in your .vimrc file. +" +" Sets default exclude pattern: +" let g:DirDiffExcludes = "CVS,*.class,*.exe,.*.swp" +" +" Sets default ignore pattern: +" let g:DirDiffIgnore = "Id:,Revision:,Date:" +" +" If DirDiffSort is set to 1, sorts the diff lines. +" let g:DirDiffSort = 1 +" +" Sets the diff window (bottom window) height (rows) +" let g:DirDiffWindowSize = 14 +" +" Ignore case during diff +" let g:DirDiffIgnoreCase = 0 +" +" Dynamically figure out the diff text. If you are using and i18n version +" of diff, this will try to get the specific diff text during runtime. It's +" turned off by default. If you are always targetting a specific version of +" diff, you can turn this off and set the DirDiffText* variables +" accordingly. +" let g:DirDiffDynamicDiffText = 0 +" +" String used for the English equivalent "Files " +" let g:DirDiffTextFiles = "Files " + +" String used for the English equivalent " and " +" let g:DirDiffTextAnd = " and " +" +" String used for the English equivalent " differ") +" let g:DirDiffTextDiffer = " differ" +" +" String used for the English equivalent "Only in ") +" let g:DirDiffTextOnlyIn = "Only in " +" +" NOTES: +" This script can copy and remove your files. This can be powerful (or too +" powerful) at times. Please do not blame me if you use this and +" disintegrate your hard work. Be warned! +" +" CREDITS: +" +" Please mail any comment/suggestion/patch to +" William Lee +" +" LICENSE: +" Copyright (c) 2001-2006 William Lee +" All rights reserved. +" +" Redistribution and use in source and binary forms, with or without +" modification, are permitted provided that the following conditions are +" met: +" +" * Redistributions of source code must retain the above copyright +" notice, this list of conditions and the following disclaimer. +" * Redistributions in binary form must reproduce the above copyright +" notice, this list of conditions and the following disclaimer in the +" documentation and/or other materials provided with the distribution. +" * Neither the name William Lee nor the names of its contributors may be +" used to endorse or promote products derived from this software without +" specific prior written permission. +" +" THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +" WILLIAM LEE AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +" +" THANKS: +" +" Florian Delizy for the i18n diff patch +" Robert Webb for his sorting function +" Salman Halim, Yosuke Kimura, and others for their suggestions +" +" HISTORY: +" 1.1.0 - Added support for i18n (tested on a French version for now only). +" Can dynamically figure out the diff strings output by diff. +" 1.0.2 - Fixed a small typo bug in the quit function. +" 1.0.1 - Ensure the path separator is correct when running in W2K +" 1.0 - Fixed a bug that flags errors if the user use the nowrapscan option. +" Implements a quit function that exit the diff windows. +" 0.94 - Fixed a bug where the diff will give incorrect A and B file due to +" similarity of directory names. Allow you to modify the diff +" argument. +" 0.93 - Opps, messed up the key mapping usage. +" 0.92 - Doesn't use n and p mappings since it confuses the search next key +" mapping and causes some bugs. Minor modification to change the +" exclude and ignore pattern. +" 0.91 - Clean up delete routine. +" - Added interactive mode. +" - Added multiple entries of exclude and ignore pattern. +" - Custom configuration through global variables. +" - Change exclude and ignore patterns on the fly. +" +" 0.9 - Reorganization of the interface. Much simplier dialog for +" synchronization. Support for range synchronization option (REALLY +" powerful) +" - Removed unnecessary key bindings. All key bindings are local to +" the diff window. (except for the \dg and \dp) +" +" 0.8 - Added syntax highlighting. +" - Enter and double-click in buffer opens diff. +" - Removed dependency on "sort" +" - Removed usage of registry and marker +" - Code cleanup and some bug fixes +" - On Windows the diff command will use the -i flag instead +" - Changed mappings for diff next (\dj) and diff previous (\dk) +" - Added mappings for vim diff mode (\dg, \dp) +" +" 0.7 Initial Release +" +" }}} + +" Public Interface: +command! -nargs=* -complete=dir DirDiff call DirDiff () +command! -nargs=0 DirDiffOpen call DirDiffOpen () +command! -nargs=0 DirDiffNext call DirDiffNext () +command! -nargs=0 DirDiffPrev call DirDiffPrev () +command! -nargs=0 DirDiffUpdate call DirDiffUpdate () +command! -nargs=0 DirDiffQuit call DirDiffQuit () + +if !hasmapto('DirDiffGet') + map dg DirDiffGet +endif +if !hasmapto('DirDiffPut') + map dp DirDiffPut +endif +if !hasmapto('DirDiffNext') + map dj DirDiffNext +endif +if !hasmapto('DirDiffPrev') + map dk DirDiffPrev +endif + +" Global Maps: +map