Re: Interfacing BitKeeper to LXR
Wayne Scott <[email protected]> Mon, 10 Jan 2005 11:00:57 -0500 (EST)
| Newsgroups | gmane.comp.version-control.bitkeeper.user |
|---|---|
| Message-ID | <[email protected]> |
From: Malcolm Box <[email protected]> > I'm trying to code up an interface between LXR (http://lxr.sf.net) and > BitKeeper, to enable source browsing of the linux kernel trees. It would be helpful if you included a brief summary of lxr since that website doesn't contain any useful information. I am guessing it is a source code browser. > I've run into some problems with working out what commands to use to get > the information I need out of BitKeeper, any hints or suggestions would > be much appreciated: > > 1. Discovering the contents of a directory at a certain revision Need to be careful with terms here. I am guessing you are asking for the contents as of a certain cset. > > Currently I'm using "bk prs -r<rev>" from the root of the repository, > parsing the output, building the full directory tree and then retrieving > the contents of the directory I want. This works, but is much slower > than I would like - I'm having to process the entire directory tree > simply to e.g. read the contents of the root directory. You might want to look at 'bk rset -l<csetrev>' > > 2. Finding the contents of a file at a certain revision - e.g. x/y/z @a.b.c > > The obvious command to use is "bk get -p [email protected] x/y/z", but this > doesn't appear to work if x/y/z has been deleted after changelist a.b.c > even if the file did exist at the specified changelist. "bk get" just > reports that x/y/SCCS/s.z doesn't exist, which isn't that helpful! Well the file names on the command line are pathnames in the latests cset. The command line you gave was: Give me the contents of the file that is currently named 'x/y/z' as of cset a.b.c. (That file might have been at a different location at that cset.) Look at 'bk help rset' at the -h option which lists the historic and current locations of files that are listed. > > 3. Working out whether a file exists at a certain changelist > > It would be useful to be able to take a pathname, changelist combination > and have a quick way to discover if that file exists at that revision. > I can't work out what commands would work for that. > > Any help would be much appreciated. Again rset. Historic pathnames are tricky. Bk doesn't work with pathnames because they are not stable. Internally everything is done with a unique identifier for files called the rootkey. -Wayne _______________________________________________ Bitkeeper-users mailing list [email protected] http://bitmover.com/mailman/listinfo/bitkeeper-users To unsubscribe from this list, go to the above URL, follow instruction at the bottom of the web page.