Generic spec manager class. Provides the base implementation for the list_specs() and spec_file() methods and a shorthand for the
update() method
new( type, root, p4t, p4u )
|
Constructor. Provide the type of spec ("client",
"label" etc.), the client root and tagged and noon-tagged P4
client instances.
# File specsaver.rb, line 251
def initialize( type, root, p4t, p4u )
@type = type
super( root, p4t, p4u )
end
Shorthand wrapper around SpecMgr#update()
# File specsaver.rb, line 259
def update( since )
super( @type, since )
end
Protected Instance methods |
Generate a list of all specs of the current type. The default
implementation just appends an "s" to the type name and uses that
as a P4 command. e.g. "p4 clients" etc. etc.
# File specsaver.rb, line 270
def list_specs
eval( }@p4t.run_#{@type}s} )
end
Map a spec type and name to a depot path where this spec will be archived.
# File specsaver.rb, line 278
def spec_file( spec )
@root + "/#{@type}s/" + type2name( @type, spec )
end
Provide a description for changelists and for stdout
# File specsaver.rb, line 285
def description
"Archive updated #{@type}s"
end