seydar  committed 3f18dfb

working on getting this bug fixed

  • Participants
  • Parent commits cec721e

Comments (0)

Files changed (4)

   b.success do
+    # This here seems to be triggering a DelayedOpener, which the Hg version
+    # doesn't... That should probably be fixed.
     repo.update 'default'
     repo[nil].branch == 'default' # repo[nil] is the working directory's changeset
 $cl ||= false
+# This is motherfucking tyranny.
+# STDERR.p is PRIVATE??!?!
+# What. The. Fuck.
+# That is not just wrong, but it is vile and dehumanizing.
+# I'm doing this to take a stand. To let the world know that
+# I will not just sit quietly as STDERR.p is private.
+# Because I hate reddit (though I spend an inordinante amount of time of the site),
+# I won't just say "FUUUUUUUUUUUUCKKKKKKK YOUUUUUUUUUUU" to some person or organization.
+# Hate the player, not the game.
+# Be polite, be professional, and have a plan to kill everyone you meet.
+# But believe you me, I WILL be looking through the Ruby source code to find out
+# who did this. I will then get their address. I will then let them know that I
+# think STDERR.p should be public. And they will know fear.
+def STDERR.p(*args)
+ {|a| STDERR.puts a.inspect }
+# All better now!
 require "amp/support/loaders.rb"

File lib/amp/repository/mercurial/repo_format/store.rb

+                STDERR.puts [path, Stores.hybrid_encode(path)].inspect
       , mode, &block)
               rescue Errno::ENOENT

File lib/amp/repository/mercurial/revlogs/revlog.rb

       # Loads a block of data into the cache. 
       def load_cache(data_file, start, cache_length)
+        STDERR.p data_file
         if data_file.nil?
           data_file = open(@index_file) if @index.inline?
           data_file = open(@data_file)  unless @index.inline?
       # file). Just give it a revision index and which data file to use
       # @param  [Fixnum] rev the revision index to extract
-      # @param  [IO] data_file The IO file descriptor for loading data
+      # @param  [IO, NilClass] data_file The IO file descriptor for loading data
       # @return [String] the raw data from the index (posssibly compressed)
       def get_chunk(rev, data_file = nil)
           start, length = self.data_start_for_index(rev), self[rev].compressed_len
-        rescue
+        rescue => e
           Amp::UI.debug "Failed get_chunk: #{@index_file}:#{rev}"
-          raise
+          raise e
         start += ((rev + 1) * @index.entry_size) if @index.inline?
           text = @index.cache[2]
           # load the index if we're lazy (base, rev + 1)
+        STDERR.p !(@index.inline?), rev > base + 1
         data_file = open(@data_file) if !(@index.inline?) && rev > base + 1
+        STDERR.p [base, data_file, text]
         text = get_chunk(base, data_file) if text.nil?
         bins = []
         (base + 1).upto(rev) {|r| bins << get_chunk(r, data_file)}
       # TODO
       # FIXME
+      # Why hasn't this been finished we should get on that
       def check_inline_size(tr, fp=nil)
         return unless @index.inline?
         if fp.nil?