cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How to find if a subproject existed in a project

oostoia
1-Visitor

How to find if a subproject existed in a project

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. 😘

ACCEPTED SOLUTION

Accepted Solutions
awalsh
17-Peridot
(To:oostoia)

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.

View solution in original post

7 REPLIES 7
pmerkle
12-Amethyst
(To:oostoia)

Use the command

si createsubproject --noreuseDroppedSubproject

(see also attachment).

oostoia
1-Visitor
(To:pmerkle)

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.

pmerkle
12-Amethyst
(To:oostoia)

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.

oostoia
1-Visitor
(To:pmerkle)

No, the subproject that I have dropped isn't a shared project and it will never be one.

I use Integrity 10.5. On this version, if I create again a subproject with the same name, PTC will look on its filesystem and "resurrect" the subproject with its older content. I want the subproject to be empty, I don't need its older content, this is why I dropped it in the first place ). This behavior doesn't make sense for me at all.

pmerkle
12-Amethyst
(To:oostoia)

OK .. can you create s support case concerning this probem ?

awalsh
17-Peridot
(To:oostoia)

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.

oostoia
1-Visitor
(To:awalsh)

Thank you, Ann, for the answer. Now it makes sense for me why it behaves like that.

Anyway, if somebody will encounter this problem in the future, I used the following workaround:

1. add the subproject

2. resync sandbox

3. if the content of the subproject is not empty, then it existed in PTC filesystem so we need to drop its content

4. add the new content in the subproject.

Announcements


Top Tags