Questions tagged [hg-log]
16 questions
26
votes
3 answers
Mercurial - determine where file was removed?
If you do hg log myfile -v you see a list of changesets that the file was modified in.
In our case, in the most recent changeset, the file was removed. But you can't tell this by looking at the verbose (-v) output of hg log. Is there an easy…

Marcus Leon
- 55,199
- 118
- 297
- 429
4
votes
1 answer
Cut off the "desc" at N characters in hg log output with templates
I'm trying to create a custom template for hg log with a part that shows the first N (e.g. 72) characters of the first line. Based off this answer to a different question I've gotten so far:
hg log --template '{desc|strip|firstline}\n'
Now I'm…

Jeroen
- 60,696
- 40
- 206
- 339
3
votes
1 answer
Mercurial - hg log for just two changesets?
The command hg log -v -r 2:5 can be used to see details on changesets 2/3/4/5 - is there a similar way you can view changeset details on JUST changesets 2 and 5?

Marcus Leon
- 55,199
- 118
- 297
- 429
3
votes
4 answers
Is there a Mercurial equivalent to git log --first-parent?
git log --first-parent omits all but the first parent of merge commits.
Example:
$ git log --oneline --graph
* 087f5ed Master C
* 36c50a2 Merge branch 'feature'
|\
| * 98c89df Feature B
| * 89b3a7b Feature A
* | 9a95133 Master B
|/
* 766c9b0…

Max Nanasy
- 5,871
- 7
- 33
- 38
2
votes
1 answer
Mercurial get branch name by changeset
I have tried the
hg log --rev "branch([changeset])"
but what I got is a collection of all the changesets in this branch.
What I do want to get is the name of the target branch (e.g. default) instead of the whole collection.
Is there a way to…

Tim Raynor
- 733
- 2
- 12
- 28
2
votes
1 answer
hg log - how to display a date range of revisions in reverse order?
In bash, I am using a date range to restrict the number of revisions showed as follows:
hg log -d "yyyy-mm-dd to yyyy-mm-dd"
I would like to output to display the most recent revision at the bottom. Currently, it starts with the most recent at the…

user3792362
- 45
- 2
- 9
1
vote
3 answers
Change format of hg log -v
When we do hg log -v we see:
changeset: 2639:283fb2da345f
parent: 2638:e06cb712d37b
parent: 2631:d8f619046812
user: joe@pub.com
date: Wed Apr 13 12:29:57 2011 -0400
files: …

Marcus Leon
- 55,199
- 118
- 297
- 429
1
vote
1 answer
Make hg log case insensitive?
We use hg log -u MyUser.
Is there a way to make this case insensitive? Ie: so hg will return all changesets for MyUser or myuser.

Marcus Leon
- 55,199
- 118
- 297
- 429
1
vote
1 answer
Can I color hg log output based on content?
Is it possible to color each line of hg log output based on the individual changeset's content and/or description? For instance, I'd like to help the "real" work stand out, by graying out the lines for merges and the lines for changes that only…

Joshua Goldberg
- 5,059
- 2
- 34
- 39
1
vote
2 answers
Can Mercurial (Hg) show me what remote a branch or a commit is from?
I have a Mercurial (Hg) repository with 2 remotes, let's call them default and upstream.
I have pulled from both remotes and would like to know which commits/branches came from the remote called default and which commits/branches came from the…

nonsensickle
- 4,438
- 2
- 34
- 61
1
vote
1 answer
How can I limit the Git/Mercurial log to commits whose logs contain at least one of two strings?
Is there a way where I can send two choices for git/Mercurial commands?
I want to search the history of git repository and Mercurial repository for specific word, say "commit". However, I am not sure how is it written in commit message "commit" or…

Arwa
- 575
- 1
- 5
- 17
1
vote
1 answer
Printing transplant source changeset hash
We've transplanted a changeset from another repository to the current one. It seems to us that the transplant extensions stores the original changset hash in an extra field which can be shown with hg log --debug, like:
changeset: 720:092506
tag: …

palacsint
- 28,416
- 10
- 82
- 109
0
votes
1 answer
Mercurial - determine which repository a changeset was pushed to?
If you hg push changeset A into repository myapp-v1 and then do an hg pull and hg merge to merge that into myapp-v2, is there a way in the myapp-v2 repository to identify that the changeset was originally checked into myapp-v1?

Marcus Leon
- 55,199
- 118
- 297
- 429
0
votes
2 answers
How to change default behaviour of hg log to only show ancestors?
Is it possible to change the default behaviour of hg log to show only the current ancestors?
Ie this:
hg log --rev "reverse(ancestors(.))"
The thing is, I always want hg log to do that.
I know that I could do something like this in my .bashrc…

sixtyfootersdude
- 25,859
- 43
- 145
- 213
0
votes
2 answers
How to limit to N newest entries with Hg Log when specifying a Revset?
This question is not a duplicate of hg log - How to get the last 5 log entries? - it is easy to apply a limit. The problem is that the log output, when limited, does not appear to always be ordered descending by log date - the behavior changes with…

user2864740
- 60,010
- 15
- 145
- 220