Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 19 Mar 2003 16:08:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 19 Mar 2003 16:08:30 -0500 Received: from ns0.cobite.com ([208.222.80.10]:59398 "EHLO ns0.cobite.com") by vger.kernel.org with ESMTP id ; Wed, 19 Mar 2003 16:08:24 -0500 Date: Wed, 19 Mar 2003 16:19:20 -0500 (EST) From: David Mansfield X-X-Sender: david@admin To: Andrea Arcangeli cc: David Mansfield , , Larry McVoy Subject: Re: [ANNOUNCE] cvsps support for parsing BK->CVS kernel tree logs In-Reply-To: <20030319201101.GQ30541@dualathlon.random> Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-556791216-1646713961-1048108760=:19298" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6341 Lines: 130 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---556791216-1646713961-1048108760=:19298 Content-Type: TEXT/PLAIN; charset=US-ASCII > what about the deleted files? should we teach cvsps how to diff the old > revision fetched with cvs up -p against /dev/null to make a completely > coherent patch? It's already supposed to work that way :-( See below. > this is with 2.4 > > Directing PatchSet 2742 to file ../patches-2.4//2742.patch > cvs [update aborted]: no such directory `drivers/usb/hcd' > cvs [update aborted]: no such directory `drivers/usb/hcd' > cvs [update aborted]: no such directory `drivers/usb/hcd' > cvs [update aborted]: no such directory `drivers/usb/hcd' > cvs [update aborted]: no such directory `drivers/usb/hcd' > cvs [update aborted]: no such directory `drivers/usb/hcd' > cvs [update aborted]: no such directory `drivers/usb/hcd' > cvs [update aborted]: no such directory `drivers/usb/hcd' > cvs [update aborted]: no such directory `drivers/usb/hcd' This has been fixed already in 2.0b5 (on www.cobite.com/cvsps website). It was all working fine if you had a checked out tree. But doesn't work to use 'update -p' if the sub-directory isn't checked out (update -p is what is used in your version). The new code uses 'cvs co -p -r x.y repository/file' which works fine. The patches that are generated by '-g' now need 'patch -p1' to be applied inside the working directory. > I also wonder if cvsps is so accurate also w/o the --bkcvs option (i.e. > w/o atomic commits from bk). are the dates guaranteed to be the same for > all files w/ a normal cvs tree? No. On a normal CVS repository, and without the --bkcvs, a heuristic is used to recreate a 'commit'. The commit must have the same author, the same message and the time of commit must be within a fuzz-factor number of seconds (default 300, settable via the -z option). The reason the fuzz-factor is needed is that a commit over a slow link, or a very large commit in general can take a lot of time, and the log time will vary for each file committed. It actually works quite well. > what about the -f option? why can't I use it at the same time with -r? > Can I use multiple -f at the same time? That is getting very cool and so > useful. Oops. You found a bug. See the attached patch against 2.0b5 (should work against any recent version). By design though, all of the 'filter' options can be combined. Also by design, you cannot specify multiple instances of any option (except -d and -r, where the first and second instance have special meaning - start vs end). > Would also be nice to export the API of the cvsps internals to python > (i.e. to allow to efficiently parse the cvsps metadata files in .cvsps > from scripts that will give the flexibility of parsing the data as > you want or to quickly write a gui fronthand). This is low prio though, > having -f working together with -r and all the other options is much > more interesting at this point IMHO. Being able to specify a directory > as a file would also be very useful. The file is actualy a substring match. If the -f argument matches as a substring the filename it will count as a match. So you can specify directory names just as is. David -- /==============================\ | David Mansfield | | david@cobite.com | \==============================/ ---556791216-1646713961-1048108760=:19298 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="cvsps-wrong-check-order.patch" Content-Transfer-Encoding: BASE64 Content-Description: Content-Disposition: attachment; filename="cvsps-wrong-check-order.patch" SW5kZXg6IGN2c3BzLmMNCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NClJDUyBm aWxlOiAvc3VsdS9jdnNfbWFzdGVyL2N2c3BzL2N2c3BzLmMsdg0KcmV0cmll dmluZyByZXZpc2lvbiA0LjcwDQpkaWZmIC1iIC11IC1yNC43MCBjdnNwcy5j DQotLS0gY3ZzcHMuYwkxOSBNYXIgMjAwMy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sNiArMTA2OSwyMyBAQA0KICAgICB9 DQogDQogIG9rOg0KKyAgICBpZiAocmVzdHJpY3RfZGF0ZV9zdGFydCA+IDAg JiYNCisJKHBzLT5kYXRlIDwgcmVzdHJpY3RfZGF0ZV9zdGFydCB8fA0KKwkg KHJlc3RyaWN0X2RhdGVfZW5kID4gMCAmJiBwcy0+ZGF0ZSA+IHJlc3RyaWN0 X2RhdGVfZW5kKSkpDQorCXJldHVybjsNCisNCisgICAgaWYgKHJlc3RyaWN0 X2F1dGhvciAmJiBzdHJjbXAocmVzdHJpY3RfYXV0aG9yLCBwcy0+YXV0aG9y KSAhPSAwKQ0KKwlyZXR1cm47DQorDQorICAgIGlmIChoYXZlX3Jlc3RyaWN0 X2xvZyAmJiByZWdleGVjKCZyZXN0cmljdF9sb2csIHBzLT5kZXNjciwgMCwg TlVMTCwgMCkgIT0gMCkNCisJcmV0dXJuOw0KKw0KKyAgICBpZiAocmVzdHJp Y3RfZmlsZSAmJiAhcGF0Y2hfc2V0X2NvbnRhaW5zX21lbWJlcihwcywgcmVz dHJpY3RfZmlsZSkpDQorCXJldHVybjsNCisNCisgICAgaWYgKHJlc3RyaWN0 X2JyYW5jaCAmJiAhcGF0Y2hfc2V0X2FmZmVjdHNfYnJhbmNoKHBzLCByZXN0 cmljdF9icmFuY2gpKQ0KKwlyZXR1cm47DQorICAgIA0KICAgICBpZiAoIWxp c3RfZW1wdHkoJnNob3dfcGF0Y2hfc2V0X3JhbmdlcykpDQogICAgIHsNCiAJ c3RydWN0IGxpc3RfaGVhZCAqIG5leHQgPSBzaG93X3BhdGNoX3NldF9yYW5n ZXMubmV4dDsNCg== ---556791216-1646713961-1048108760=:19298-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/