]> git.madduck.net Git - code/myrepos.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add a clean command that works like git clean -dxn with -f to delete option.
authorPaul Wise <pabs@debian.org>
Sun, 10 Mar 2013 06:21:03 +0000 (14:21 +0800)
committerJoey Hess <joey@kitenet.net>
Tue, 23 Sep 2014 20:46:11 +0000 (16:46 -0400)
debian/control
mr

index 25185393208b901735f2581ab2ba84aa1d772b9c..64c5f26479bf567630567e044f4e80bb4a6b9e47 100644 (file)
@@ -11,7 +11,7 @@ Package: myrepos
 Architecture: all
 Section: vcs
 Depends: ${misc:Depends}
-Suggests: subversion, git-core | git (>= 1:1.7), cvs, bzr, mercurial, darcs, fossil, vcsh, liburi-perl, curl, ack-grep
+Suggests: subversion, subversion-tools, git-core | git (>= 1:1.7), cvs, kdesdk-scripts, bzr, mercurial, darcs, fossil, vcsh, liburi-perl, curl, ack-grep
 Provides: mr
 Replaces: mr
 Recommends: libwww-perl, libhtml-parser-perl, libio-pty-easy-perl, perl
diff --git a/mr b/mr
index 18e87616423e7d94ab3686733c137e094f84420b..7319f985d4d88326ab3dfe2a54d3e21952f6a1e9 100755 (executable)
--- a/mr
+++ b/mr
@@ -12,6 +12,8 @@ B<mr> [options] update
 
 B<mr> [options] status
 
+B<mr> [options] clean [-f]
+
 B<mr> [options] commit [-m "message"]
 
 B<mr> [options] record [-m "message"]
@@ -80,6 +82,12 @@ Displays a status report for each repository, showing what
 uncommitted changes are present in the repository. For distributed version
 control systems, also shows unpushed local branches.
 
+=item clean
+
+Print ignored files, untracked files and other cruft in the working directory.
+
+The optional -f parameter allows removing the files as well as printing them.
+
 =item commit (or ci)
 
 Commits changes to each repository. (By default, changes are pushed to the
@@ -2012,6 +2020,64 @@ git_svn_fetch = git svn fetch
 darcs_fetch = darcs fetch
 hg_fetch = hg pull
 
+svn_clean = 
+       if [ "x$1" = x-f ] ; then
+               shift
+               svn-clean "$@"
+       else
+               svn-clean --print "$@"
+       fi
+git_clean = 
+       if [ "x$1" = x-f ] ; then
+               shift
+               git clean -dx --force "$@"
+       else
+               git clean -dx --dry-run "$@"
+       fi
+git_svn_clean = 
+       if [ "x$1" = x-f ] ; then
+               shift
+               git clean -dx --force "$@"
+       else
+               git clean -dx --dry-run "$@"
+       fi
+bzr_clean = 
+       if [ "x$1" = x-f ] ; then
+               shift
+               bzr clean-tree --verbose --force --ignored --unknown --detritus "$@"
+       else
+               bzr clean-tree --verbose --dry-run --ignored --unknown --detritus "$@"
+       fi
+cvs_clean = 
+        if [ "x$1" = x-f ] ; then
+               shift
+               cvs-clean "$@"
+       else
+               cvs-clean --dry-run "$@"
+       fi
+hg_clean = 
+       if [ "x$1" = x-f ] ; then
+               shift
+               hg purge --print --all "$@"
+               hg purge --all "$@"
+       else
+               hg purge --print --all "$@"
+       fi
+fossil_clean = 
+       if [ "x$1" = x-f ] ; then
+               shift
+               fossil clean --dry-run --dotfiles --emptydirs "$@"
+       else
+               fossil clean --force --dotfiles --emptydirs "$@"
+       fi
+vcsh_commit = 
+       if [ "x$1" = x-f ] ; then
+               shift
+               vcsh run "$MR_REPO" git clean -dx "$@"
+       else
+               vcsh run "$MR_REPO" git clean -dx --dry-run "$@"
+       fi
+
 svn_status = svn status "$@"
 git_status = git status -s "$@" || true; git --no-pager log --branches --not --remotes --simplify-by-decoration --decorate --oneline || true
 bzr_status = bzr status --short "$@"; bzr missing