- Home /
Asset Server- Committing a Reverted Project
Hey guys,
Ran into a problem, and hoping someone can give me the long shot I need to resolve it. One of our junior engineers was kind enough to check in hundreds of breaking file changes. I can revert the project to the last stable revision without problem and the project runs perfectly on my local client. Problem seems to be that it doesn't register any of the reverted files in my local changes, which means I can't commit the stable version. The immediate solution that came to mind was to touch the reverted files so that they become flagged as changed. However, I'd rather not iterate through hundreds of files to do this if I can avoid it. So, question I guess boils down to: How do I flag reverted files as changed so that I can commit them, without manually touching every file?
License info: Unity (Pro) 4.1.2f1 Asset Server + Team License
Thank you for your help,
Memige Den Adel LOOT Entertainment | SonyDADC New Media Solutions
Answer by gardian06 · May 29, 2013 at 09:39 PM
EDIT: misunderstood initial issue:
copy over the (working) project to a different file location.
update to the current build
either copy the files back, or do a directory comparison with something like WinMerge to replace the files that "need" to be reverted
this way you don't have to manually insert/delete a blank line in each file. had to do this twice when a massive new feature had to be removed, and then put back in (still don't like that PM)
this is to revert local project to revisionX
in "show history" find the revision you want to revert to. in the bottom right corner there is a button "revert Entire Project to ####" not sure if this is an irreversible modification.
the last time we had an issue where the server was causing problems (conflict of creation and destruction of files) we had to essentially restart the project (take the last fully functional build, and start a new asset server instance)
as a side note have this junior dev fix the errors that s/he made, or maybe they placed a needed file as a commit exception.
Thank you for the feedback. The first step you mentioned was actually how I reverted to the stable build that I mentioned in my original post. The engineer responsible left for vacation immediately after the commit, and will certainly be sat down and talked to when they return. In the mean time, I am aware of what the errors were, and can fix them, but as mentioned there were hundreds of files changed and it would not be a good use of my time to fix it all. I acknowledge your suggestion to start a new project and will consider that as a fallback option, but I'd prefer a solution that won't wipe out our server history.
Hrm, looks more promising. I'm a bit nervous that changing things through explorer is going to corrupt the meta files and break the versioning history. When you did this in your project did you lose the server history on the overridden files?
according to Unity this should break the project, but in all reality all those .meta files are is just a relativity pointer, and more in depth prefab/scene data (yes prefabs and scene may be damaged in this proses, but those should not be "too" complex to repair)
on your point of loosing the server history technically by overwriting the files so that the binary comparison that Unity does is different (the copy back) technically it would be the same as manually editing the files in your text editor to be the working version, so you just get a new version number, and your good.
technically speaking (figured this out when playing around on a person project) you can do this copy over to new directory find and delete all .meta files (except prefabs and scenes) then when you copy back and re-initialize unity (having it do an asset compile) it will fix the .meta files for you. the reason I draw exception to prefabs and scenes is that those .meta file actually functions as a double ended pointer to all of the texture/material/script/component data, and therefore this is the reason that it is impossible to merge them
Alright, I'll give it a try and see how it goes. Will update shortly.
Your answer
Follow this Question
Related Questions
Asset Server - how do I commit without updating 0 Answers
How to import the object from server to unity 2 Answers
Unity Asset Server Ignore update? 0 Answers
Asset Server and Lightmapping causing unnecessary server updates 0 Answers
Why unity applies prefab position to my reverted gameobject ? 0 Answers