From owner-freebsd-cvsweb@FreeBSD.ORG Mon Jul 25 22:38:53 2005 Return-Path: X-Original-To: freebsd-cvsweb@FreeBSD.org Delivered-To: freebsd-cvsweb@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 302FD16A41F for ; Mon, 25 Jul 2005 22:38:53 +0000 (GMT) (envelope-from bryan.m.ross@boeing.com) Received: from blv-smtpout-01.boeing.com (blv-smtpout-01.boeing.com [130.76.32.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id B928A43D45 for ; Mon, 25 Jul 2005 22:38:52 +0000 (GMT) (envelope-from bryan.m.ross@boeing.com) Received: from blv-av-01.boeing.com ([192.42.227.216]) by blv-smtpout-01.boeing.com (8.9.2.MG.10092003/8.8.5-M2) with ESMTP id PAA12585 for ; Mon, 25 Jul 2005 15:38:52 -0700 (PDT) Received: from XCH-NWBH-11.nw.nos.boeing.com (localhost [127.0.0.1]) by blv-av-01.boeing.com (8.11.3/8.11.3/MBS-AV-LDAP-01) with ESMTP id j6PMcps14250 for ; Mon, 25 Jul 2005 15:38:51 -0700 (PDT) Received: from XCH-NW-6V1.nw.nos.boeing.com ([130.247.55.53]) by XCH-NWBH-11.nw.nos.boeing.com with Microsoft SMTPSVC(6.0.3790.211); Mon, 25 Jul 2005 15:38:51 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C59169.A10F1B75" Date: Mon, 25 Jul 2005 15:38:50 -0700 Message-ID: <8B568468E66F1042A45AB841E08A72D910C84E@XCH-NW-6V1.nw.nos.boeing.com> X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: Cvsweb enhancements Thread-Index: AcWRaaD6Hv01lRBTRMe022ezpyUwSQ== From: "Ross, Bryan M" To: X-OriginalArrivalTime: 25 Jul 2005 22:38:51.0227 (UTC) FILETIME=[A13732B0:01C59169] Cc: Subject: Cvsweb enhancements X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2005 22:38:53 -0000 This is a multi-part message in MIME format. ------_=_NextPart_001_01C59169.A10F1B75 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Hi, Your cvsweb script has been very useful in our processes. A little while back, I threw together an added feature: beside each folder is displayed the Rev., Age, Author, and Last log entry information for the most recently changed file in that directory. Our users have grown to like that feature, which has us in a bit of a bind. We want to download your latest updates, but we don't want to give up that feature. My improvements are rough and not necessarily 100 percent reliable, and I don't have the time to incorporate them into each new script you release, so I am requesting that you incorporate this feature into your standard releases. It can be very helpful to tell at a glance which files in multiple packages (folders) have been changed most recently. For what it is worth, I am enclosing the modified version we are using (Version 1.28). <>=20 I sincerely hope you can add this to your list of improvements. Thanks, Bryan Ross Geometry Systems (425)237-6772 bryan.m.ross@boeing.com ------_=_NextPart_001_01C59169.A10F1B75 Content-Type: application/octet-stream; name="cvsweb.cgi" Content-Transfer-Encoding: base64 Content-Description: cvsweb.cgi Content-Disposition: attachment; filename="cvsweb.cgi" IyEvdXNyL2Jpbi9wZXJsIC13c1QKIwojIGN2c3dlYiAtIGEgQ0dJIGludGVyZmFjZSB0byBDVlMg dHJlZXMuCiMKIyBXcml0dGVuIGluIHRoZWlyIHNwYXJlIHRpbWUgYnkKIyAgICAgICAgICAgICBC aWxsIEZlbm5lciAgICAgIDxmZW5uZXJARnJlZUJTRC5vcmc+ICAgKG9yaWdpbmFsIHdvcmspCiMg ZXh0ZW5kZWQgYnkgSGVubmVyIFplbGxlciAgICA8emVsbGVyQHRoaW5rLmRlPiwKIyAgICAgICAg ICAgICBIZW5yaWsgTm9yZHN0cvZtIDxobm9AaGVtLnBhc3NhZ2VuLnNlPiAKIyAgICAgICAgICAg ICBLZW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ZXJlKSA9ICgkd2hlcmUg bmUgIi8iID8gJHdoZXJlIDogIiIpIC4gJF87CgkJICAgIGlmICgkdXNlX2Rlc2NyaXB0aW9ucyAm JiBkZWZpbmVkICRkZXNjcmlwdGlvbnN7JGR3aGVyZX0pIHsKCQkJcHJpbnQgIjxURCBDT0xTUEFO PSIgLiAoJGluZm9jb2xzLTEpIC4gIj4mbmJzcDsiIGlmICRkaXJ0YWJsZTsKCQkJcHJpbnQgJGRl c2NyaXB0aW9uc3skZHdoZXJlfTsKCQkgICAgfSBlbHNpZiAoJGRpcnRhYmxlICYmICRpbmZvY29s cyA+IDEpIHsKCQkJIyBjbG9zZSB0aGUgcm93IHdpdGggdGhlIGFwcHJvcHJpYXRlIG51bWJlciBv ZgoJCQkjIGNvbHVtbnMKCQkJbXkoJGNvbHMpID0gJGluZm9jb2xzOwogICAgICAgICAgICAgICAg ICAgICAgICBuZXh0IGlmICgkXyBlcSAnLi4nKTsKICAgICAgICAgICAgICAgICAgICAgICAgJGxh c3Rtb2QgPSB1bmRlZjsKICAgICAgICAgICAgICAgICAgICAgICAgJGxhc3Rtb2R0aW1lID0gdW5k ZWY7CiAgICAgICAgICAgICAgICAgICAgICAgIG15ICVyZmlsZSA9ICZmaW5kTGFzdENoYW5nZWRG aWxlKCIkZnVsbG5hbWUvJF8iKTsKICAgICAgICAgICAgICAgICAgICAgICAgbXkgJGxhdGVzdGZp bGUgPSAkcmZpbGV7Imxhc3RmaWxlIn07CiAgICAgICAgICAgICAgICAgICAgICAgIG15ICV0aGlz cmV2aW5mbyA9ICZyZWFkTG9nKCRsYXRlc3RmaWxlLCAwLCAidHJ1ZSIpOwogICAgICAgICAgICAg ICAgICAgICAgICBteSAkcmV2ID0gJHRoaXNyZXZpbmZveydyZXYnfTsKICAgICAgICAgICAgICAg ICAgICAgICAgbXkgJGRhdGUgPSAkdGhpc3JldmluZm97J2RhdGUnfTsKICAgICAgICAgICAgICAg ICAgICAgICAgaWYgKCEkZGF0ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAkZGF0ZSA9 ICcnOwogICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAg ICAgICAgICAkZGF0ZSA9IHJlYWRhYmxlVGltZSh0aW1lKCkgLSAkZGF0ZSwwKTsKICAgICAgICAg ICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAjIG9taXQgdG9wIHJvb3Qg ZnJvbSB0aGUgZmlsZSBwYXRoCiAgICAgICAgICAgICAgICAgICAgICAgIG15ICR0b3Byb290ID0g Ii9ob21lL2FncHMvY3ZzIjsKICAgICAgICAgICAgICAgICAgICAgICAgbXkgKCRsb2cpID0gKCRs YXRlc3RmaWxlID1+IC9eLiokdG9wcm9vdFwvKC4qJCkvKTsKICAgICAgICAgICAgICAgICAgICAg ICAgbXkgJGF1dGhvciA9ICR0aGlzcmV2aW5mb3snYXV0aG9yJ307CiAgICAgICAgICAgICAgICAg ICAgICAgIG15IEBjbXNnOwogICAgICAgICAgICAgICAgICAgICAgICAkY21zZ1swXSA9ICImbmJz cDsiOyAgIyBlbXB0eSBzcGFjZSBwbGFjZSBob2xkZXIKICAgICAgICAgICAgICAgICAgICAgICAg JGNtc2dbMV0gPSAiJm5ic3A7IjsKICAgICAgICAgICAgICAgICAgICAgICAgJGNtc2dbMl0gPSAk bG9nLiImbmJzcDsiOwogICAgICAgICAgICAgICAgICAgICAgICAkY21zZ1szXSA9ICRhdXRob3Iu IiZuYnNwOyI7CiAgICAgICAgICAgICAgICAgICAgICAgICRjbXNnWzRdID0gJGRhdGUuIiZuYnNw OyI7CiAgICAgICAgICAgICAgICAgICAgICAgICRjbXNnWzVdID0gJHJldi4iJm5ic3A7IjsKICAg ICAgICAgICAgICAgICAgICAgICAgaWYgKGRlZmluZWQoJGZpbGVpbmZveyRsYXRlc3RmaWxlfSkp IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgKCRyZXYsJGRhdGUsJGxvZywkYXV0aG9yK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9sZEx1c3IpID0gKCIi LCAiIik7CiAgICBteSAoJHJldnByaW50LCAkdXNycHJpbnQpOwogICAgaWYgKCRhbm5UYWJsZSkg ewoJcHJpbnQgIjx0YWJsZSBib3JkZXI9MCBjZWxsc3BhY2luZz0wIGNlbGxwYWRkaW5nPTA+XG4i OwogICAgfQogICAgZWxzZSB7CglwcmludCAiPHByZT4iOwogICAgfQogICAgd2hpbGUgKDwkcmVh ZGVyPikgewoJbXkgQHdvcmRzID0gc3BsaXQ7CgkjIEFkZGluZyBvbmUgaXMgZm9yIHRoZSAoc2lu Z2xlKSBzcGFjZSB3aGljaCBmb2xsb3dzICR3b3Jkc1swXS4KCW15ICRyZXN0ID0gc3Vic3RyICgk XywgbGVuZ3RoICgkd29yZHNbMF0pICsgMSk7CglpZiAoJHdvcmRzWzBdIGVxICJFIikgewoJICAg IG5leHQ7Cgl9CgllbHNpZiAoJHdvcmRzWzBdIGVxICJNIikgewoJICAgICRsaW5lTnIrKzsKCSAg ICBteSAkbHJldiA9IHN1YnN0ciAoJF8sIDIsIDEzKTsKCSAgICBteSAkbHVzciA9IHN1YnN0ciAo JF8sIDE2LCAgOSk7CgkgICAgbXkgJGxpbmUgPSBzdWJzdHIgKCRfLCAzNik7CgkgICAgIyB3ZSBz aG91bGQgcGFyc2UgdGhlIGRhdGUgaGVyZSAuLgoJICAgIGlmICgkbHJldiBlcSAkb2xkTHJldikg ewoJCSRyZXZwcmludCA9ICIgICAgICAgICAgICAgIjsKCSAgICB9CgkgICAgZWxzZSB7CgkJJHJl dnByaW50ID0gJGxyZXY7ICRvbGRMdXNyID0gIiI7CgkgICAgfQoJICAgIGlmICgkbHVzciBlcSAk b2xkTHVzcikgewoJCSR1c3JwcmludCA9ICIgICAgICAgICAiOwoJICAgIH0KCSAgICBlbHNlIHsK CQkkdXNycHJpbnQgPSAkbHVzcjsKCSAgICB9CgkgICAgJG9sZExyZXYgPSAkbHJldjsKCSAgICAk b2xkTHVzciA9ICRsdXNyOwoJICAgIC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gYW55IG1vcmUuCgkJbmV4dCBsb2dlbnRyeTsKIwkJ JmZhdGFsKCI1MDAgSW50ZXJuYWwgRXJyb3IiLCJFcnJvciBwYXJzaW5nIFJDUyBvdXRwdXQ6ICRf Iik7CgkgICAgfQoJICAgICRfID0gPCRmaD47CgkgICAgcHJpbnQgIkQ6IiwgJF8gaWYgKCR2ZXJi b3NlKTsKCSAgICBpZiAobXxeZGF0ZTpccysoXGQrKS8oXGQrKS8oXGQrKVxzKyhcZCspOihcZCsp OihcZCspO1xzK2F1dGhvcjpccysoXFMrKTtccytzdGF0ZTpccysoXFMrKTtccysobGluZXM6XHMr KFswLTlccystXSspKT98KSB7CgkJbXkgJHlyID0gJDE7CiAgICAgICAgICAgICAgICAjIGRhbW4g Mi1kaWdpdCB5ZWFyIHJvdXRpbmVzIDotKQogICAgICAgICAgICAgICAgaWYgKCR5ciA+IDEwMCkg ewogICAgICAgICAgICAgICAgICAgICR5ciAtPSAxOTAwOwogICAgICAgICAgICAgICAgfQoJCSRk YXRleyRyZXZ9ID0gJlRpbWU6OkxvY2FsOjp0aW1lZ20oJDYsJDUsJDQsJDMsJDIgLSAxLCR5cik7 CgkJJGF1dGhvcnskcmV2fSA9ICQ3OwoJCSRzdGF0ZXskcmV2fSA9ICQ4OwoJCSRkaWZmbGluZXN7 JHJldn0gPSAkMTA7CgogICAgICAgICAgICAgICAgaWYgKCEkbmV3ZXN0cmV2KSB7ICAgICMgY2Fw dHVyZSB0aGUgbmV3ZXN0IHJldmlzaW9uCiAgICAgICAgICAgICAgICAgICAjIHBvcHVsYXRlIHBv dGVudGlhbCByZXR1cm4gaGFzaAogICAgICAgICAgICAgICAgICAgJHJldmF1dGh7J3Jldid9ID0g JHJldjsKICAgICAgICAgICAgICAgICAgICRyZXZhdXRoeydkYXRlJ30gPSAkZGF0ZXskcmV2fTsK ICAgICAgICAgICAgICAgICAgICRyZXZhdXRoeydsb2cnfSA9ICRsb2d7JHJldn07CiAgICAgICAg ICAgICAgICAgICA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6Olps aWI6OmNyYzMyKCRidWYsICRvLT57Y3JjfSk7Cgkkby0+e2xlbn0gKz0gJGxlbjsKCXJldHVybiAk bGVuOwp9CgpzdWIgV1JJVEUgewoJbXkgKCRvLCAkYnVmLCAkbGVuLCAkb2ZmKSA9IEBfOwoJbXkg KCRjb21wcmVzc2VkLCAkc3RhdHVzKSA9ICRvLT57ZGh9LT5kZWZsYXRlKHN1YnN0cigkYnVmLCAw LCAkbGVuKSk7CglwcmludCB7JG8tPntoYW5kbGV9fSAkY29tcHJlc3NlZCBpZiBkZWZpbmVkKCRj b21wcmVzc2VkKTsKCSRvLT57Y3JjfSA9IENvbXByZXNzOjpabGliOjpjcmMzMihzdWJzdHIoJGJ1 ZiwgMCwgJGxlbiksICRvLT57Y3JjfSk7Cgkkby0+e2xlbn0gKz0gJGxlbjsKCXJldHVybiAkbGVu Owp9CgpzdWIgQ0xPU0UgewoJbXkgKCRvKSA9IEBfOwoJcmV0dXJuIGlmICFkZWZpbmVkKCAkby0+ e2RofSk7CglteSAoJGJ1ZikgPSAkby0+e2RofS0+Zmx1c2goKTsKCSRidWYgLj0gcGFjaygiViBW IiwgJG8tPntjcmN9LCAkby0+e2xlbn0pOwoJcHJpbnQgeyRvLT57aGFuZGxlfX0gJGJ1ZjsKCXVu ZGVmICRvLT57ZGh9Owp9CgpzdWIgREVTVFJPWSB7CglteSAoJG8pID0gQF87CglDTE9TRSgkbyk7 Cn0K ------_=_NextPart_001_01C59169.A10F1B75-- From owner-freebsd-cvsweb@FreeBSD.ORG Sat Jul 30 10:00:15 2005 Return-Path: X-Original-To: freebsd-cvsweb@FreeBSD.org Delivered-To: freebsd-cvsweb@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A841D16A41F for ; Sat, 30 Jul 2005 10:00:15 +0000 (GMT) (envelope-from skycat081@gatesystemsfl.com) Received: from gatesystemsfl.com (gatesystemsfl.com [63.151.45.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EE5443D46 for ; Sat, 30 Jul 2005 10:00:15 +0000 (GMT) (envelope-from skycat081@gatesystemsfl.com) Received: from [10.0.1.6] [65.11.78.129] by gatesystemsfl.com with ESMTP (SMTPD32-8.14) id AF3852400A4; Sat, 30 Jul 2005 05:58:16 -0400 User-Agent: Microsoft-Entourage/11.1.0.040913 Date: Sat, 30 Jul 2005 06:00:13 -0400 From: SKYCAT081 To: Message-ID: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Cc: Subject: X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2005 10:00:15 -0000