vcs 0.2.148 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/AUTHORS +6 -0
- data/NEWS +9 -0
- data/README +82 -0
- data/Rakefile +7 -72
- data/SPEC.dyn.yml +10 -0
- data/SPEC.gemspec +14 -0
- data/SPEC.yml +39 -0
- data/bin/vcs +18 -16
- data/lib/vcs/changelog.rb +164 -0
- data/lib/vcs/conflict.rb +21 -0
- data/{src → lib/vcs}/cvs.rb +1 -1
- data/{src → lib/vcs}/diff.rb +2 -2
- data/lib/vcs/diffstat.rb +28 -0
- data/lib/vcs/edit.rb +16 -0
- data/{src → lib/vcs}/last_changed_date.rb +3 -5
- data/{src → lib/vcs}/mail.rb +4 -4
- data/lib/vcs/message.rb +79 -0
- data/{src → lib/vcs}/mycommit.rb +15 -15
- data/{src → lib/vcs}/news.rb +6 -6
- data/{src → lib/vcs}/prcs.rb +1 -1
- data/{src → lib/vcs}/revision.rb +3 -4
- data/lib/vcs/script.rb +19 -0
- data/{src → lib/vcs}/status.rb +1 -1
- data/{src → lib/vcs}/svn.rb +3 -5
- data/lib/vcs/url.rb +16 -0
- data/lib/vcs/vcs.rb +279 -0
- metadata +52 -150
- data/TODO +0 -19
- data/doc/jamis.rb +0 -564
- data/ruby_ex/abstract.rb +0 -254
- data/ruby_ex/abstract_node.rb +0 -85
- data/ruby_ex/algorithms/simulated_annealing.rb +0 -140
- data/ruby_ex/array_each_pair.rb +0 -18
- data/ruby_ex/ask.rb +0 -101
- data/ruby_ex/attributed_class.rb +0 -302
- data/ruby_ex/cache.rb +0 -373
- data/ruby_ex/checkout.rb +0 -12
- data/ruby_ex/choose.rb +0 -271
- data/ruby_ex/commands.rb +0 -18
- data/ruby_ex/commands/command.rb +0 -401
- data/ruby_ex/commands/datas.rb +0 -16
- data/ruby_ex/commands/datas/data.rb +0 -33
- data/ruby_ex/commands/datas/factory.rb +0 -66
- data/ruby_ex/commands/factory.rb +0 -66
- data/ruby_ex/commands/helpers.rb +0 -67
- data/ruby_ex/commands/pipe.rb +0 -64
- data/ruby_ex/commands/runners.rb +0 -17
- data/ruby_ex/commands/runners/exec.rb +0 -49
- data/ruby_ex/commands/runners/fork.rb +0 -97
- data/ruby_ex/commands/runners/runner.rb +0 -107
- data/ruby_ex/commands/seq.rb +0 -27
- data/ruby_ex/config_file.rb +0 -96
- data/ruby_ex/const_regexp.rb +0 -59
- data/ruby_ex/daemon.rb +0 -134
- data/ruby_ex/diff.rb +0 -667
- data/ruby_ex/dlogger.rb +0 -62
- data/ruby_ex/drb/dispatcher.rb +0 -252
- data/ruby_ex/drb/dispatcher_server_test.rb +0 -29
- data/ruby_ex/drb/drb_observable.rb +0 -97
- data/ruby_ex/drb/drb_observable_pool.rb +0 -27
- data/ruby_ex/drb/drb_service.rb +0 -43
- data/ruby_ex/drb/drb_undumped_attributes.rb +0 -55
- data/ruby_ex/drb/drb_undumped_indexed_object.rb +0 -54
- data/ruby_ex/drb/insecure_protected_methods.rb +0 -103
- data/ruby_ex/drb/session_client_test.rb +0 -40
- data/ruby_ex/drb/session_manager.rb +0 -246
- data/ruby_ex/drb/session_server.rb +0 -53
- data/ruby_ex/dtime.rb +0 -143
- data/ruby_ex/dumpable_proc.rb +0 -63
- data/ruby_ex/exception.rb +0 -32
- data/ruby_ex/filetype.rb +0 -229
- data/ruby_ex/fileutils_ex.rb +0 -44
- data/ruby_ex/fold.rb +0 -58
- data/ruby_ex/generate_id.rb +0 -44
- data/ruby_ex/hookable.rb +0 -262
- data/ruby_ex/hooker.rb +0 -54
- data/ruby_ex/inactive_timeout.rb +0 -137
- data/ruby_ex/indexed_node.rb +0 -66
- data/ruby_ex/io_marshal.rb +0 -100
- data/ruby_ex/ioo.rb +0 -194
- data/ruby_ex/labeled_node.rb +0 -63
- data/ruby_ex/logger_observer.rb +0 -23
- data/ruby_ex/md5sum.rb +0 -66
- data/ruby_ex/mktemp.rb +0 -208
- data/ruby_ex/module/attr_once.rb +0 -36
- data/ruby_ex/module/autoload_tree.rb +0 -75
- data/ruby_ex/module/hierarchy.rb +0 -335
- data/ruby_ex/module/instance_method_visibility.rb +0 -73
- data/ruby_ex/module_ex.rb +0 -11
- data/ruby_ex/node.rb +0 -80
- data/ruby_ex/object_monitor.rb +0 -145
- data/ruby_ex/object_monitor_activity.rb +0 -33
- data/ruby_ex/observable.rb +0 -140
- data/ruby_ex/observable_pool.rb +0 -293
- data/ruby_ex/orderedhash.rb +0 -252
- data/ruby_ex/pathname_ex.rb +0 -152
- data/ruby_ex/pp_hierarchy.rb +0 -29
- data/ruby_ex/pseudo_cache.rb +0 -190
- data/ruby_ex/queue.rb +0 -56
- data/ruby_ex/random_generators.rb +0 -25
- data/ruby_ex/random_generators/random_generator.rb +0 -31
- data/ruby_ex/random_generators/ruby.rb +0 -23
- data/ruby_ex/safe_eval.rb +0 -348
- data/ruby_ex/sendmail.rb +0 -215
- data/ruby_ex/service_manager.rb +0 -121
- data/ruby_ex/session/administrable.rb +0 -120
- data/ruby_ex/session/client.rb +0 -153
- data/ruby_ex/session/const.rb +0 -18
- data/ruby_ex/session/dispatcher.rb +0 -184
- data/ruby_ex/session/error.rb +0 -21
- data/ruby_ex/session/fetchable.rb +0 -57
- data/ruby_ex/session/fetcher.rb +0 -62
- data/ruby_ex/session/hookable.rb +0 -26
- data/ruby_ex/session/profile.rb +0 -110
- data/ruby_ex/session/server.rb +0 -582
- data/ruby_ex/session/test/administrable_test.rb +0 -337
- data/ruby_ex/session/test/basic_test.rb +0 -523
- data/ruby_ex/session/test/dispatcher_test.rb +0 -409
- data/ruby_ex/session/test/fetchable_test.rb +0 -119
- data/ruby_ex/session/test/sub_server_test.rb +0 -188
- data/ruby_ex/shuffle.rb +0 -30
- data/ruby_ex/spring.rb +0 -136
- data/ruby_ex/spring_set.rb +0 -137
- data/ruby_ex/string_ex.rb +0 -28
- data/ruby_ex/symtbl.rb +0 -106
- data/ruby_ex/synflow.rb +0 -474
- data/ruby_ex/test/unit/ui/yaml/testrunner.rb +0 -164
- data/ruby_ex/thread_mutex.rb +0 -10
- data/ruby_ex/timeout_ex.rb +0 -81
- data/ruby_ex/top_down.rb +0 -73
- data/ruby_ex/trace.rb +0 -26
- data/ruby_ex/uri/druby.rb +0 -81
- data/ruby_ex/uri/file.rb +0 -65
- data/ruby_ex/uri/ftp_ex.rb +0 -37
- data/ruby_ex/uri/http_ex.rb +0 -43
- data/ruby_ex/uri/ssh.rb +0 -92
- data/ruby_ex/uri/svn.rb +0 -118
- data/ruby_ex/uri_ex.rb +0 -45
- data/ruby_ex/verbose_object.rb +0 -30
- data/ruby_ex/version.rb +0 -66
- data/ruby_ex/yaml/basenode_ext.rb +0 -63
- data/ruby_ex/yaml/chop_header.rb +0 -23
- data/ruby_ex/yaml/transform.rb +0 -449
- data/ruby_ex/yaml/yregexpath.rb +0 -76
- data/src/ask.rb +0 -101
- data/src/changelog.rb +0 -117
- data/src/conflict.rb +0 -20
- data/src/diffstat.rb +0 -42
- data/src/message.rb +0 -64
- data/src/reply-mail.rb +0 -14
- data/src/tools.rb +0 -22
- data/src/vcs.rb +0 -176
data/lib/vcs/conflict.rb
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
class Vcs
|
|
2
|
+
|
|
3
|
+
def mk_conflicts_list
|
|
4
|
+
ls = status.output.readlines.grep(/^C/).map! { |s| s[/^C\s+(.*)/, 1] }
|
|
5
|
+
raise "no conflicts" if ls.empty?
|
|
6
|
+
ls
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def edit_conflicts!
|
|
10
|
+
edit! mk_conflicts_list
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def resolve_conflicts!
|
|
14
|
+
conflicts = mk_conflicts_list
|
|
15
|
+
question = "Resolve these conflicts?: \n - #{conflicts.join("\n - ")}\n(y/n)"
|
|
16
|
+
if @h.agree question, true
|
|
17
|
+
return resolved(conflicts)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end # class Vcs
|
data/{src → lib/vcs}/cvs.rb
RENAMED
data/{src → lib/vcs}/diff.rb
RENAMED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
class Svn
|
|
7
7
|
|
|
8
|
-
def diffw_from_status ( *args )
|
|
8
|
+
def diffw_from_status! ( *args )
|
|
9
9
|
files = Set.new
|
|
10
10
|
from_status(*args) do |line, file_st, prop_st, cpy, file|
|
|
11
11
|
next if file_st =~ /[?X]/
|
|
12
12
|
next if file == 'ChangeLog'
|
|
13
13
|
files << Pathname.new(file)
|
|
14
14
|
end
|
|
15
|
-
diffw(*files.delete_if { |f| f.directory? })
|
|
15
|
+
diffw!(*files.delete_if { |f| f.directory? })
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
end # class Svn
|
data/lib/vcs/diffstat.rb
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Author:: Nicolas Pouillard <ertai@lrde.epita.fr>.
|
|
2
|
+
# Copyright:: Copyright (c) 2004 LRDE. All rights reserved.
|
|
3
|
+
# License:: GNU General Public License (GPL).
|
|
4
|
+
# Revision:: $Id$
|
|
5
|
+
|
|
6
|
+
require 'vcs/vcs'
|
|
7
|
+
|
|
8
|
+
class Vcs
|
|
9
|
+
@@diffstat = 'diffstat'.to_cmd
|
|
10
|
+
|
|
11
|
+
# Use the diffstat command to
|
|
12
|
+
# display statitics on your patch.
|
|
13
|
+
def diffstat! ( *a )
|
|
14
|
+
check_diffstat
|
|
15
|
+
(diff(*a) | @@diffstat).run(@runner)
|
|
16
|
+
end
|
|
17
|
+
alias_command :ds, :diffstat
|
|
18
|
+
|
|
19
|
+
def check_diffstat
|
|
20
|
+
unless `diffstat -V` =~ /diffstat version/
|
|
21
|
+
raise ArgumentError, 'The `diffstat\' tool is needed by Vcs.diffstat'
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
add_conf_checker :check_diffstat
|
|
26
|
+
|
|
27
|
+
end # class Vcs
|
|
28
|
+
|
data/lib/vcs/edit.rb
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Author:: Nicolas Pouillard <ertai@lrde.epita.fr>.
|
|
2
|
+
# Copyright:: Copyright (c) 2004 LRDE. All rights reserved.
|
|
3
|
+
# License:: GNU General Public License (GPL).
|
|
4
|
+
# Revision:: $Id: edit.rb 225 2005-09-16 14:09:22Z pouill_n $
|
|
5
|
+
|
|
6
|
+
require 'vcs/vcs'
|
|
7
|
+
|
|
8
|
+
class Vcs
|
|
9
|
+
|
|
10
|
+
def edit! ( *files )
|
|
11
|
+
# stringify
|
|
12
|
+
cmd = EDITOR + files.flatten.map { |x| x.to_s } > [STDOUT, STDERR]
|
|
13
|
+
cmd.run(@runner)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
end # class Vcs
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
# License:: GNU General Public License (GPL).
|
|
4
4
|
# $Id$
|
|
5
5
|
|
|
6
|
-
require 'svn'
|
|
7
|
-
require 'stringio'
|
|
6
|
+
require 'vcs/svn'
|
|
8
7
|
|
|
9
8
|
class Svn
|
|
10
9
|
|
|
11
|
-
def last_changed_date ( *args )
|
|
12
|
-
|
|
13
|
-
StringIO.new(info.readlines.grep(/^Last Changed Date:/).first.sub(re, '\1'))
|
|
10
|
+
def last_changed_date! ( *args )
|
|
11
|
+
puts info.read[/^Last Changed Date:.*?\(([^)]*)\).*$/, 1]
|
|
14
12
|
end
|
|
15
13
|
|
|
16
14
|
alias_command :date, :last_changed_date
|
data/{src → lib/vcs}/mail.rb
RENAMED
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
# License:: GNU General Public License (GPL).
|
|
4
4
|
# Revision:: $Id: header 98 2004-09-29 12:07:43Z ertai $
|
|
5
5
|
|
|
6
|
-
require 'vcs'
|
|
6
|
+
require 'vcs/vcs'
|
|
7
7
|
require 'sendmail'
|
|
8
8
|
|
|
9
9
|
class Vcs
|
|
10
10
|
|
|
11
11
|
MAIL = Sendmail::MAIL_FILE
|
|
12
12
|
MAILER = Sendmail.new
|
|
13
|
-
DEFAULT_OPTIONS = %w[ --
|
|
13
|
+
DEFAULT_OPTIONS = %w[ --confirm --sign --mime ]
|
|
14
14
|
|
|
15
15
|
#
|
|
16
16
|
# Mail.
|
|
17
17
|
#
|
|
18
|
-
def mail ( *args )
|
|
18
|
+
def mail! ( *args )
|
|
19
19
|
error_handling :mail_failed
|
|
20
20
|
unless MAIL.exist?
|
|
21
21
|
print_body(MAIL, MAILER.parse_mail_options(*(DEFAULT_OPTIONS + args)))
|
|
22
22
|
end
|
|
23
23
|
MAILER.sendmail
|
|
24
24
|
MAIL.delete
|
|
25
|
-
|
|
25
|
+
puts 'Mail: Sent.'
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def mail_failed
|
data/lib/vcs/message.rb
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Author:: Nicolas Pouillard <ertai@lrde.epita.fr>.
|
|
2
|
+
# Copyright:: Copyright (c) 2004 LRDE. All rights reserved.
|
|
3
|
+
# License:: GNU General Public License (GPL).
|
|
4
|
+
|
|
5
|
+
# $LastChangedBy: ertai $
|
|
6
|
+
# $Id: header 98 2004-09-29 12:07:43Z ertai $
|
|
7
|
+
|
|
8
|
+
require 'vcs/vcs'
|
|
9
|
+
require 'vcs/changelog'
|
|
10
|
+
|
|
11
|
+
class Vcs
|
|
12
|
+
def diffw! ( *args )
|
|
13
|
+
diff!(*args)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class Svn
|
|
18
|
+
def diffw! ( *args )
|
|
19
|
+
diff! '--diff-cmd', 'diff', '-x', '-NPbuw', *args
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
class Vcs
|
|
24
|
+
|
|
25
|
+
@@message = Pathname.new(',message')
|
|
26
|
+
|
|
27
|
+
def print_body ( file, options )
|
|
28
|
+
LOG.info "Creating a new `#{file}' file"
|
|
29
|
+
file.open('w') do |f|
|
|
30
|
+
f.puts options.to_yaml
|
|
31
|
+
f.puts '---'
|
|
32
|
+
f.puts
|
|
33
|
+
f.print message.read
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
private :print_body
|
|
37
|
+
|
|
38
|
+
def message ( *args )
|
|
39
|
+
error_handling :message_failed
|
|
40
|
+
|
|
41
|
+
unless @@message.exist?
|
|
42
|
+
cl_entry = mkchangelog(*args)
|
|
43
|
+
TempPath.new('message') do |tmp|
|
|
44
|
+
tmp.open('w') do |f|
|
|
45
|
+
with(f).url!
|
|
46
|
+
if defined? COLLABOA
|
|
47
|
+
f.puts
|
|
48
|
+
f.puts 'You can also view this changeset here:'
|
|
49
|
+
f.puts
|
|
50
|
+
next_rev = rev.output.read.to_i
|
|
51
|
+
next_rev += 1 unless ',commited'.to_path.exist?
|
|
52
|
+
f.puts "http://#{COLLABOA}/repository/changesets/#{next_rev}"
|
|
53
|
+
end
|
|
54
|
+
f.puts
|
|
55
|
+
f.puts 'Index: ChangeLog'
|
|
56
|
+
f.print cl_entry.sub(/^\d+-\d+-\d+/, 'from')
|
|
57
|
+
f.puts
|
|
58
|
+
with(f).diffstat!(*args)
|
|
59
|
+
f.puts
|
|
60
|
+
diffw_from_status(*args).each_line do |line|
|
|
61
|
+
f.print line if line !~ /^=+$/
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
tmp.mv(@@message)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
@@message.open('r')
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
alias_command :msg, :message
|
|
71
|
+
|
|
72
|
+
def message_failed
|
|
73
|
+
if @@message.exist?
|
|
74
|
+
LOG.info "#{@@message}: Contains the generated message"
|
|
75
|
+
LOG.info ' (the ChangeLog entry, the diffstat, the diff)'
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
end # class Vcs
|
data/{src → lib/vcs}/mycommit.rb
RENAMED
|
@@ -5,21 +5,18 @@
|
|
|
5
5
|
# $LastChangedBy: ertai $
|
|
6
6
|
# $Id: header 98 2004-09-29 12:07:43Z ertai $
|
|
7
7
|
|
|
8
|
-
require 'vcs'
|
|
9
|
-
require 'ask'
|
|
8
|
+
require 'vcs/vcs'
|
|
10
9
|
|
|
11
10
|
class Vcs
|
|
12
11
|
|
|
13
12
|
COMMITED = Pathname.new(',commited')
|
|
14
13
|
|
|
15
|
-
def
|
|
16
|
-
system(EDITOR, *files.map { |x| x.to_s })
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def common_commit! ( *args, &block )
|
|
14
|
+
def common_commit! ( subject_format, *args, &block )
|
|
20
15
|
|
|
21
16
|
opts, args = args.partition { |a| a =~ /^-/ }
|
|
22
17
|
|
|
18
|
+
@@subject_format = subject_format
|
|
19
|
+
|
|
23
20
|
update!
|
|
24
21
|
|
|
25
22
|
unless COMMITED.exist?
|
|
@@ -34,21 +31,24 @@ class Vcs
|
|
|
34
31
|
|
|
35
32
|
edit! @@message
|
|
36
33
|
|
|
37
|
-
|
|
34
|
+
unless @h.agree 'Committing, are you sure? (y/n)', true
|
|
38
35
|
commit_failed
|
|
39
36
|
end
|
|
40
37
|
|
|
41
|
-
concat_changelog!(*args)
|
|
38
|
+
cl_entry = concat_changelog!(*args)
|
|
42
39
|
|
|
43
40
|
#pager! diff
|
|
44
41
|
#pager! status
|
|
45
42
|
|
|
46
43
|
args << 'ChangeLog' unless args.grep(/^[^-]/).empty?
|
|
47
44
|
|
|
48
|
-
|
|
45
|
+
# FIXME simplify cl_entry contents
|
|
46
|
+
|
|
47
|
+
begin
|
|
48
|
+
commit!('--message', cl_entry, *(opts + args))
|
|
49
49
|
ADD_CL.rename(COMMITED)
|
|
50
50
|
TMP_CL.delete if TMP_CL.exist?
|
|
51
|
-
|
|
51
|
+
rescue
|
|
52
52
|
commit_failed
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -61,18 +61,18 @@ class Vcs
|
|
|
61
61
|
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
+
header ||= YAML::load(META.read)
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
block.call(rev) if block_given?
|
|
66
|
+
block[header['subject']] if block_given?
|
|
68
67
|
|
|
69
68
|
LOG.info 'Deleting junk files...'
|
|
70
69
|
TMP_CL.delete if TMP_CL.exist?
|
|
71
70
|
ADD_CL.delete if ADD_CL.exist?
|
|
72
71
|
COMMITED.delete if COMMITED.exist?
|
|
72
|
+
META.delete if META.exist?
|
|
73
73
|
messages = Pathname.new(',messages')
|
|
74
74
|
messages.mkpath unless messages.directory?
|
|
75
|
-
message_rev = messages + "#{@@message}.#{rev}"
|
|
75
|
+
message_rev = messages + "#{@@message}.#{header['rev']}"
|
|
76
76
|
LOG.info "Moving `#{@@message}' to `#{message_rev}'..."
|
|
77
77
|
@@message.rename(message_rev)
|
|
78
78
|
LOG.info "You can remove `#{message_rev}' if everything is ok."
|
data/{src → lib/vcs}/news.rb
RENAMED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
# $LastChangedBy: ertai $
|
|
6
6
|
# $Id: header 98 2004-09-29 12:07:43Z ertai $
|
|
7
7
|
|
|
8
|
-
require 'tools'
|
|
9
|
-
require 'message'
|
|
8
|
+
require 'vcs/tools'
|
|
9
|
+
require 'vcs/message'
|
|
10
10
|
|
|
11
11
|
class Vcs
|
|
12
12
|
|
|
@@ -59,7 +59,7 @@ class Vcs
|
|
|
59
59
|
#
|
|
60
60
|
# Post the news.
|
|
61
61
|
#
|
|
62
|
-
def news ( *args )
|
|
62
|
+
def news! ( *args )
|
|
63
63
|
error_handling :news_failed
|
|
64
64
|
|
|
65
65
|
print_body(NEWS, parse_news_options(*args)) unless NEWS.exist?
|
|
@@ -70,9 +70,9 @@ class Vcs
|
|
|
70
70
|
server, port = opt[:server].split(/:/)
|
|
71
71
|
port ||= 119
|
|
72
72
|
LOG.info('news') { "Nntp Server: #{server}:#{port}" }
|
|
73
|
-
|
|
73
|
+
unless @h.agree("Post a news, with this subject: #{opt[:subject]}\n" +
|
|
74
74
|
" to #{opt[:groups].join(', ')}\n from #{opt[:from]}\n" +
|
|
75
|
-
'Are you sure?',
|
|
75
|
+
'Are you sure? (y/n)', true)
|
|
76
76
|
LOG.error('news') { 'Aborting' }
|
|
77
77
|
exit
|
|
78
78
|
end
|
|
@@ -95,7 +95,7 @@ class Vcs
|
|
|
95
95
|
end
|
|
96
96
|
end
|
|
97
97
|
NEWS.delete
|
|
98
|
-
|
|
98
|
+
puts @news_status
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
def news_failed
|
data/{src → lib/vcs}/prcs.rb
RENAMED
data/{src → lib/vcs}/revision.rb
RENAMED
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
# $LastChangedBy: ertai $
|
|
6
6
|
# $Id: header 98 2004-09-29 12:07:43Z ertai $
|
|
7
7
|
|
|
8
|
-
require 'svn'
|
|
9
|
-
require 'stringio'
|
|
8
|
+
require 'vcs/svn'
|
|
10
9
|
|
|
11
10
|
class Svn
|
|
12
11
|
|
|
13
|
-
def revision ( *args )
|
|
14
|
-
|
|
12
|
+
def revision! ( *args )
|
|
13
|
+
puts info.read[/^Revision:\s+(\d+)/, 1]
|
|
15
14
|
end
|
|
16
15
|
|
|
17
16
|
alias_command :rev, :revision
|
data/lib/vcs/script.rb
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Author:: Nicolas Pouillard <ertai@lrde.epita.fr>.
|
|
2
|
+
# Copyright:: Copyright (c) 2005 LRDE. All rights reserved.
|
|
3
|
+
# License:: GNU General Public License (GPL).
|
|
4
|
+
# Revision:: $Id: script.rb 221 2005-07-07 14:41:23Z pouill_n $
|
|
5
|
+
|
|
6
|
+
require 'vcs/vcs'
|
|
7
|
+
|
|
8
|
+
class Vcs
|
|
9
|
+
|
|
10
|
+
def script! ( code, *args )
|
|
11
|
+
begin
|
|
12
|
+
eval(code)
|
|
13
|
+
rescue Exception => ex
|
|
14
|
+
LOG.error { 'Vcs#script: during the client execution' }
|
|
15
|
+
LOG.error { ex.long_pp }
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
end # class Svn
|
data/{src → lib/vcs}/status.rb
RENAMED
data/{src → lib/vcs}/svn.rb
RENAMED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
# $LastChangedBy: ertai $
|
|
6
6
|
# $Id: header 98 2004-09-29 12:07:43Z ertai $
|
|
7
7
|
|
|
8
|
-
require 'vcs'
|
|
9
|
-
require 'tools'
|
|
8
|
+
require 'vcs/vcs'
|
|
10
9
|
|
|
11
10
|
CL = Pathname.new('ChangeLog')
|
|
12
11
|
ADD_CL = Pathname.new(',ChangeLog')
|
|
13
12
|
TMP_CL = Pathname.new(',,ChangeLog')
|
|
13
|
+
META = Pathname.new(',meta')
|
|
14
14
|
|
|
15
15
|
class Svn < Vcs
|
|
16
16
|
|
|
@@ -21,11 +21,9 @@ class Svn < Vcs
|
|
|
21
21
|
super
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
%w[ blame cat cleanup copy export import list log merge mkdir move
|
|
24
|
+
%w[ blame cat cleanup copy export import list log merge mkdir move propedit
|
|
25
25
|
switch resolved revert info propdel propget proplist propset ].each do |m|
|
|
26
26
|
add_basic_method(m)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
add_basic_method!(:propedit)
|
|
30
|
-
|
|
31
29
|
end # class Svn
|
data/lib/vcs/url.rb
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Author:: Nicolas Pouillard <ertai@lrde.epita.fr>.
|
|
2
|
+
# Copyright:: Copyright (c) 2004 LRDE. All rights reserved.
|
|
3
|
+
# License:: GNU General Public License (GPL).
|
|
4
|
+
# Revision:: $Id: url.rb 221 2005-07-07 14:41:23Z pouill_n $
|
|
5
|
+
|
|
6
|
+
require 'vcs/svn'
|
|
7
|
+
|
|
8
|
+
class Svn
|
|
9
|
+
|
|
10
|
+
def url! ( *args )
|
|
11
|
+
puts info.read[/^URL:\s+(.*)$/, 1]
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
alias_command :date, :last_changed_date
|
|
15
|
+
|
|
16
|
+
end # class Svn
|