How to get only the changes done to a file in the sandbox?
I want to find out with lscm what changes I did to a file that I have in my sandbox. I know that I can compare it with 'lscm diff' against the current state in the workspace or in the stream. But that does not only show the changes I did locally in the sandbox, but also those changes to the same file that someone else delivered into the stream or check-in to the workspace (or that I myself delivered or checked-in from another sandbox fixing something else in the same file). But I only want to see my local changes in the sandbox i nquestion. For instance an 'lscm diff' of the local file against how the file was at the point in time when it was loaded into the sandbox, would give the desired information. How do I specify that I want to 'lscm diff' the local file against the files as it was at load time?
Regards, Markus. |
Accepted answer
Geoffrey Clemm (30.1k●3●30●35)
| answered Feb 26 '15, 12:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Based on the comments, the central issue here is trying to use the same workspace with more than one sandbox. The answer is simple. Do NOT do that. More details in comments in the previous answer threads.
Markus Selve selected this answer as the correct answer
|
2 other answers
Shashikant Padur (4.3k●2●7)
| answered Feb 18 '15, 11:31 p.m.
JAZZ DEVELOPER edited Feb 18 '15, 11:33 p.m.
lscm diff file <file path> will compare the local changes with that of the latest in the workspace. If your current loaded state was from a baseline then you could use lscm diff file <file path> baseline lt;baseline name/id>. Or if you know the last change set that was accepted (you can run lscm history <file path> and choose the change set based on date/time) you could use lscm diff file <file path> changeset <changeset id>.
By the way, if you have modified the file in the workspace from another sandbox then your current sandbox should report as out of sync.
Comments
Markus Selve
commented Feb 20 '15, 4:37 a.m.
The 'lscm diff' to that changeset from which the file was loaded is what I'm searching for. But how do I know which changeset that was? Does 'lscm load' store this information like in the .jazz5 sub directory? And if so, how do I access this information?
The metadata information in not exposed in the clients.
You could run 'lscm status' to figure out what files changed, copy those file into a temporary folder, re-load the workspace and merge those changes back using an external merge tool.
Markus Selve
commented Feb 23 '15, 10:55 a.m.
I want to merge my changes with the Unix command 'patch'. So I need to know the changes I did. If I would use the difference between the local file and the file in RTC as it is at the current moment, I would reverse the changes that others did. Here is an example what would happen:
|
Geoffrey Clemm (30.1k●3●30●35)
| answered Feb 23 '15, 1:54 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Based on the comments, it appears you are trying to preserve your changes from an out-of-sync sandbox.
You might want to add your support to work item: https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=344701 "Improve handling of resynchronizing a workspace component" Comments
Markus Selve
commented Feb 24 '15, 4:45 a.m.
I read the description of work item 344701. If I understood it right I'm not sure if I want to support that work item. It seems to suggest to block parallel check-ins to the work space. But that makes using the library more complicated not better. I'm more interested in how to deal with parallel releases to the library.
Geoffrey Clemm
commented Feb 24 '15, 8:35 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
What part of the description of 344701 led you to believe that it would block parallel check-ins? To the contrary, the change set that would be created is what captures the parallel check-ins.
Markus Selve
commented Feb 25 '15, 5:10 a.m.
This part of the description:
Markus Selve
commented Feb 25 '15, 5:27 a.m.
No, I don't want to maintain two releases of a library or with a different SCM system.
Markus Selve
commented Feb 25 '15, 6:39 a.m.
I tried to do this through one RTC server workspace as I didn't see the need for using more than one workspace. To me that seemed to be cluttering the server with lots of workspaces. And there are commands 'lscm deregister' and 'lscm register' that seemed to be made for exactly this purpose to bind the current sandbox to the RTC server workspace.
Geoffrey Clemm
commented Feb 26 '15, 12:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
WRT not being able to use the same workspace concurrently with the same sandbox ... that does not block you from doing parallel checkins, it blocks you from doing parallel checkins the wrong way. You can do parallel checkins with a single workspace, but it is by suspending changes, working on other changes, and then resuming the suspended changes. But if you want different configurations loaded in different sandboxes, you should use different workspaces.
Markus Selve
commented Feb 26 '15, 10:44 a.m.
WRT to merging changes: I think my problems stemmed from two errors of mine:
Markus Selve
commented Feb 26 '15, 10:48 a.m.
Regarding the sequence listed in the last post:
Geoffrey Clemm
commented Feb 28 '15, 12:20 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
One key thing to keep in mind is that unlike many SCM systems that only provide a single operation, "checkin", to both persist changes on the server and make those changes visible to other team members, RTC provides two operations: "checkin" and "deliver". The checkin operation is just to persist the changes on the server. The deliver operation is to make those changes visible to other team members. So there is no reason to avoid checking in partial changes, no matter what state they are in (partial, does not compile, whatever). In fact, there is a mode you can specify in Eclipse where it automatically checks in your change as soon as you save it (I do not recommend turning on that mode ... there's no reason to hit the server on every change). But if you want to share a change to another one of your workspaces, then a checkin is always the right thing to do (no matter what state that change is in).
Markus Selve
commented Mar 03 '15, 7:31 a.m.
I did understand the difference between checkin and deliver on an intellectual level immediately, but many years of using other library systems and the typical policy of the development teams not to checkin code that does not compile, created a mental block for me to checkin unfinished code. But of course in RTC it does no harm in the own server workspace. So now that I understand the way to go to get code merged is through the server workspace, I'll use that way.
showing 5 of 10
show 5 more comments
|
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.