Skip to main content
1-Visitor
April 22, 2015
Solved

How to find if a subproject existed in a project

  • April 22, 2015
  • 1 reply
  • 4860 views

Hi, guys.

I have the following tree hierarchy:

-folder1:

- folder2/

- ... some content ...

- project.pj

- project.pj

Let's assume that I drop folder2. If I create again the subproject folder2 it will come back with all its content (from what I read in the documentation, PTC is restoring its last archive of the folder2 subproject). How can I avoid this behavior? I don't want PTC to look on the server to see if existed an old version of this folder2.

If this isn't possible, is there a way to find out if folder2 existed before adding it again? All this operations are made from CLI. I think si archiveinfo should solve my problem, but I cannot managed to make it work...

Thanks in advance. 😘

    Best answer by awalsh

    When a subproject is dropped, the subproject is only removed from the current configuration of the parent. Neither the subproject nor its history is removed from the database. The subproject may still be used by other configurations of the parent project, in checkpoints, or as a shared subproject.

    If you want to remove the subproject completely, there is a deleteproject command. This is not done by default because it is very destructive - the data in the subproject is erased and cannot be used again. For more information on the deleteproject command see KCS article 135567.

    1 reply

    5-Regular Member
    April 22, 2015

    Use the command

    si createsubproject --noreuseDroppedSubproject

    (see also attachment).

    oostoia1-VisitorAuthor
    1-Visitor
    April 23, 2015

    Hi, Peter, and thank you for your answer. I tried with --noreuseDroppedSubproject and I get the following error message:

    Creating subproject...

    folder2/project.pj

    folder2/project.pj is not added, since it exists in the server filesystem.

    This is exactly what I'm trying to avoid: PTC looking in its server filesystem. I just want PTC to treat all subprojects as new subprojects even though they were added and dropped on previous operations.

    5-Regular Member
    April 23, 2015

    Is the subproject that you have dropped a shared project?

    And which version of Integrity do you use?

    With Integrity 2009 this feature (create a subproject with the same name again) is not supported.