Revision of last change in FILE

Eli Zaretskii eliz at gnu.org
Fri Nov 18 09:07:42 UTC 2011


> Date: Fri, 18 Nov 2011 09:33:59 +0100
> From: John Arbash Meinel <john at arbash-meinel.com>
> CC: bazaar at lists.canonical.com
> 
>   bzr version-info --include-file-revisions
> 
> gives that information.

Thanks.  So, for the record, something like

  bzr version-info --include-file-revisions | fgrep -A1 FILE

will show the required information like this:

        path: nt/gmake.defs
        revision: eggert at cs.ucla.edu-20111117174048-kxrt4uzx5it2srg6

The problem with this is that, at least in a bound branch, it goes to
the parent repository, which is remote, i.e. it hits the network.
This happens even if I explicitly give the root of my local repo as
LOCATION.  I see nothing in the documentation about forcing the
command to use local information.  Did I miss something?

> The data is stored in .bzr/checkout/dirstate explicitly.

But that file is not human-readable, is it?

> I don't know of anything that exposes it to the user, though the data
> is readily accessible.

Would it make sense to file a feature request about that?
version-info's purpose is not really to provide this functionality, so
a dedicated command, or maybe a switch to an existing command (like
`revno'?) could be a good addition, IMO.  Or maybe a new kind of
revspec?

My use case for this is that when I sync with mainline after and see
changes in files I care about, I want to know what's changed there.
But if more than a few revisions went under the bridge since then, and
if "bzr log --line" doesn't identify clearly which one modified the
file(s) I care about, there's no easy way of telling.

Using tip:1 (from bzr-tiplog plugin) is one possible way, but
unfortunately it's too slow currently, see

  https://bugs.launchpad.net/bzr-tiplog/+bug/877977

It takes 21.75 seconds in the Emacs trunk branch, for example, to show
just a single file's diffs.

In any case, tiplog only helps in this particular use case, but the
problem is more general, I believe.



More information about the bazaar mailing list