Class: Svn

Inherits:
Vcs
  • Object
show all
Defined in:
lib/vcs/diff.rb,
lib/vcs/svn.rb,
lib/vcs/url.rb,
lib/vcs/status.rb,
lib/vcs/message.rb,
lib/vcs/revision.rb,
lib/vcs/changelog.rb,
lib/vcs/last_changed_date.rb

Overview

Author

Nicolas Pouillard <[email protected]>.

Copyright

Copyright © 2004 LRDE. All rights reserved.

License

GNU General Public License (GPL).

Revision

$Id$

Defined Under Namespace

Classes: Failure

Constant Summary collapse

@@file_st =
{
  'A' => 'New',
  'D' => 'Remove',
}
@@prop_st =
{
  'M' => 'Changed property'
}

Constants inherited from Vcs

Vcs::COMMITED, Vcs::DEFAULT_OPTIONS, Vcs::MAIL, Vcs::MAILER, Vcs::NEWS

Instance Attribute Summary

Attributes inherited from Vcs

#cmd_data

Instance Method Summary collapse

Methods inherited from Vcs

add_basic_method, add_conf_checker, alias_command, #call_conf_checkers, #call_handlers, #changelog_failed, #check_diffstat, #cmd_data_factory, #cmd_data_factory=, #commit_failed, #common_commit!, #concat_changelog!, #diffstat!, #edit!, #edit_conflicts!, #error_handling, #help!, #mail!, #mail_conf_checker, #mail_failed, #message, #message_failed, #method_missing, #mk_conflicts_list, #mkchangelog!, #news!, #news_conf_checker, #news_failed, #puts, #resolve_conflicts!, #run, #run!, #run_missing!, #script!, #sub_vcs, #sub_vcs_with_name, #with

Constructor Details

#initialize(aCmd = 'svn') ⇒ Svn

Returns a new instance of Svn.



20
21
22
# File 'lib/vcs/svn.rb', line 20

def initialize ( aCmd='svn' )
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Vcs

Instance Method Details

#diffw!(*args) ⇒ Object



18
19
20
# File 'lib/vcs/message.rb', line 18

def diffw! ( *args )
  diff! '--diff-cmd', 'diff', '-x', '-NPbuw', *args
end

#diffw_from_status!(*args) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/vcs/diff.rb', line 8

def diffw_from_status! ( *args )
  files = Set.new
  from_status(*args) do |line, file_st, prop_st, cpy, file|
    next if file_st =~ /[?X]/
    next if file == 'ChangeLog'
    files << Pathname.new(file)
  end
  diffw!(*files.delete_if { |f| f.directory? })
end

#last_changed_date!(*args) ⇒ Object



10
11
12
# File 'lib/vcs/last_changed_date.rb', line 10

def last_changed_date! ( *args )
  puts info.read[/^Last Changed Date:.*?\(([^)]*)\).*$/, 1]
end

#revision!(*args) ⇒ Object



12
13
14
# File 'lib/vcs/revision.rb', line 12

def revision! ( *args )
  puts info.read[/^Revision:\s+(\d+)/, 1]
end

#url!(*args) ⇒ Object



10
11
12
# File 'lib/vcs/url.rb', line 10

def url! ( *args )
  puts info.read[/^URL:\s+(.*)$/, 1]
end