I faced the similar situation and tell you my story.
Typing C-x v =
(vc-diff) on a buffer I have been working on I got:
File is not under version control
What? Then I came here, checked every comment posted above, and found nothing irregular.
Hmm... What is wrong? The status bar shows like this:
U:--- xxx.py 84% (500, 38) (Py Outl)
I tried to open another file in the same directory by typing C-x d RET
(dired), then g
to update the buffer, C-n
to move to another file, e
to open it. Well, this time the status bar shows like this:
-:--- yyy.py All (1, 0) Hg-0 (Py Outl)
Now I got a point! Firstly, I had started editing the first file with Aquamacs (emacs variant for Mac OS). Secondly, I did hg init
, hg ci -m 'Imported the first version' .
Okay, C-x k
(kill-buffer) to close xxx.py
and then open it again. Bingo! Now the status bar shows like this:
-:--- xxx.py Bot (500, 0) Hg:0 (Py Outl)
Everything works fine now. You have a nice day!