This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to populating e-link targets?

I am trying to populate a folder that contains an e-link to an element in another folder. Lets call the e-link in the first folder the "link" and the element in the other folder the "target".

Right now, if I pop all the contents of the folder containing the link, but not the contents of the folder containing the target, the linking fails and I end up without the target that I expect to get.

In order for the linking to succeed, it seems that I have to pop all the contents of the folder containing the link and also pop the target in order for the linking to succeed.

Is there anyway to force accurev to pop the target of an e-link when an e-link is popped?

Thanks

Parents
  • The pop command will retrieve the version of the e-link from the last time you ran update or your last promote operation, whichever came last. It tries to ensure all versions in your workspace are at the requested UpdateLevel. So the question is, why does this version of the e-link not point to the version of the target you expect to see?

  • So I think I left some details out earlier. I am not popping into a workspace - here is the pop command I am using:

    accurev pop -v stream_name -L $WORKSPACE -O -R ./folder_containing_e_link

    When I do this, I end up with

    $WORKSPACE/folder_containing_e_link

    Output is like this:

    Creating dir: /./folder_containing_e_link

    Populating element /./folder_containing_e_link/file1
    Populating element /./folder_containing_e_link/file2
    Populating element /./folder_containing_e_link/file3
    Failed to create link for element /./folder_containing_e_link/e_link_file

    The $WORKSPACE at this point has all files except the e-link

    If instead I pop like this:

    accurev pop -v stream_name -L $WORKSPACE -O -R ./folder_containing_e_link ./folder_containing_target

    I end up with both folders in $WORKSPACE. Output is like this:

    Creating dir: /./folder_containing_e_link
    Creating dir: /./folder_containing_target

    Populating element /./folder_containing_e_link/file1
    Populating element /./folder_containing_e_link/file2
    Populating element /./folder_containing_e_link/file3

    Populating element /./folder_containing_target/target

    Linked file /./folder_containing_e_link/e_link_file

    In this case I now have two copies of the target, one in each folder.

    So, my question is, how can I force accurev to pop the target of the e-link without explicitly popping the target?

Reply
  • So I think I left some details out earlier. I am not popping into a workspace - here is the pop command I am using:

    accurev pop -v stream_name -L $WORKSPACE -O -R ./folder_containing_e_link

    When I do this, I end up with

    $WORKSPACE/folder_containing_e_link

    Output is like this:

    Creating dir: /./folder_containing_e_link

    Populating element /./folder_containing_e_link/file1
    Populating element /./folder_containing_e_link/file2
    Populating element /./folder_containing_e_link/file3
    Failed to create link for element /./folder_containing_e_link/e_link_file

    The $WORKSPACE at this point has all files except the e-link

    If instead I pop like this:

    accurev pop -v stream_name -L $WORKSPACE -O -R ./folder_containing_e_link ./folder_containing_target

    I end up with both folders in $WORKSPACE. Output is like this:

    Creating dir: /./folder_containing_e_link
    Creating dir: /./folder_containing_target

    Populating element /./folder_containing_e_link/file1
    Populating element /./folder_containing_e_link/file2
    Populating element /./folder_containing_e_link/file3

    Populating element /./folder_containing_target/target

    Linked file /./folder_containing_e_link/e_link_file

    In this case I now have two copies of the target, one in each folder.

    So, my question is, how can I force accurev to pop the target of the e-link without explicitly popping the target?

Children
  • The -L option is used to specify the destination. Your example has it as $WORKSPACE. It should not be a folder inside a workspace.

    Here's something that should work. Create a new folder on your machine, open a command window and CHDIR to this folder. Then type in the following command (including dots):

    accurev pop –L . –R –O –v <stream_name> .

  • I apologize for the confusion. The $WORKSPACE variable is not an accurev workspace but just a regular directory. In my example I am popping a bunch of stuff to create an RPM and the $WORKSPACE variable just points to the present working directory.

    Your example works perfectly, except that it pops the entire stream. In my use case, I have a stream with several thousand files. The pop on the entire stream can take several minutes and I wish to avoid this. 

  • I'd recommend using a list file. You'll get only what you specify, nothing else. See -l <list-file> for the pop command in the CLI guide. It is best to use depot-relative pathnames in the file.