https://svn.lrde.epita.fr/svn/lrdetools/trunk
Index: ChangeLog from Nicolas Pouillard ertai@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)