[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Way of listing *pathnames* of files in workspace
From: |
Glew, Andy |
Subject: |
Way of listing *pathnames* of files in workspace |
Date: |
Wed, 30 Jan 2002 14:42:55 -0800 |
I would like to have a way of listing the pathnames of files
in the workspace that are checked into CVS.
E.g. in my repository is in
:ext:plxc2039:/foo/bar/my-cvs-repository
submodule project
and I am on machine linnb007
with my files checked out as
/netbatch/project/cvs.workspaces/project1
with a tree for the project that contains
project/ - the project root directory
project/a.txt
project/b.dir
project/b.dir/c.txt
(i.e. the files checked out are
/netbatch/project/cvs.workspaces/project1/ - the project root
directory
/netbatch/project/cvs.workspaces/project1/a.txt
/netbatch/project/cvs.workspaces/project1/b.dir
/netbatch/project/cvs.workspaces/project1/b.dir/c.txt
)
Then I want to get the list of files:
a.txt
b.dir/c.txt
possibly with or without b.dir
REASON: I want to use this to create a Bill Of Materials, BOM.
It would seem that "cvs status" should give me what I want, with
a bit of massaging... but, frankly, I can't figure out how to do that
massaging without looking at the CVS/{Root,Repository,Entries} files.
And if I have to do that, I might as well just look at those files directly,
and not use the program interface "cvs status". But then I am worried
about fragility.
Reason: cvs status gives me something like:
Working file: a.txt
RCS file: /foo/bar/my-cvs-repository/project/a.txt,v
Working file: b.txt
RCS file: /foo/bar/my-cvs-repository/project/b.dir/b.txt,v
The working file name doesn't include the path.
The RCS file name includes the path, but I need to get rid of
the repository name, "/foo/bar/my-cvs-repository",
as well as the module name, "project".
I can't find the repository name from CVSROOT, because it usually
is not in my environment. (Working with several repositories, using
scripts.) Barring any other way, I seem to have to look at CVS/Root
to get the repository name, so that I can skip that.
Similarly, the module name isn't always the same, or even a single
directory, in the presence of many & modules. Barring any other way,
I seem to have to look at CVS/Repository to get the pathname within]
the repository.
Are any of the ways that I think are barred above actually open?
(The best way I can see to do this without accessing
CVS/{Root,Repository,Entries}
is to run "find -type f -print | xargs -n 1", passing a script to xargs that
runs
cvs status on the filename it is given, printing the filename if cvs status
works.
Klugey, but workable. Is there a better way?)
- Way of listing *pathnames* of files in workspace,
Glew, Andy <=