Reputation: 29996
I remember seeing some interesting code in one of commits but I dont remember which one is it. Is there a way to get last lets say 100 changesets so I can grep through them. Maybe my terminology is bad so Ill explain with words. Im looking for diffs ala
+cout << "hello";
-cout << "Hello";
Upvotes: 0
Views: 58
Reputation: 78330
What you literally asked for is as simple as hg log --patch --limit 100
which gets all revisions, but I upvoted @sherlock's answer using hg grep
because that's what I'd do.
Upvotes: 2
Reputation: 330
If you just want to search a piece of code in the history, hg grep
will help.
If you want to know which commit introduce this change, use hg annotate
instead.
Upvotes: 4