Mercurial > hg > soundsoftware-site
diff lib/redmine/scm/adapters/bazaar_adapter.rb @ 117:af80e5618e9b redmine-1.1
* Update to Redmine 1.1-stable branch (Redmine SVN rev 4707)
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 12:53:21 +0000 |
parents | 513646585e45 |
children | 0579821a129a |
line wrap: on
line diff
--- a/lib/redmine/scm/adapters/bazaar_adapter.rb Fri Nov 19 14:05:24 2010 +0000 +++ b/lib/redmine/scm/adapters/bazaar_adapter.rb Thu Jan 13 12:53:21 2011 +0000 @@ -74,10 +74,10 @@ def revisions(path=nil, identifier_from=nil, identifier_to=nil, options={}) path ||= '' - identifier_from = 'last:1' unless identifier_from and identifier_from.to_i > 0 - identifier_to = 1 unless identifier_to and identifier_to.to_i > 0 + identifier_from = (identifier_from and identifier_from.to_i > 0) ? identifier_from.to_i : 'last:1' + identifier_to = (identifier_to and identifier_to.to_i > 0) ? identifier_to.to_i : 1 revisions = Revisions.new - cmd = "#{BZR_BIN} log -v --show-ids -r#{identifier_to.to_i}..#{identifier_from} #{target(path)}" + cmd = "#{BZR_BIN} log -v --show-ids -r#{identifier_to}..#{identifier_from} #{target(path)}" shellout(cmd) do |io| revision = nil parsing = nil @@ -140,6 +140,9 @@ else identifier_to = identifier_from.to_i - 1 end + if identifier_from + identifier_from = identifier_from.to_i + end cmd = "#{BZR_BIN} diff -r#{identifier_to}..#{identifier_from} #{target(path)}" diff = [] shellout(cmd) do |io|