monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: How to determine if a file is version controlled?


From: Lapo Luchini
Subject: [Monotone-devel] Re: How to determine if a file is version controlled?
Date: Fri, 14 Apr 2006 21:26:18 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8) Gecko/20051201 Thunderbird/1.5 Mnenhy/0.7.3.0

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

Justin Patrin wrote:
> On 4/12/06, Lapo Luchini <address@hidden> wrote: Wim Oudshoorn wrote:
>
>>>> Question -------- Is there an efficient way to find this out?
>>>>
> "mtn cat filename" gives status 1 on error, else the file content.
> But gettin' the whole content may be a bit overkill (exp. in cases
> of big files) just to know if it is tracked or not.
>
>> "mtn cat filename | head" perhaps? ;-)
I doubt that simply avoiding reading the output tells monotone not to
extract it altogether ;-)
Anyway if even "mtn ls known filename" (that use, btw, is not quite
documented in "mtn help ls", I didn't think about it ^_^) is too long
a "cat" can only be worse...

Well, no! In fact no!

% time mtn ls known work.hh >/dev/null
0.41s user 0.00s system 100% cpu 0.405 total
% time mtn cat work.hh >/dev/null 
0.14s user 0.00s system 70% cpu 0.199 total
% time mtn cat figures/parent-child-names-hashes.pdf >/dev/null
0.15s user 0.00s system 78% cpu 0.197 total

I guess "ls" does some extra checking that is even more "heavy" than
readnig the file content itself.
Even a "cat" on a 120KiB file such as the PDF, is shorter that a "ls
known".

    Lapo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJEP/daAAoJELBiMTth2oCDg0wP/0rmGBHqhDBHAF4TnJ0WR5pD
hh+faRxv9vFb1NinI27sM6NKiRpu5hAB6qdjXFEHJHGN4invREVj0AZJgjPBwLb3
EfHj40H86BVriGgyHI2xMYQ73zq1xtfLQwQ3qqkf6KET0xd70xhKFddaV4aZMO4C
j3xgxgs8UfJ/74ZYgNQgJY2ggWYwxhvun8MIt0qr26QMCy0satT5mIThFWAXnOoI
V+5+JhFkltUC+guc6Vqu3zbxM1UDsSbAtS2vL76bzYUkM3S9aIuQRn8t0r/KhUty
pbHJ1Wyy8ea/2hX2MB9utS/fpFhVQneC4lM41H4EeI/5x4ZcP9YCJV1PXBGq8gVu
a7WvADmfrbM2uUlaEY5Mz9rUCstw9jMYVZfuZBXEdAgEIFH7y5V/zZL2CVsHRqD+
7NOdX4loyiVgV1NPAkzfNARllbWIYaqKHxpXz2zRCO02Un9HIAGwA+9GooJbOwEV
Fi5250nSkm9Bg0ZtrtN9ZaQlhRrmkWVRKrkLnixFIxxHzYBWFaRvzwS892wpTMgA
l9KCbRhfxUfPmEd1nROk9UFTSyqWBIck1wopu1if1GOvt5YFpBqSbPgbnPYC4PgY
YaM2NhP/HtVnyQTKZdcfMP74YGjS0qcLgHQ7U5vlJPxN2Zju+ceE1IPr6BkULYnO
nUHIGjAVk5fDKYKzUM7B
=AwvB
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]