[LrdeTools] 260: Add svn ignore, an helper for the svn:ignore property.

https://svn.lrde.epita.fr/svn/lrdetools/trunk Index: ChangeLog from Nicolas Pouillard <ertai@lrde.epita.fr> Add svn ignore, an helper for the svn:ignore property. * vcs/lib/vcs/ignore.rb: New. ignore.rb | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+) Index: vcs/lib/vcs/ignore.rb --- vcs/lib/vcs/ignore.rb (revision 0) +++ vcs/lib/vcs/ignore.rb (revision 0) @@ -0,0 +1,26 @@ +# Author:: Nicolas Pouillard <ertai@lrde.epita.fr>. +# Copyright:: Copyright (c) 2005 LRDE. All rights reserved. +# License:: Gnu General Public License. +# Revision:: $Id$ + + +class Svn + + # Add an ignore entry in the given path. Automatically determine the rep + # concerned with svn:ignore. + # Examples: + # $ svn ignore my_subdir/'*.tex' + # $ svn ignore ./foo.generated my_subdir/another/a_wrong_file + def ignore! ( files=[], options={} ) + files.each do |file| + dir, base = file.to_path.split + logger.info { "Add `#{base}' to svn:ignore of `#{dir}'"} + data = propget(['svn:ignore', dir], :strict => true) + data.output.open('a') { |f| f.puts base } + propset!(['svn:ignore', dir], + options.merge(:quiet => true, :file => data.output)) + data.clean + end + end + +end # class Svn Property changes on: vcs/lib/vcs/ignore.rb ___________________________________________________________________ Name: svn:keywords + Id

On 10/2/05, Nicolas Pouillard <ertai@lrde.epita.fr> wrote:
https://svn.lrde.epita.fr/svn/lrdetools/trunk
Index: ChangeLog from Nicolas Pouillard <ertai@lrde.epita.fr>
Add svn ignore, an helper for the svn:ignore property.
This command make svn-ignore of lrdetools useless can I remove it? -- Nicolas Pouillard aka Ertai <ertai@feydakins.org> http://uttk.org Uttk -- Unified Test Tool Kit
participants (2)
-
Nicolas Pouillard
-
Nicolas Pouillard