Reputation: 1
I want to compare an individual file - not see all of the changes in one revision of a repository versus another revision.
The way I'm doing it now is
hg clone https://[email protected]/me/ C:\me.123 -r 123
Then I use a file comparison tool in Windows to compare the current version C:\me
against C:\me.123
.
So, okay, this is not an efficient way to do file comparisons for a single file since I have to pull the entire repository from bitbucket every time.
At the moment I just want to compare README.txt
in C:\me
against README.txt
from revision 123.
How do I do that?
Upvotes: 0
Views: 189
Reputation: 56038
If you clone a repository, you have it's whole history. So you don't have to reclone from the source to get a particular revision, you could just clone from your existing copy. But, of course, that's still very inefficient for diffing a single file.
hg diff -r 123 README.txt
That command will do what you want when you're in C:\me
.
Upvotes: 1
Reputation: 14391
If the file you have locally is your working copy then you can just use the hg diff
command and specifiy a revision
hg diff -r 123 filename
Upvotes: 1