Revision of last change in FILE

John Arbash Meinel john at arbash-meinel.com
Fri Nov 18 09:44:18 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/18/2011 10:07 AM, Eli Zaretskii wrote:
>> 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?

It is only doing this for the branch 'nick' information. If you set an
explicit local nick "bzr branch-nick XXX" it won't connect to the network.


> 
>> 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.

This sounds more like you just wish "bzr log [--line] FILENAME" was
faster.

> 
> 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.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7GKPIACgkQJdeBCYSNAAO0JwCbB51hcIRA2kil1tQE+X2Kri1M
faMAoNSA6M+j4Q7UZSnfr0hnyv1BrZeB
=a6y/
-----END PGP SIGNATURE-----



More information about the bazaar mailing list