https://svn.lrde.epita.fr/svn/lrdetools/trunk
Index: ChangeLog
from Nicolas Pouillard <ertai(a)lrde.epita.fr>
Make default_commit happened just one time.
* vcs/lib/vcs/vcs.rb: Use just_one_time.
vcs.rb | 3 +++
1 files changed, 3 insertions(+)
Index: vcs/lib/vcs/vcs.rb
--- vcs/lib/vcs/vcs.rb (revision 252)
+++ vcs/lib/vcs/vcs.rb (working copy)
@@ -592,10 +592,13 @@
end
# Set the given method as default commit action, use commit_ for the old one
+ # This method can be called just one time to avoid conflicts
def default_commit ( meth )
+ just_one_time do
alias_command :commit, meth
alias_command :ci, meth
end
+ end
end # class << self
https://svn.lrde.epita.fr/svn/lrdetools/trunk
Index: ChangeLog
from Nicolas Pouillard <ertai(a)lrde.epita.fr>
Forbid commits with unrecognized files.
* vcs/lib/vcs/common_commit.rb: Add an explicative message.
common_commit.rb | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+)
Index: vcs/lib/vcs/common_commit.rb
--- vcs/lib/vcs/common_commit.rb (revision 251)
+++ vcs/lib/vcs/common_commit.rb (working copy)
@@ -15,6 +15,39 @@
update!
+ have_unrecognized_files = false
+ status(files) do |se|
+ if se.category == :unrecognize
+ have_unrecognized_files = true
+ se.colorize! if color?
+ puts se.line
+ end
+ end
+ if have_unrecognized_files
+ raise Failure, "
+ |You have unrecognized files in your working copy !
+ |This meant that these files won't be commited !
+ |You have some solutions to get rid of this limitation:
+ |- You must put these files in some categories.
+ | For instance you can rename these files and put a `+' before
+ | to make it `precious':
+ | put `,' for `junk'
+ | put `\\' for `unmask'
+ | put `-' for `exclude'
+ |- You can also edit your configuration file (.vcs) to customize
+ | these categories. For example add this:
+ | ------------ .vcs ------------
+ | precious:
+ | - !re my_precious_file[0-9]*
+ | - !re .*\.patch
+ | ------------ .vcs ------------
+ |- You can also perform a partial commit and specify which files
+ | and directories commit. For example this command:
+ | #{@command} commit foo.c bar/
+ |
+ |Commit failed".head_cut!
+ end
+
Vcs.commited = edit_form!(files)
message(files)
https://svn.lrde.epita.fr/svn/lrdetools/trunk
Index: ChangeLog
from Nicolas Pouillard <ertai(a)lrde.epita.fr>
Add the junk command.
* vcs/lib/vcs/junk.rb: New.
* vcs/NEWS: Add an entry for junk.
NEWS | 2 ++
lib/vcs/junk.rb | 26 ++++++++++++++++++++++++++
2 files changed, 28 insertions(+)
Index: vcs/lib/vcs/junk.rb
--- vcs/lib/vcs/junk.rb (revision 0)
+++ vcs/lib/vcs/junk.rb (revision 0)
@@ -0,0 +1,26 @@
+# Copyright:: Copyright (c) 2005 Nicolas Pouillard. All rights reserved.
+# Author:: Nicolas Pouillard <ertai(a)lrde.epita.fr>.
+# License:: Gnu General Public License.
+# Revision:: $Id$
+
+
+class Vcs
+
+ # This command removes all junk files (by default all files begining with `,').
+ # Warning: this command removes some files that may contains some relevant
+ # information. For example during a commit the information that you type is
+ # stored in one of these `,files'. So be careful using this command.
+ # See the user configuration to customize what is considered as a junk file.
+ def junk! ( files=[], options={} )
+ list!(files, options.merge(:junk => true)) do |path_list|
+ path_list.each { |path| logger.info { "Remove #{path}" } }
+ if @h.agree('Are you sure? (y/n)', true)
+ path_list.each do |path|
+ logger.info { "Removing #{path}..." }
+ path.rm_f
+ end
+ end
+ end
+ end
+
+end # class Vcs
Property changes on: vcs/lib/vcs/junk.rb
___________________________________________________________________
Name: svn:keywords
+ Id
Index: vcs/NEWS
--- vcs/NEWS (revision 247)
+++ vcs/NEWS (working copy)
@@ -57,6 +57,8 @@
- svn list --junk --do rm
- svn list --precious --do wc
+ - svn junk: This command use `list' to remove all junk files.
+
New in 0.3 2005-09-16:
* The help command now show all commands including vcs ones.