When merging two heads, and then using 'hg revert' to cancel the changes, 'hg
diff ' gets an exception for removed files. 'hg diff' for normal removed files
works as expected (shows a diff of all lines removed).
For example:
: abulafia:pts/7; hg heads
changeset: 49:9e9788fc1a7f
tag: tip
user: jeremy@localhost
date: Tue Oct 25 14:44:39 2005 -0700
summary: Added tag wanted for changeset 10583d8e7f254fcaf9cdf6a1834268c4c126c2a8
changeset: 47:8c88cdabb6b0
parent: 22:350932131763
user: jeremy@localhost
date: Tue Oct 25 14:30:32 2005 -0700
summary: add bonk
changeset: 46:a49e8b2d2200
parent: 33:247199aaec38
user: jeremy@localhost
date: Tue Oct 25 14:30:04 2005 -0700
summary: add biff
changeset: 45:20d004d483b5
user: jeremy@localhost
date: Tue Oct 25 14:29:38 2005 -0700
summary: add bar
: abulafia:pts/7; hg update -C 49
: abulafia:pts/7; l
total 24
4 drwxrwxr-x 3 jeremy jeremy 4096 Oct 25 14:53 .
4 drwxrwxr-x 15 jeremy jeremy 4096 Oct 25 14:52 ..
4 drwxrwxr-x 3 jeremy jeremy 4096 Oct 25 14:51 .hg
4 -rw-rw-r-- 1 jeremy jeremy 48 Oct 25 14:51 .hgtags
4 -rw-rw-r-- 1 jeremy jeremy 26 Oct 25 14:55 foo
4 -rw-rw-r-- 1 jeremy jeremy 7 Oct 25 14:51 splock
: abulafia:pts/7; hg status
: abulafia:pts/7; HGMERGE=false hg update -m 47
merging foo
merging foo failed!
: abulafia:pts/7; hg status
M bonk
M foo
: abulafia:pts/7; hg revert
: abulafia:pts/7; hg status
M foo
R bonk
: abulafia:pts/7; hg diff
** unknown exception encountered, details follow
** report bug details to mercurial@selenic.com
Traceback (most recent call last):
File "/usr/bin/hg", line 13, in ?
commands.run()
File "/usr/lib/python2.4/site-packages/mercurial/commands.py", line 2412, in run
sys.exit(dispatch(sys.argv[1:]))
File "/usr/lib/python2.4/site-packages/mercurial/commands.py", line 2567, in
dispatch
return d()
File "/usr/lib/python2.4/site-packages/mercurial/commands.py", line 2552, in
<lambda>
d = lambda: func(u, repo, *args, **cmdoptions)
File "/usr/lib/python2.4/site-packages/mercurial/commands.py", line 1048, in diff
text=opts['text'])
File "/usr/lib/python2.4/site-packages/mercurial/commands.py", line 303, in dodiff
to = repo.file(f).read(mmap[f])
KeyError: 'bonk'
exit status 1
: abulafia:pts/7;
|