Issue #7 resolved

Amp diff fails when a file is removed in the working directory

carbonica
repo owner created an issue

Running amp diff will fail if you have run amp remove on a file in the working directory. This is in an hg repository.

The versioned_file class expects the file to exist, and attempts to read its contents in to do a diff, and errors out with a ENOENT.

/Users/michaeledgar/mygems/amp/lib/amp/support/openers.rb:119:in initialize': No such file or directory - /Users/michaeledgar/mygems/amp/lib/amp/help/entries/mdtest.md (Errno::ENOENT) from /Users/michaeledgar/mygems/amp/lib/amp/support/openers.rb:119:inopen' from /Users/michaeledgar/mygems/amp/lib/amp/support/openers.rb:119:in open_up_file' from /Users/michaeledgar/mygems/amp/lib/amp/support/openers.rb:107:inopen_file' from /Users/michaeledgar/mygems/amp/lib/amp/support/openers.rb:71:in open' from /Users/michaeledgar/mygems/amp/lib/amp/repository/mercurial/repositories/local_repository.rb:286:inworking_read' from /Users/michaeledgar/mygems/amp/lib/amp/repository/mercurial/revlogs/versioned_file.rb:532:in data' from /Users/michaeledgar/mygems/amp/lib/amp/repository/abstract/common_methods/versioned_file.rb:17:inunified_diff_with' from /Users/michaeledgar/mygems/amp/lib/amp/commands/commands/workflows/hg/diff.rb:20 from /Users/michaeledgar/mygems/amp/lib/amp/commands/commands/workflows/hg/diff.rb:17:in each' from /Users/michaeledgar/mygems/amp/lib/amp/commands/commands/workflows/hg/diff.rb:17 from /Users/michaeledgar/mygems/amp/lib/amp/commands/command.rb:463:in[]' from /Users/michaeledgar/mygems/amp/lib/amp/commands/command.rb:463:in run' from /Users/michaeledgar/mygems/amp/lib/amp/commands/dispatch.rb:120:inrun' from /Users/michaeledgar/mygems/amp/bin/amp:30

Comments (2)

  1. Log in to comment