diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-09-16 06:21:06 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-09-16 06:21:06 +0000 |
commit | 036ba7a439f13c5eb110ee0d2663583ef31ee723 (patch) | |
tree | 7982c7ec64b6724df0a7e5f5e7096c4c9f54b4ed /lib/puppet | |
parent | 093963e60313f28afc95f829bce94d6096fba868 (diff) | |
download | puppet-036ba7a439f13c5eb110ee0d2663583ef31ee723.tar.gz puppet-036ba7a439f13c5eb110ee0d2663583ef31ee723.tar.xz puppet-036ba7a439f13c5eb110ee0d2663583ef31ee723.zip |
small fixing to merge(), and changing output of statechange
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@676 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/statechange.rb | 12 | ||||
-rw-r--r-- | lib/puppet/type.rb | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/puppet/statechange.rb b/lib/puppet/statechange.rb index 081ef395c..8bf77ff52 100644 --- a/lib/puppet/statechange.rb +++ b/lib/puppet/statechange.rb @@ -136,8 +136,16 @@ module Puppet #--------------------------------------------------------------- def to_s - return "%s: %s changed %s to %s" % - [@state.parent, @state.name, @state.is_to_s, @state.should_to_s] + if @state.is == :notfound + return "%s: defined '%s' as '%s'" % + [@state.parent, @state.name, @state.should_to_s] + elsif @state.should == :notfound + return "%s: undefined %s from '%s'" % + [@state.parent, @state.name, @state.is_to_s] + else + return "%s: %s changed '%s' to '%s'" % + [@state.parent, @state.name, @state.is_to_s, @state.should_to_s] + end end #--------------------------------------------------------------- end diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index 4f957a74e..4826686b4 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb @@ -688,7 +688,7 @@ class Type < Puppet::Element hash[self.namevar] || hash[self.namevar.to_s] # if the object already exists if retobj = self[name] - retobj.merge(self) + retobj.merge(hash) return retobj else |