Behaviour of log --patch --follow
Matt Mackall
mpm at selenic.com
Wed May 13 21:47:13 UTC 2015
On Wed, 2015-05-13 at 21:36 +0100, ekhumoro wrote:
> Hello
>
> With mercurial version 3.3.3 and earlier, I could use the following to
> get a diff for a specific revision that follows history across copies
> and renames:
>
> hg log --patch --follow -r 233
Can you show us an example of what you mean? As written, the above line
(with no filenames) says:
1. show revision 233 only
2. show history relative to the working copy
3. show a patch for each revision
Up until 3.4, 1 and 2 were basically contradictory and the combination
was undefined but we didn't report an error. And 3 is independent: it'll
show the same patches for the same files regardless of --follow. By
default (without --git), those patches will not report copies and
renames (because the standard patch format is deficient in this area)..
but will still show the affected files.
In 3.4, we changed the behavior of the previously nonsensical --follow
--rev (again, with no file) to the useful "follow history from the
specified rev (rather than the working copy)" (in other words,
equivalent to -r ::233 rather than -r ::.).
(All of the above analysis is irrelevant if there's actually a filename
in your command you're not telling us about.)
If you want to see copies in a given changeset, you want to either use:
$ hg log --copies -vr 1089
changeset: 1089:142b5d5ec9cc
user: mpm at selenic.com
date: Sat Aug 27 14:21:25 2005 -0700
files: mercurial/changelog.py mercurial/dirstate.py mercurial/filelog.py mercurial/hg.py mercurial/httprepo.py mercurial/localrepo.py mercurial/manifest.py mercurial/node.py mercurial/remoterepo.py mercurial/repo.py mercurial/revlog.py mercurial/sshrepo.py
copies: mercurial/changelog.py (mercurial/hg.py) mercurial/dirstate.py (mercurial/hg.py) mercurial/filelog.py (mercurial/hg.py) mercurial/httprepo.py (mercurial/hg.py) mercurial/localrepo.py (mercurial/hg.py) mercurial/manifest.py (mercurial/hg.py) mercurial/remoterepo.py (mercurial/hg.py) mercurial/sshrepo.py (mercurial/hg.py)
description:
Break apart hg.py
...
Or hg status --copies:
$ hg status -C --change 1089
M mercurial/hg.py
M mercurial/revlog.py
A mercurial/changelog.py
mercurial/hg.py
A mercurial/dirstate.py
mercurial/hg.py
A mercurial/filelog.py
mercurial/hg.py
A mercurial/httprepo.py
mercurial/hg.py
A mercurial/localrepo.py
mercurial/hg.py
A mercurial/manifest.py
mercurial/hg.py
A mercurial/node.py
A mercurial/remoterepo.py
mercurial/hg.py
A mercurial/repo.py
A mercurial/sshrepo.py
mercurial/hg.py
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list