vcs 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/NEWS CHANGED
@@ -1,3 +1,113 @@
1
+ New in 0.4 ...:
2
+
3
+ * Vcs now supports ruby 1.8.3.
4
+
5
+ * Vcs extensions files:
6
+ - Protocol version:
7
+ You can now add `protocol_version "0.1"' in your extensions. Thus
8
+ you will be warned when the format changes. Thanks to Akim Demaille
9
+ for this idea.
10
+ - Default commit:
11
+ By adding `default_commit :your_commit_method' you override the
12
+ default commit method with yours. So you can call `commit' and `ci',
13
+ but also your old aliases. Of course you can call the real commit
14
+ with `commit_' or `ci_'.
15
+
16
+ * Status & User Configuration File:
17
+ All .vcs files between your current path and root will be honored.
18
+ Example of configuration file.
19
+ >>>> ~/.vcs <<<<
20
+ ---
21
+ exclude: # Excluded Files:
22
+ - !re ,messages # not displayed (default ^-.*$)
23
+
24
+ unmask: # Unmasked Files:
25
+ - !re \bdoc # displayed with a `\' (default ^\\.*$)
26
+
27
+ precious: # Precious Files:
28
+ - !re .*\.(diff|patch)$ # displayed with a `+' (default ^\+.*$)
29
+ # .vcs files are also treat as precious
30
+
31
+ junk: # Junk Files:
32
+ - !re ... # displayed with a `,' (default ^,.*$)
33
+
34
+ >>>> ~/.vcsrc <<<<
35
+
36
+ * Color:
37
+ - Status: the status output is now colored depending of the meaning of
38
+ the status. The color activation can be choose in your configuration
39
+ file (auto, never, always).
40
+ - Logger: messages displayed by the Vcs logger are new colored.
41
+ cyan (info), yellow (warnings), red (errors), blinking red (fatal).
42
+
43
+ * ,messages is now +commited: You can rename your ,messages and keep just
44
+ one directory for commited meta information.
45
+
46
+ * GnuPG signature is now optional:
47
+ In a .vcs configuration file you can disable the signature option.
48
+ For this just add this "sign: false" to .vcs configuration file.
49
+ However it's better to keep this option set.
50
+
51
+ * Commands:
52
+ - svn list:
53
+ - Now supports category listing:
54
+ - list all junk files in foo:
55
+ svn list --junk foo
56
+ - list all precious, and unmasked files:
57
+ svn list --precious --unmask
58
+ - Action supports (--do switch):
59
+ - svn list --junk --do rm
60
+ - svn list --precious --do wc
61
+ - svn list --unrecognize --do 'vcs-svn add'
62
+ - svn list --missing --do 'vcs-svn remove'
63
+
64
+ - svn junk: This command use `list' to remove all junk files.
65
+
66
+ - vcs back: find the youngest revision that passes a given test.
67
+ This feature is Based on prcs-back (LrdeTools) from Akim Demaille.
68
+
69
+ - svn ignore: an helper for the svn:ignore property.
70
+
71
+ * Sorted outputs:
72
+ - Vcs now supports sorting:
73
+ In a .vcs configuration file you can add a `sorting' key which
74
+ contains a list of regular expressions (Thanks to Akim Demaille and
75
+ Alexandre Borghi for this idea).
76
+ For example:
77
+ >>>> ~/.vcs <<<<
78
+ ---
79
+ sorting:
80
+ - !re (NEWS|README|TODO) # These files first
81
+ - !re src/ # Then the src directory
82
+ - !re test/ # Then the test directory
83
+ - !re parse/ # parse and ast are subdirectories
84
+ - !re ast/ # present in both src and test
85
+ - !re \.cc$ # directories. Thus you will get
86
+ - !re \.hh$ # something like:
87
+ # - NEWS
88
+ # - src/parse/a.hh
89
+ # - src/parse/b.hh
90
+ # - src/parse/a.cc
91
+ # - src/parse/b.cc
92
+ # - src/ast/a.hh
93
+ # - src/ast/b.hh
94
+ # - src/ast/a.cc
95
+ # - src/ast/b.cc
96
+ # - test/parse/a.hh
97
+ # - test/parse/a.cc
98
+ # - test/ast/a.hh
99
+ # - test/ast/a.cc
100
+ - Concerned commands:
101
+ - status
102
+ - diffw (a more human readable diff)
103
+ - mk_log_entry
104
+ - mk_changelog_entry
105
+ - mk_message_entry
106
+ - diffstat
107
+ - message
108
+ - mk_form
109
+ - mk_iform
110
+
1
111
  New in 0.3 2005-09-16:
2
112
 
3
113
  * The help command now show all commands including vcs ones.
@@ -7,3 +117,5 @@ New in 0.3 2005-09-16:
7
117
  * Improve the command running handling, vcs calls are now full stream based.
8
118
  * Add two commands `url' and `script'.
9
119
  * Improve the error handling.
120
+
121
+ New in 0.2 2005-06: See NEWS
data/NEWS.FR ADDED
@@ -0,0 +1,90 @@
1
+ >= 0.3: See NEWS
2
+
3
+ Vcs passe en version 0.2:
4
+
5
+ - Beaucoup de bugs ont �t� corrig�s:
6
+
7
+ - Quelques commandes de svn provoquaient un warning.
8
+
9
+ - L'entr�e du ChangeLog se retrouvait parfois dans le diff.
10
+
11
+ - Dans certains cas il fallait supprimer le ,message.
12
+
13
+ - Et d'autres...
14
+
15
+
16
+ - La robustesse a �t� grandement am�lior�e.
17
+
18
+
19
+ - Nouvelles fonctionnalit�s:
20
+
21
+ - On peut d�sormais envoyer des mails sign�s avec GPG:
22
+ - >
23
+ Cela fait m�me partie la s�quence par d�faut, donc pr�parer vos
24
+ cl�s GPG.
25
+
26
+ - Deux formats support�s:
27
+ - PGP/MIME
28
+ - PGP inline
29
+
30
+ - V�rification de la configuration: >
31
+ L'option --check de Vcs vous aidera � configurer Vcs sur votre
32
+ machine.
33
+
34
+ - R�sum� explicatif du contenue de chaque fichier sp�cial (,*).
35
+
36
+ - Reprise sur erreur plus intuitive: >
37
+ Si une erreur se produit (serveur news/mail indisponible, diffstat
38
+ non install�...), il vous suffit de corriger le probl�me puis de
39
+ relancer la m�me commande qui va recommencer ou elle en �tait.
40
+
41
+ - Ajout de plusieurs nouvelles m�thodes pour la gestion des conflits.
42
+
43
+ - Le diff utilis� lors du commit est insensible au espaces.
44
+
45
+ - Et plein d'autres trucs sympa pour vous faciliter la vie.
46
+
47
+
48
+ - Installation / Mise � jour:
49
+
50
+ - Installation:
51
+
52
+ - Rubygems:
53
+ - >
54
+ Vcs est distribu� sous la forme d'un paquet GEM (le syst�me de
55
+ paquet de Ruby), vous devez donc l'installer (si ce n'est pas
56
+ d�j� fait).
57
+
58
+ - url: http://docs.rubygems.org/
59
+
60
+ - en root:
61
+ ruby setup.rb
62
+
63
+ - Vcs (en root):
64
+ gem install vcs
65
+
66
+ - Mise � jour (en root):
67
+ gem update
68
+
69
+
70
+ - Configuration:
71
+
72
+ - V�rifiez que Vcs est correctement install�:
73
+ vcs --help
74
+
75
+ - Mettez des alias pour svn/cvs/prcs:
76
+ - Ajouter dans votre conf zsh le **r�sulat** de cette commande:
77
+ vcs --mk-alias
78
+
79
+ - V�rifiez que l'alias fonctionne:
80
+ svn st! # doit produire la m�me chose que "svn st"
81
+
82
+ - V�rifiez votre configuration et suivez les instructions:
83
+ vcs --check
84
+
85
+ - Pour voir les commandes propos�es par svn + vcs:
86
+ svn --help
87
+
88
+ ---
89
+ Si vous avez des difficult�s � utiliser Vcs n'h�sitez pas � poser des
90
+ questions.
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:OpenStruct
2
2
  table:
3
- :version_id: ''
4
- :url: https://svn.lrde.epita.fr/svn/lrdetools/trunk/vcs
3
+ :version_id: Guirlande
4
+ :date: "Mon, 03 Oct 2005"
5
5
  :version: !ruby/object:Version
6
6
  build: 0
7
7
  major: 0
8
- minor: 3
9
- revision: 227
10
- :date: "Fri, 16 Sep 2005"
8
+ minor: 4
9
+ revision: 268
10
+ :url: https://svn.lrde.epita.fr/svn/lrdetools/trunk/vcs
@@ -1,14 +1,14 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{vcs}
3
- s.version = "0.3.0"
4
- s.date = %q{2005-09-16}
3
+ s.version = "0.4.0"
4
+ s.date = %q{2005-10-03}
5
5
  s.summary = %q{A wrapper over any version control system}
6
6
  s.email = ["ertai@lrde.epita.fr"]
7
7
  s.homepage = %q{http://rubyforge.org/projects/vcs}
8
8
  s.rubyforge_project = %q{vcs}
9
9
  s.description = %q{Version control systems (Subversion, CVS, PRCS...), however useful, are not very extensible: adding new features can be cumbersome, especially if you want them for different such systems at once. Vcs provide a simple dynamic hierarchy for Version Control Systems.}
10
10
  s.authors = ["Nicolas Pouillard"]
11
- s.files = ["lib/vcs/changelog.rb", "lib/vcs/conflict.rb", "lib/vcs/cvs.rb", "lib/vcs/diff.rb", "lib/vcs/diffstat.rb", "lib/vcs/edit.rb", "lib/vcs/last_changed_date.rb", "lib/vcs/mail.rb", "lib/vcs/message.rb", "lib/vcs/mycommit.rb", "lib/vcs/news.rb", "lib/vcs/prcs.rb", "lib/vcs/revision.rb", "lib/vcs/script.rb", "lib/vcs/status.rb", "lib/vcs/svn.rb", "lib/vcs/url.rb", "lib/vcs/vcs.rb", "bin/vcs", "bin/vcs-cvs", "bin/vcs-prcs", "bin/vcs-svn", "AUTHORS", "HOWTO", "NEWS", "Rakefile", "README", "SPEC.dyn.yml", "SPEC.gemspec", "SPEC.yml"]
11
+ s.files = ["lib/vcs/add.rb", "lib/vcs/app.rb", "lib/vcs/back.rb", "lib/vcs/changelog.rb", "lib/vcs/common_commit.rb", "lib/vcs/conflict.rb", "lib/vcs/cvs.rb", "lib/vcs/delete.rb", "lib/vcs/diff.rb", "lib/vcs/diffstat.rb", "lib/vcs/edit.rb", "lib/vcs/environment.rb", "lib/vcs/form.rb", "lib/vcs/ignore.rb", "lib/vcs/junk.rb", "lib/vcs/last_changed_date.rb", "lib/vcs/list.rb", "lib/vcs/mail.rb", "lib/vcs/message.rb", "lib/vcs/news.rb", "lib/vcs/opt_parse.rb", "lib/vcs/prcs.rb", "lib/vcs/revision.rb", "lib/vcs/script.rb", "lib/vcs/status.rb", "lib/vcs/svn.rb", "lib/vcs/url.rb", "lib/vcs/vcs.rb", "bin/vcs", "bin/vcs-cvs", "bin/vcs-prcs", "bin/vcs-svn", "AUTHORS", "HOWTO", "NEWS", "NEWS.FR", "Rakefile", "README", "SPEC.dyn.yml", "SPEC.gemspec", "SPEC.yml"]
12
12
  s.executables = ["vcs", "vcs-cvs", "vcs-prcs", "vcs-svn"]
13
- s.add_dependency(%q<ruby_ex>, ["~> 0.2.0"])
13
+ s.add_dependency(%q<ruby_ex>, ["~> 0.3.0"])
14
14
  end
data/SPEC.yml CHANGED
@@ -13,6 +13,7 @@ description: |
13
13
  want them for different such systems at once. Vcs provide a simple dynamic
14
14
  hierarchy for Version Control Systems.
15
15
  homepage: http://rubyforge.org/projects/vcs
16
+ rubyforge_sub_package_name: vcs
16
17
 
17
18
  rdoc_dir: doc/html
18
19
  tags_url: https://svn.lrde.epita.fr/svn/lrdetools/tags
@@ -33,7 +34,10 @@ pkg_files: !filelist
33
34
  executables: [ vcs, vcs-svn, vcs-cvs, vcs-prcs ]
34
35
 
35
36
  dependencies:
36
- ruby_ex: [~> 0.2.0, 6087/ruby_ex-0.2.0.tar.gz]
37
+ ruby_ex:
38
+ gem : ~> 0.3.0
39
+ tarball: 6317/ruby_ex-0.3.0.tar.gz
40
+ vcs : svn://svn.feydakins.org/ruby_ex/trunk
37
41
 
38
42
  root_test_suite: test/vcs-check.yml
39
43
  ttk_version: ~> 0.3.0
data/bin/vcs CHANGED
@@ -1,164 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
- # Author:: Nicolas Pouillard <ertai@lrde.epita.fr>.
3
- # Copyright:: Copyright (c) 2004 LRDE. All rights reserved.
4
- # License:: GNU General Public License (GPL).
2
+ # Author:: Nicolas Pouillard <ertai@lrde.epita.fr>.
3
+ # Copyright:: Copyright (c) 2004, 2005 LRDE. All rights reserved.
4
+ # License:: GNU General Public License (GPL).
5
+ # Revision:: $Id: header 98 2004-09-29 12:07:43Z ertai $
5
6
 
6
- # $LastChangedBy: ertai $
7
- # $Id: header 98 2004-09-29 12:07:43Z ertai $
7
+ require File.join(File.dirname(__FILE__), '..', 'lib', 'vcs', 'app') unless defined? VcsApp
8
8
 
9
-
10
- # vcs: The version control system wrapper.
11
- #
12
- # Vcs is a wrapper over any version control system.
13
-
14
- require 'pathname'
15
- require 'logger'
16
- require 'optparse'
17
- require 'set'
18
-
19
- VCS_VERSION = '0.3.0'
20
- VCS_PATH = Pathname.new(__FILE__).expand_path
21
- VCS_DIR, VCS = VCS_PATH.split
22
- LIB = VCS_DIR + '..' + 'lib'
23
- $: << LIB.to_s
24
-
25
- dir = Pathname.pwd
26
- while not dir.root? and not (vcs_dir = dir + 'vcs').exist?
27
- dir = dir + '..'
28
- end
29
- $: << vcs_dir
30
-
31
- LOG = Logger.new(STDOUT)
32
- if severity = ENV['VCS_SEVERITY']
33
- LOG.level = Logger.const_get(severity.upcase)
34
- else
35
- LOG.level = Logger::INFO
36
- end
37
- def LOG.format_message(severity, timestamp, msg, progname)
38
- progname += ': ' unless progname.nil? or progname.empty?
39
- "#{VCS}: #{progname}#{severity.downcase}: #{msg}\n"
40
- end
41
-
42
- Pathname.glob("{#{LIB}/**,#{vcs_dir}}/*.rb") do |file|
43
- LOG.debug { file.basename.to_s }
44
- begin
45
- require "vcs/#{file.basename}"
46
- rescue LoadError
47
- begin
48
- require file.to_s
49
- rescue LoadError => ex
50
- raise ex
51
- end
52
- end
53
- end
54
-
55
- ALL_VCS_NAMES = []
56
- ALL_VCS_BY_NAME = {}
57
- ObjectSpace.each_object(Class) do |aClass|
58
- if aClass != Vcs and aClass.ancestors.include? Vcs
59
- name = aClass.to_s.to_sym
60
- ALL_VCS_NAMES << name
61
- ALL_VCS_BY_NAME[name] = aClass
62
- end
63
- end
64
-
65
- OPTIONS = {}
66
-
67
- OPTS = OptionParser.new do |opts|
68
-
69
- opts.banner = "Usage: #{VCS} [options] <file>*"
70
- opts.separator ''
71
-
72
- opts.on('-c', '--vcs TYPE', ALL_VCS_NAMES, 'Set your vcs') do |aVcs|
73
- OPTIONS[:vcs_type] = aVcs
74
- end
75
-
76
- opts.on('-l', '--vcs-list', 'List all vcs') do |aVcs|
77
- STDERR.puts 'Vcs list:'
78
- ALL_VCS_NAMES.each { |n| STDERR.puts " - #{n}" }
79
- exit
80
- end
81
-
82
- opts.on('--mk-alias', 'Put the result of this command in your .zshrc or .bashrc') do
83
- ALL_VCS_NAMES.each do |n|
84
- n = n.to_s.downcase
85
- if VCS_PATH.executable?
86
- puts "alias #{n}=#{VCS_PATH}-#{n} ;"
87
- else
88
- puts "alias #{n}=vcs-#{n} ;"
89
- end
90
- end
91
- exit
92
- end
93
-
94
- opts.on('-C', '--[no-]check', 'Check your vcs configuration') do |check|
95
- if check
96
- Vcs.new('vcs').call_conf_checkers
97
- exit
98
- end
99
- end
100
-
101
- opts.on('-d', '--debug LEVEL', 'Set debug level') do |severity|
102
- LOG.level = Logger.const_get(severity.upcase)
103
- end
104
-
105
- opts.on_tail('-h', '--help', 'Show this message') do |test|
106
- STDERR.puts OPTS
107
- STDERR.puts "\n\nReport bugs to <ertai@lrde.epita.fr>."
108
- exit
109
- end
110
-
111
- opts.on_tail('--version', 'Show version') do
112
- STDOUT.puts "Vcs version: #{VCS_VERSION}"
113
- exit
114
- end
115
-
116
- end
117
-
118
- ENV['LC_ALL'] = 'C'
119
- if ENV.has_key? 'FULLNAME'
120
- FULLNAME = ENV['FULLNAME']
121
- else
122
- require 'etc'
123
- ENV['FULLNAME'] = (Etc.getpwnam ENV['USER']).gecos
124
- LOG.warn "Need FULLNAME in the environement (default: #{ENV['FULLNAME']})"
125
- end
126
- env = %w[ EMAIL FULLNAME EDITOR PAGER ]
127
- if env.all? { |s| ENV[s] }
128
- EDITOR = ENV['EDITOR'].to_cmd
129
- PAGER = ENV['PAGER'].to_cmd
130
- EMAIL = ENV['EMAIL']
131
- else
132
- env.each { |s| LOG.error "Need #{s} in the environement" unless ENV[s] }
133
- exit
134
- end
135
- FULL_EMAIL = "#{FULLNAME} <#{EMAIL}>"
136
-
137
- def main
138
- vcs = nil
139
- begin
140
- OPTS.parse!(ARGV)
141
- unless OPTIONS.has_key? :vcs_type
142
- STDERR.puts OPTS
143
- STDERR.puts "\nSpecify at least a Vcs type, or use a wrapped command\n" +
144
- 'like svn, cvs, prcs in the vcs bin directory.'
145
- exit
146
- end
147
- vcs = ALL_VCS_BY_NAME[OPTIONS[:vcs_type]].new
148
-
149
- if ARGV.empty?
150
- meth = :help!
151
- else
152
- meth = ARGV.shift.sub(/([^!])$/, '\1!')
153
- end
154
-
155
- vcs.send(meth, *ARGV)
156
-
157
- rescue Exception
158
- vcs.call_handlers unless vcs.nil?
159
- LOG.debug { raise }
160
- LOG.error $!.to_s.sub(/\.$/, '') unless $!.to_s == 'exit'
161
- end
162
- end
163
-
164
- main()
9
+ VcsApp.new(__FILE__).run
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
- # Author: Nicolas Pouillard <ertai@lrde.epita.fr>.
3
- # Copyright: Copyright (c) 2004 LRDE. All rights reserved.
4
- # License: GNU General Public License (GPL).
2
+ # Author:: Nicolas Pouillard <ertai@lrde.epita.fr>.
3
+ # Copyright:: Copyright (c) 2004 LRDE. All rights reserved.
4
+ # License:: GNU General Public License (GPL).
5
+ # Revision:: $Id: header 98 2004-09-29 12:07:43Z ertai $
5
6
 
6
- # $LastChangedBy: ertai $
7
- # $Id: header 98 2004-09-29 12:07:43Z ertai $
7
+ require File.join(File.dirname(__FILE__), '..', 'lib', 'vcs', 'app') unless defined? VcsApp
8
8
 
9
- VCS='Cvs'
10
- exec("vcs --vcs #{VCS} -- '#{ARGV.join(%q[' '])}'")
9
+ VcsApp.new(__FILE__, :cvs).run