Skip to content

Commit

Permalink
Fixes empty log file to be empty xml file.
Browse files Browse the repository at this point in the history
  • Loading branch information
amujumdar committed Aug 3, 2011
1 parent 0efa486 commit 79dc903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/scm/adapters/bzr/commits.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def open_log_file(opts={})
if after == head_token # There are no new commits
# As a time optimization, just create an empty
# file rather than fetch a log we know will be empty.
File.open(log_filename, 'w') { }
File.open(log_filename, 'w') { |f| f.puts '<?xml version="1.0"?>' }
else
run "#{rev_list_command(opts)} -v > #{log_filename}"
end
Expand Down

0 comments on commit 79dc903

Please sign in to comment.