Managing multiple changelists/check-ins in Source depot with help from Excel
I’ve been working on some changes which involve both the additon of new projects as well as changes to some of the base layer projects in the depot. When it came to check-in time I discovered that the check-in automation and testing ran things in an order which required splitting my check-in into at least two smaller check-ins. Basically the new projects were going to have to be added and exist in the branch before anything that referenced them could be changed or else these would fail. So how do I split my check-in/changelist?
The answer is to use multiple changelists and the challenge is to find an efficient way to move files from one changelist to another. This is not rocket science, but it required a small bit of thinking on my part so I thought I’d record my solution here for my own future reference and if it helps someone else, that that’s great too!
1. Get the list of files opened in all changelists using comamnd “sd opened”. I piped this to a text file so I could manipulate it so the full command was:
“sd opened > allchanges.txt”
2. Sort the changes by changelist so I can pick out the ones which need to be moved.
To do this I fired up Excel, and imported the allchanges.txt (In the ribbon, click “Data", then "From Text”). I choose delimited and se t the ‘-‘ character to be the delimiter.
This brought the lines into the spreadsheet in two columns:
Excel lets me sort on the right-hand column (or on the folder names) and I can then copy the relevant entries to another page and add a column with the “reopen” command to move changelists. I use the DOS “call” command here so that I can run multiple reopen commands in a batch file in my coreXT window. A quick find and replace then also removes the version nos. (“#0”).
I then copied this set of columns/cell to a text file again and now have a batch file, which does the required changelist moving for me.