Diff fails in modified working dir, works with hg
Reported by Ross Harvey | February 10th, 2010 @ 06:33 AM
I've installed amp on both Linux and Mac and in both cases it seems to largely work but won't diff mods against the head. It does seem to commit OK as hg will report a correct diff.
$ hg diff [ 572 lines of accurate unidiffs ]
OR
$ amp diff [ lots of blank lines, what's up with that? ]
Ejection system error
Couldn't find node for id "xm"
from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/amp-0.5.2/lib/amp/revlogs/revlog.rb:101:in `rev'
lots of traceback
BTW, I would recommend cleaning up the goofball or profane messages. These pretty much eliminate serious consideration for Amp in a corporate setting. Example: "Commit yo shit". It's really not very funny, even if one is in Jr. High School.
Comments and changes to this ticket
-

-

-

Ross Harvey February 10th, 2010 @ 10:20 PM
- Title changed from does amp even work? it can't even diff working directory mods to Diff fails in modified working dir, works with hg
Urk, sorry, I see it supports markdown, I should have used it...
-

seydar March 6th, 2010 @ 01:49 AM
- State changed from new to open
- Assigned user set to seydar
This is just to ping you. We should've seen this a while ago, but for some reason didn't. The reason is probably that Mike and I both got incredibly swamped and couldn't work on amp since like the start of the new year.
That said, I will look into this now.
That said, I am deeply saddened the profanity is not appreciated by others, especially because I'm pretty much 12.
but THANK YOU FOR LOOKING AT AMP IN THE FIRST PLACE! In the future, if it takes us longer than a day to update the ticket, send us an email (seydar or adgar @ carboni.ca) to remind us to.
- Ari
-

seydar March 6th, 2010 @ 01:52 AM
Strange, this is working for me. Granted, it is in a different diff format, and the time is messed up, but it's working and giving me an accurate diff. Could you try creating a fresh repository, reproduce it there, and report back how you did it?
-

Ross Harvey March 8th, 2010 @ 10:53 PM
Scriptable test
Wilco. Done... (this is on Mac OS X 10.6.2 (10C540)) I've done everything here at the shell/ed(1) level so it's easily entered. By the way, there is a newline at the end of file. That error is spurious as well.
Failure test case
Ross-Harveys-MacBook-Pro:~ ross$ mkdir r187test Ross-Harveys-MacBook-Pro:~ ross$ cd !$ cd r187test Ross-Harveys-MacBook-Pro:r187test ross$ cat > test class X def t; p 'hello'; end X end.new.t Ross-Harveys-MacBook-Pro:r187test ross$ amp init New repository initialized. Ross-Harveys-MacBook-Pro:r187test ross$ amp add test File test has been added at Mon Mar 08 14:42:38 -0800 2010 Ross-Harveys-MacBook-Pro:r187test ross$ amp commit -m 'initial version' status: test Ross-Harveys-MacBook-Pro:r187test ross$ amp diff Ross-Harveys-MacBook-Pro:r187test ross$ ed test 46 2s/hello/& world/ w 52 q Ross-Harveys-MacBook-Pro:r187test ross$ amp diff Changed file test at 1969-12-31 16:00:00.0 \ No newline at end of file Ross-Harveys-MacBook-Pro:r187test ross$ hg diff diff -r 85ccc1b514ca test --- a/test Mon Mar 08 14:42:50 2010 -0800 +++ b/test Mon Mar 08 14:43:35 2010 -0800 @@ -1,4 +1,4 @@ class X - def t; p 'hello'; end + def t; p 'hello world'; end X end.new.t Ross-Harveys-MacBook-Pro:r187test ross$ ruby --version ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin10] Ross-Harveys-MacBook-Pro:r187test ross$ amp --version Amp version 0.5.2 (John Locke) Ross-Harveys-MacBook-Pro:r187test ross$ hg --version Mercurial Distributed SCM (version 1.4.2) Copyright (C) 2005-2009 Matt Mackall <mpm@selenic.com> and others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Ross-Harveys-MacBook-Pro:r187test ross$ -

seydar March 8th, 2010 @ 11:52 PM
Thank you so much! I'll get on this as soon as I finish my math
homework. So that means I'll get on this tomorrow. -

seydar March 13th, 2010 @ 03:51 AM
- State changed from open to resolved
Sorry man, I'm not able to reproduce this bug. I'm chalking it up to the fact that I'm working on a more recent version that you. I'm going to release a new version of amp now if only for one new feature: amp version --super.
[ari: ~/src/amp.code] amp version --super Amp version 0.5.2 (John Locke) Integrity Digest: a9655603cab2dcd18254fc2e34784d9a [ari: ~/src/amp.code]It will look at all the files and run an MD5 sum on them in a memory-friendly manner (reading the files in in 8KB chunks). It then prints out the sum so that we can tell if we're not using a pristine version (I can almost guarantee that I'm not on vanilla. The question is if YOU are). It also affords us some more information about the version you're running. If you're running a vanilla something, we can just do an amp bisect (which is sweet because it is automated) until the integrity digest matches yours, and then we'll know which revision you're using.
Moral of the story: update your amp version in like an hour and tell me if it is still happening.
-

-

Ross Harvey March 15th, 2010 @ 10:37 PM
Works now!
I did not need to recreate the repository. Simply upgrading the gem caused the diff's to start working.
Thanks. I love the color diff.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Rethink Version Control.- http://amp.carboni.ca/
Amp aims to put control of version-control software in your hands as a developer. The entire system is written in Ruby (with C extensions to improve performance), and aims to implement all major VCS's in Ruby. Currently, Mercurial is implemented.
Other features:
Commands are first-class members of the system - drop in an "Ampfile" in your repository, and you can add commands to amp in the same manner you add commands to rake (only with far, far more power!)
Documentation is one of our biggest priorities. We require all methods to be documented - even comically simple ones.
Heavy testing.
Multiple "workflows" - use git's commands to power a mercurial repository.
Add hooks/callbacks in minutes.