crashnburn Posted March 20, 2013 Report Share Posted March 20, 2013 Import old un-managed numbered & named versions as back-dated and linked changesets / snapshots into a managed revision repository - How? I have a tons of these documents (.DOC/ .DOCX) from over the years in a Named Format - YYYY-MM-DD - ABC Name - XYZ Variation. I'd like to do a historical import of them into Plastic SCM such that they are LINKED in the lovely GRAPHIC/ VISUAL path rendition in Branch Explorer. Now, I know this may not be standard - But I believe you have a "data structure" via which you TimeStamp versions & variations and keep inside Plastic SCM. I dont mind writing some code/ script against Plastic SCM API to IMPORT these "versions" and "variations" into the RECORDS / SYSTEM managed by Plastic SCM. I am guessing some of the brilliant people at Plastic SCM might have already tried something like this. If you can import-export with other revision control systems ( and their structures) such as Git, etc. then this would be a Simple Custom structure to IMPORT. It might be an interesting subject of discussion to import historical archive material and have it show up connected in Branch Explorer. PS: Should I create a separate thread for this..? Originally posted here and re-posted as a fresh thread as per moderator request & response here. Manu: Yes please create a new topic, I have some ideas to hack Plastic in order to achieve what you want. It will require some scripting or programming. Thoughts? Can you get Amalia (from here) to also look at this post/ question. Link to comment Share on other sites More sharing options...
calbzam Posted March 21, 2013 Report Share Posted March 21, 2013 Hi, One possibility is to write a script using cm checkin command adding a comment with file date: cm checkin file.doc -a -c"21-03-2013" You can create a script that performs different commits, getting the date from the file name and and you will get all the files organized in the branch explorer . I know it´s not an optimal solution, Manu and me will try to modify the date that Plastic stores in the database in order to improve the script, and manage the commit timestamp. Best regards, Carlos Link to comment Share on other sites More sharing options...
crashnburn Posted March 26, 2013 Author Report Share Posted March 26, 2013 Carlos - Thank you for responses. Manu are you still around here? Did you have some more interesting ideas to hack Plastic? (As you had mentioned)? Or were you thinking the same as Carlos. I was hoping for maybe a little more "data enrichment". Sample Command Script: cm checkin file.doc -a -c"21-03-2013" My File Naming / Schema: YYYY-MM-DD - ABC Name - XYZ Variations/ Paths. Plastic DB Schema: "data structure" via which you TimeStamp versions & variations and keep inside Plastic SCM. Questions and Thoughts: - Can I push more Data/Meta-data / Parameters into the Plastic DB Schema when Importing via Script/ or API? A little more "rich data point/ changeset" - Can I create / alternate paths / branches? (I am assuming if we could understand and map to the DB Schema better) - Can you share some sample scripts and maybe a Guide to build further? Link to comment Share on other sites More sharing options...
manu Posted March 27, 2013 Report Share Posted March 27, 2013 Yeah! I'm here and I have some tips about hacking the system! You can hit me at mlucio at codicesoftware dot com First you need to use sqlite, it's going to be easier, I leave you one example to hack the csets dates. The csets dates are stores in utcticks, a long value to represent the date. You can review them by issuing the following query: cm q "select dtimestamp from object where itype=15" You can edit that value and play with the dates: long initTicks = 130088584710000000; DateTime time = DateTime.FromFileTimeUtc((long)initTicks); Console.WriteLine("Time: " + time); time = time.AddDays(2); Console.WriteLine("New Time: " + time.ToFileTimeUtc()); Console.ReadLine(); I can give you more details using the mail or a call. It ill be funny. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.