It's all about the answers!

Ask a question

how to get file revision from scm command line


neeraj karandikar (46152) | asked Aug 18 '10, 2:07 p.m.
How to get the latest revision number for any file present in the RTC SCM using the command line utilities under scmtools.

I have tried scm history. It gives details of previous checkins with an identifier as first column.
E.g. Output of scm history

(1031) $ USER1 "updating file"
(1032) $ USER2 "First checkin to RTC "

Here 1031 is the latest check in.

Few questions related to above output -
Are 1031, 1032 file revision numbers?
If so do we have decreasing revision numbers?
Is there any way to get only the latest revision number?'

Thanks,
Neeraj

8 answers



permanent link
Evan Hughes (2.4k1318) | answered Aug 18 '10, 2:29 p.m.
JAZZ DEVELOPER
How to get the latest revision number for any file present in the RTC SCM using the command line utilities under scmtools.


Jazz is change set based. It uses baselines and snapshots to identify specific revisions.

Few questions related to above output -
Are 1031, 1032 file revision numbers?


No. They are aliases. See https://jazz.net/help-dev/rational-team-concert/index.jsp?topic=/com.ibm.team.scm.doc/topics/c_scm_cli.html (specifically "UUIDs and aliases")

e

permanent link
Geoffrey Clemm (30.1k33035) | answered Aug 18 '10, 4:38 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Also note that in a system that supports branching, "latest" is only
semantically meaningful against some evolving context, which in RTC
would be either a workspace or a stream.

Cheers,
Geoff

On 8/18/2010 2:37 PM, echughes wrote:
neerajkarandikarwrote:
How to get the latest revision number for any file present in the RTC
SCM using the command line utilities under scmtools.

Jazz is change set based. It uses baselines and snapshots to identify
specific revisions.

neerajkarandikarwrote:
Few questions related to above output -
Are 1031, 1032 file revision numbers?

No. They are aliases. See
https://jazz.net/help-dev/rational-team-concert/index.jsp?topic=/com.ibm.team.scm.doc/topics/c_scm_cli.html
(specifically "UUIDs and aliases")

e

permanent link
neeraj karandikar (46152) | answered Aug 19 '10, 4:57 p.m.
Also note that in a system that supports branching, "latest" is only
semantically meaningful against some evolving context, which in RTC
would be either a workspace or a stream.

Cheers,
Geoff

On 8/18/2010 2:37 PM, echughes wrote:
neerajkarandikarwrote:
How to get the latest revision number for any file present in the RTC
SCM using the command line utilities under scmtools.

Jazz is change set based. It uses baselines and snapshots to identify
specific revisions.

neerajkarandikarwrote:
Few questions related to above output -
Are 1031, 1032 file revision numbers?

No. They are aliases. See
https://jazz.net/help-dev/rational-team-concert/index.jsp?topic=/com.ibm.team.scm.doc/topics/c_scm_cli.html
(specifically "UUIDs and aliases")

e


Thanks Geoff and cchughes. Is there a command to get the current baseline number of a file in repository?

permanent link
Geoffrey Clemm (30.1k33035) | answered Aug 19 '10, 9:55 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
A particular file state can be contained in an arbitrary number of
baselines. Are you interested in just one of them, or the list of all
of them?

Probably you should indicate what you want to do with that information,
so we can give you more specific guidance.

Cheers,
Geoff

On 8/19/2010 5:07 PM, neerajkarandikar wrote:
gmclemmwrote:
Also note that in a system that supports branching,
"latest" is only
semantically meaningful against some evolving context, which in RTC

would be either a workspace or a stream.

Cheers,
Geoff

On 8/18/2010 2:37 PM, echughes wrote:
neerajkarandikarwrote:
How to get the latest revision number for any file present in the
RTC
SCM using the command line utilities under scmtools.

Jazz is change set based. It uses baselines and snapshots to
identify
specific revisions.

neerajkarandikarwrote:
Few questions related to above output -
Are 1031, 1032 file revision numbers?

No. They are aliases. See

https://jazz.net/help-dev/rational-team-concert/index.jsp?topic=/com.ibm.team.scm.doc/topics/c_scm_cli.html
(specifically "UUIDs and aliases")

e


Thanks Geoff and cchughes. Is there a command to get the current
baseline number of a file in repository?

permanent link
Evan Hughes (2.4k1318) | answered Aug 20 '10, 9:36 a.m.
JAZZ DEVELOPER
Is there a command to get the current baseline number of a file in repository?


I believe that 'scm lastmod' will do what you're asking for.

e

permanent link
neeraj karandikar (46152) | answered Aug 20 '10, 2:06 p.m.
We have shifted from SVN to RTC.

Previously along with each build we used to publish revision details for selected files in the project(E.g. Jars) using SVN INFO command.
This information can be refered to at a later date to know the file version in a given build and then use it to retrieve that specific revision from SVN if required.

We want to achieve similar logging in RTC.

The 'scm lostMod' may not be useful, if SCM does not allow fetching previous versions of a file using that information.

Thanks,
Neeraj
A particular file state can be contained in an arbitrary number of
baselines. Are you interested in just one of them, or the list of all
of them?

Probably you should indicate what you want to do with that information,
so we can give you more specific guidance.

Cheers,
Geoff

On 8/19/2010 5:07 PM, neerajkarandikar wrote:
gmclemmwrote:
Also note that in a system that supports branching,
"latest" is only
semantically meaningful against some evolving context, which in RTC

would be either a workspace or a stream.

Cheers,
Geoff

On 8/18/2010 2:37 PM, echughes wrote:
neerajkarandikarwrote:
How to get the latest revision number for any file present in the
RTC
SCM using the command line utilities under scmtools.

Jazz is change set based. It uses baselines and snapshots to
identify
specific revisions.

neerajkarandikarwrote:
Few questions related to above output -
Are 1031, 1032 file revision numbers?

No. They are aliases. See

https://jazz.net/help-dev/rational-team-concert/index.jsp?topic=/com.ibm.team.scm.doc/topics/c_scm_cli.html
(specifically "UUIDs and aliases")

e


Thanks Geoff and cchughes. Is there a command to get the current
baseline number of a file in repository?

permanent link
David Olsen (5237) | answered Aug 20 '10, 5:37 p.m.
JAZZ DEVELOPER
neerajkarandikar wrote:
We have shifted from SVN to RTC.

Previously along with each build we used to publish revision details
for selected files in the project(E.g. Jars) using SVN INFO command.

This information can be refered to at a later date to know the file
version in a given build and then use it to retrieve that specific
revision from SVN if required.

We want to achieve similar logging in RTC.

You just need to record the snapshot associated with that build. That
is recorded in the build result, so there isn't really a need to record
that separately. At some later date, you can create a new repository
workspace from the snapshot, and you will have the exact same source
that was used in that build. If you are only interested in certain
files, then you can load only those files.

permanent link
neeraj karandikar (46152) | answered Aug 23 '10, 9:17 p.m.
neerajkarandikar wrote:
We have shifted from SVN to RTC.

Previously along with each build we used to publish revision details
for selected files in the project(E.g. Jars) using SVN INFO command.

This information can be refered to at a later date to know the file
version in a given build and then use it to retrieve that specific
revision from SVN if required.

We want to achieve similar logging in RTC.

You just need to record the snapshot associated with that build. That
is recorded in the build result, so there isn't really a need to record
that separately. At some later date, you can create a new repository
workspace from the snapshot, and you will have the exact same source
that was used in that build. If you are only interested in certain
files, then you can load only those files.

Thanks David, Snapshot should solve our problem.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.