diff --git a/lib/multirepo/files/lock-entry.rb b/lib/multirepo/files/lock-entry.rb
index <HASH>..<HASH> 100644
--- a/lib/multirepo/files/lock-entry.rb
+++ b/lib/multirepo/files/lock-entry.rb
@@ -6,6 +6,10 @@ module MultiRepo
     attr_accessor :folder_name
     attr_accessor :head_hash
     
+    def to_s
+      "#{@folder_name} #{@head_hash}"
+    end
+    
     def initialize(*args)
       if args.length == 1
         self.initialize_with_repo(*args)
diff --git a/lib/multirepo/files/lock-file.rb b/lib/multirepo/files/lock-file.rb
index <HASH>..<HASH> 100644
--- a/lib/multirepo/files/lock-file.rb
+++ b/lib/multirepo/files/lock-file.rb
@@ -22,12 +22,12 @@ module MultiRepo
     end
     
     def self.update
-      repos = ConfigFile.load_entries.map{ |e| e.repo }
+      repos = ConfigFile.load_entries.map { |e| e.repo }
+      lock_entries = repos.map { |r| LockEntry.new(r) }
       
       FILE.open("w") do |f|
-        repos.each do |r|
-          entry_string = "#{r.working_copy_basename} #{r.head_hash}"
-          f.puts(entry_string)
+        lock_entries.each do |lock_entry|
+          f.puts(lock_entry.to_s)
         end
       end
     end
Refactored lock file updating.