How can I only populate a subtree in my workspace instead of the entire stream contents?

I'm hoping this is a stupid question but I have been unable to find an answer.

The streams I'm working with has a lot of stuff I don't care about and the folder that I end up working in is ~8 levels deep, e.g., /a/b/c/d/e/f/g/my-stuff. Is there a way to get my-stuff/* at the top of my workspace w/o all the other stuff that I don't need?

Thanks.

  • Suggested Answer

    You need to use "accurev excl" to Exclude files or directories.  This command is not in the GUI, it's command-line only.

    If you create a workspace via GUI, it will populate the entire workspace, and then from the command-line you can use "accurev excl" to remove the parts you don't want.

    If part of your need includes not populating everything to begin with, you need to use this process via command-line:

    1. mkdir workspace-dir
    2. accurev mkws
    3. cd workspace-dir
    4. accurev excl
    5. accurev pop -R

    The 'pop' will skip everything set via 'excl'.

    'excl' takes either a single file/directory, so for multiple files/dirs you need to execute multiple 'excl', or use "-l listfile"  (lowercase L).

  • Thanks for your reply. I already have a lot of files excluded but It doesn't move the files I am working on to just the workspace folder directly. I still have to cd down a bunch of levels. I've been dealing w/ this by creating symbolic links at the same level as the workspace folder to access the deep folder via "cd -P" to get bash to not help me out b/c some file ops get weird. I just would have thought that AccuRev could keep track of this very easily.

    For example, using Subversion I can do the following:

    svn checkout file:///home/repos/projectX/a/b/c/d/e/f/g/my-stuff my-stuff

    and then all those deep files are only a single level deep. I was hoping I was missing something but it doesn't seem so.

  • Yes, you can exclude part of a workspace, but you don't checkout at a depth within a stream.

    You can, within AccuRev, create links to directories via 'accurev ln', for example, at the workspace root you could do "accurev ln a/b/c/d/e/f/g/my-stuff my-stuff.  Then, in the workspace root, my-stuff would be a directory link.