Mercurial - log last month changes
Asked Answered
O

1

5

I'm using TortoiseHG with mercurial and I have to log my changes from last month. It has to be something like this in GIT:

git log --since="2015-03-01" -p --author='me' > C:\history_3.log

Can you tell me how can I do it (using tortoise gui or terminal)?

Obed answered 24/4, 2015 at 7:36 Comment(2)
Try: hg log -r "author(<your name here>) and date(>2015-03-01)" > C:\history_3.logOzan
I tried hg log -r "kowalski(John Kowalski) and date(>2015-03-01)" > F:\history_3.log but it said there is invalid token at 15. And how can I set date range?Obed
G
16

You want to make use of mercurial's revsets, a very powerful language to filter the revisions listed:

hg log -r"author('YOURNAME') and date('>2015-03-01')"

or alternatively for the last 30 days:

hg log -r"author('YOURNAME') and date('-30')".

See hg help revsets and hg help dates.

EDIT: Using tortoiseHG, you can use the magnifying glass icon in the toolbar (thanks Kevin)

Guck answered 24/4, 2015 at 12:43 Comment(1)
Revsets can also be put directly into the TortoiseHG GUI. Just click the magnifying glass icon in the toolbar.Flamingo

© 2022 - 2024 — McMap. All rights reserved.