Tuesday, February 12, 2008

How To Fix: recreate accidentally removed prep project (original project version exists, successor working project exists) (work)

1. Create new project for Integration Testing purpose.
To do this: copy project from existing Working Project (myproj#john-2.00.00:project:1). Make sure new project has the same release as the working project and the correct version name and purpose.
The project is created but the status is working. We will change this later.
2. List all three projects to see their full object names:
$ ccm query -type project -name myproj -f "%objectname"
1)
myproj#1.00.00:project:1
2)
myproj#2.00.00:project:1
3)
myproj#john-2.00.00:project:1

3. Now fix the relations of the projects. We shall get the project 2.00.00 as a successor of 1.00.00, and then 2.00.00-john as a successor of 2.00.00.
First relate the projects as needed, then remove the old links:
$ ccm relate -n successor -f myproj#1.00.00:project:1 -t myproj#2.00.00:project:1
'successor' relationship created from '
myproj#1.00.00:project:1' to 'myproj#2.00.00:project:1'
$ ccm relate -n successor -f myproj#2.00.00:project:1 -t myproj#john-2.00.00:project:1
'successor' relationship created from '
myproj#2.00.00:project:1' to 'myproj#john-2.00.00:project:1'
$ ccm unrelate -n successor -f myproj#john-2.00.00:project:1 -t myproj#2.00.00:project:1
'successor' relationship deleted from '
myproj#john-2.00.00:project:1' to 'myproj#2.00.00:project:1'
$ ccm unrelate -n successor -f
myproj#1.00.00:project:1 -t myproj#john-2.00.00:project:1
'successor' relationship deleted from '
myproj#1.00.00:project:1' to 'myproj#john-2.00.00:project:1'

4. Check the Integration Testing project status:
$ ccm attr -s status myproj#2.00.00:project:1
working
It should be prep, not working. (Working was inherited from the original working project it was copied from).
5. Change the status attribute:
Note that to change the status we should clear the 'Make Copies Modifiable' property of the project work area as suggested:
$ ccm attr -m status -v prep myproj#2.00.00:project:1
Check in to prep state not permitted for projects with 'Make Copies Modifiable' work area setting.
Attribute 'status' could not be modified on object '
myproj#2.00.00:project:1'

$ ccm attr -m status -v prep
myproj#2.00.00:project:1
Status has been now changed to prep, no output is produced by command ccm attr.
~~~ End of story ~~~

No comments:

Post a Comment