1. carbonica
  2. amp

Commits

seydar  committed e313fb7

working on fixing a bug in update

  • Participants
  • Parent commits 2efdeb0
  • Branches default

Comments (0)

Files changed (7)

File TODO.markdown

View file
 to alleviate any pains. But be apprised: we have yet to feel any pains from it.
 
 # Random Complaints
-The standards for committing are ridiculous. They are so unfriendly to human or
+The standards for committing are ridiculous. They are so unfriendly to human and
 machine.
 
 The nomenclature for files and their statuses is absurd. It changes all over the
 
 Comments don't explain why a method does something.
 
-Committing is fucking insane.
+Committing is fucking insane.

File bugs/22.rb

View file
   dir  = "test_#{rand(1000)}"
   repo = nil # scoping
   
-  b.number  22
+  b.number 22
   
   # hint, because the functionality isn't there
-  b.desc    "`amp update` fails to switch between branches"
+  b.desc   "`amp update` fails to switch between branches"
   
   b.setup do
     # Create the repo
   end
   
   b.success do
-    repo.update 'default'
-    repo[nil].branch == 'default' # repo[nil] is the working directory's changeset
+    begin
+      repo.update 'default'
+      repo[nil].branch == 'default' # repo[nil] is the working directory's changeset
+    rescue
+      false
+    end
   end
   
   b.cleanup { FileUtils.rm_rf Dir['test_*'] } # destory all similar looking dirs

File bugs/23.rb

View file
   dir  = "test_#{rand(1000)}"
   repo = nil # scoping
   
-  b.number  23
-  
-  b.desc    "`amp update` fails to replay uncommitted changes"
+  b.number 23
+           
+  b.desc   "`amp update` fails to replay uncommitted changes"
   
   b.setup do
     repo = Amp::Repositories::Mercurial::LocalRepository.new dir, true # Create the repo

File bugs/24.rb

View file
   dir  = "test_#{rand(1000)}"
   repo = nil # scoping
   
-  b.number  23
-  
-  b.desc    "Unable to change branches"
+  b.number 23
+           
+  b.desc   "Unable to change branches"
   
   b.setup do
     repo = Amp::Repositories::Mercurial::LocalRepository.new dir, true # Create the repo

File lib/amp/extensions/bugs.rb

View file
     c.on_run do |o, a|
       a.each {|bug| load "bugs/#{bug}.rb" }
       
+      # default to loading all
+      if a.empty?
+        Dir['bugs/*.rb'].map {|f| load f }
+      end
+      
       # hide output
       if o[:stfu]
         # just fyi, it'd be more efficient to create a "bottomless pit"

File lib/amp/repository/mercurial/repositories/local_repository.rb

View file
         def changelog
           return @changelog if @changelog
           
+          p ['>>>>>>>>>>', @store.opener.class]
           @changelog = Amp::Mercurial::ChangeLog.new @store.opener
           
           if path = ENV['HG_PENDING']

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

View file
       # and start saving any new info to memory/other files. Used when the
       # changelog has to be the last file saved.
       def delay_update
+        p [';;;;;;;', @opener.class]
         @_real_opener = @opener
         @opener = DelayedOpener.new(@_real_opener, self) # Our fake Opener
         @delay_count = self.size