Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to set different revision properties (author, comments and date) via lscm when checking in?

I am trying to create a custom import via lscm (this is a followup from https://jazz.net/forum/questions/108267/options-for-converting-a-very-large-existing-environment-svn-cvs-to-rtc).

The Eclipse-based import seems to be able to map commits to users and set the actual commit dates during import. I want to be able to do the same thing if possible. My import would simulate a regular user "editing" files, creating changesets and then commiting, however if I do this, the existing user will always be the "author" and the timestamp will match the current timestamp.

How can I customize the command-line changeset commit for the following?
  - I don't want to be asked for a password each time lscm runs (I run things on a Linux machine)
  - I would like to change the author field, so that I can match the import historical versions
  - I would like to control the timestamp of the commit, to somehow indicate when a specific commit happened historically

If this cannot be done at commit time, are there any API's that can do this "after-the-fact"? Or even some DB structure documentation to directly change it there?

0 votes

Comments

the comments part is obvious (lscm changeset comment) ... however author seems to always be the login and timestamp does not not seem changeable.

I can see in DB2 the table SCM.CHANGE_SET, where i could change the 'MODIFIED' column, however I would be much more comfortable if these things would be a bit documented.



One answer

Permanent link
I don't recommend changing anything directly on the DB. The table names may differ depending on the DB vendor and it would be a very risky operation to perform in general. It isn't intended for users to edit the DB directly.

For the password, you can use the login command and cache the username and password and give the repository a nickname. It's cached in your home directory with read/write set only for the owner. From that point, you can reference the repository by the nickname and it will use the cached username and password.

The author will always be the currently logged in user when you use the command line. There is no way to spoof operations as a different user. One way you can deal with this is creating all your users up front and switch logins as necessary during your import. You'll always be at a disadvantage here because the SVN importer has the ability to use internal API to get around this.

For the timestamps, there is no way to spoof a change set date. If you're thinking about file timestamps, this was explored at one time to preserve timestamps on checkin but it didn't work well with some use cases so it didn't go any further. Again, the SVN importer has access to internal code for the import scenario so it can set specific timestamps.

Perhaps it would be good enough to set the change set comment to include the revision time and author if you won't be able to use the SVN importer.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,939
× 173
× 158

Question asked: Apr 18 '13, 11:10 a.m.

Question was seen: 6,050 times

Last updated: Apr 23 '13, 2:17 p.m.

Confirmation Cancel Confirm