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

get a checkpoint with head revision as of this checkpoint

tdalon
12-Amethyst

get a checkpoint with head revision as of this checkpoint

Hello

Given a checkpoint, do you know a way - by command line - to get/download the project as of the checkpoint time and in the head revisions configuration (instead of member revision).

To get the the checkpoint and its member revisions as of you can create a build sandbox.

To get the sandbox head revision state, you can checkout the sandbox without lock.

I am not sure the check-out of a build sandbox would do what I want.

Many thanks

Thierry

ACCEPTED SOLUTION

Accepted Solutions
tdalon
12-Amethyst
(To:tdalon)

  • Get Checkpoint timestamp
    • using e.g. si viewprojecthistory --sandbox=$MKS.sb --fields=revision,labels,date,description
  • Create build sandbox
    • using e.g. si createsandbox --forceConfirm=yes -P$MKS.pj --projectRevision=$rev --gui --noopenView
  • Checkout with revision at time=checkpoint timestamp
    • using e.g. si co --sandbox="sandboxpath" -R --nolock --revision="time:01.01.2014 13:00"

View solution in original post

8 REPLIES 8
mrump
16-Pearl
(To:tdalon)

Hi Thierry,

i asume you want to have the project configuration (what members and Subproject are defined) as of the checkpoint in a sandbox, but the member should be in their latest revisions (a kind of "Rebase" Use Case). Correct?

I'd try this:

1. create a build sandbox box based on the checkpoint of interest.

2. Than use "si co -nolock --revision=:head --recurse".

3. Save this new Setup via "si snapshot"

4. create a new Development path from the checkpoint generated by the Snapshot

5. retarget you sandbox to the new Dev Path

HTH Matthias

tdalon
12-Amethyst
(To:mrump)

Hi Matthias

To be maybe more precise I want the member to be in their latest revision at the time of the checkpoint.

The problem with step 2 is that it takes the head revision of the current project and not at the time of the checkpoint. Means if I check-in another revision after the checkpoint it will be captured by the check-out and not the head revision at the time of the checkpoint.

Am I clear?

I don't want to make a snapshot afterwards. Just want to get the head revision of a checkpoint. For example for review of the head configuration at a marked time.

Many thanks

Kind Regards

Thierry

tketz
12-Amethyst
(To:tdalon)

Hi Thierry,

try to create a normal sandbox. Then check out the complete sandbox without lock and in the properties tab of the check out wizard choose "Last revision at Date" and choose the timestamp of your checkpoint.

If you want to automate this, you can script a custom button which first get the checkpoint timestamp from projecthistory.

tdalon
12-Amethyst
(To:tketz)

Hi Tobias

This sounds exactly like what I was looking for. (I din't know this check-out option).

After a closer look into the CLI documentation, I shall use the

--revision=:time:timestamp

uses the most recent revision on any branch at the specified timestamp. For example, -rtime:December 22, 2007 3:33:34

PM GMT-05:00. Integrity recognizes all current timezones whatever your locale (country), for example, CEST, CET, EDT, PST,

or GMT+/-hours:minutes. The following examples illustrate North American and German timestamps recognized by Integrity:

to get a head revision as of a timestamp.

Many thanks

Kind Regards

Thierry

tketz
12-Amethyst
(To:tdalon)

try this:

si co --sandbox="sandboxpath" -R --nolock --revision="time:01.01.2014 13:00"

please have a look at time. In my example is CEST.

you find the documentation about this in "CLI Reference for Configuration Management" (10.2) on page 259.

I think its also in 10.3 under "general options"

Best regards

ps. hope you understand my english

update:

oh you found it at yourself

tdalon
12-Amethyst
(To:tketz)

Thanks for the reply.

Slight change in your answer to mark it as correct:

I would still create a build sandbox because with a normal sandbox I may get members that were added after the checkpoint and they would stay after the check-out, right?

(I have already made some sad experience with time stamp format in Integrity. ;-))

tketz
12-Amethyst
(To:tdalon)

ok,

now i hope for the correct answer:

try this:

si co --sandbox="sandboxpath" -R --nolock --revision="time:01.01.2014 13:00"

alternative:

si resync --sandbox="sandboxpath" -R --revision="time:01.01.2014 13:00"

please have a look at time. In my example is CEST.

you find the documentation about this in "CLI Reference for Configuration Management" (10.2) on page 259.

I think its also in 10.3 under "general options"

be patient:

you can use a normal sandbox. when you start the si co command with a timestamp you get an error for every file which not exists at the given timestamp. But in the sandbox location you have the file.

so the best option is to use a build sandbox.

tdalon
12-Amethyst
(To:tdalon)

  • Get Checkpoint timestamp
    • using e.g. si viewprojecthistory --sandbox=$MKS.sb --fields=revision,labels,date,description
  • Create build sandbox
    • using e.g. si createsandbox --forceConfirm=yes -P$MKS.pj --projectRevision=$rev --gui --noopenView
  • Checkout with revision at time=checkpoint timestamp
    • using e.g. si co --sandbox="sandboxpath" -R --nolock --revision="time:01.01.2014 13:00"
Announcements


Top Tags