Best Practices for Versioning Scripts

Is there some EggPlant standard way to put our scripts/images/suites into a versioning system?

My initial pass was to throw it into svn, but it looks like it uses some filenames/resource forking that is not supported by svn. (ignoring the fact that SVN is really bad with binary files anyway)

My question is if normal version control systems will not take the projects, how do you version/backup?

Is there a version control system that works with eggPlant: git,hg?

Perforce works well. It also runs on Windows, Mac, and Linux which is nice.

Actually, Subversion should work fine for your scripts and suites. We’ve moved away from anything that should cause problems, so I’m not sure what you ran into, unless it was an older suite which may have had a file with a resource fork to provide an icon for the suite folder. In any case, the only resource forks that were ever used in Eggplant suites were for non-critical icons (visible when browsing the file system, but not used by Eggplant itself), so they could be safely omitted from your repository.

The main difficulty you may run into with keeping a suite in a repository is when capturing new images and reorganizing them. In particular, turning an image into an image collection makes a new subfolder and moves the original image into it. This may require a bit of extra work to get your repository properly updated when those changes are made.

If you run into any issues which actually prevent you from storing a suite in a version control system, please let us know. We recognize the importance of version control and don’t want to create any impediments to using your repository of choice.

First off… I loathe SVN of any kind. We should keep everything on post it notes.

I know I probably shouldn’t have done this… but when I want to create a new Suite for a new version of our software… I just copy/paste or duplicate the old one and rename it.

Sure it sounds fun! But it also copies all the hidden .svn files that got put in the very first suite when somehow I figured out how to get that one into Hudson using versions.

Now, when I try to add one of my suites it sez… and I quote, “This file is already under Version Control you weenie!” I suspect the hidden .svn directories need to alllll be deleted in every directory in the suite… which is where I find them.

Oh, and I blow and command line stuff… so… how do I get my almost 3 gigs of suites cleaned up!

The easy answer is for someone to say… Eggplant doesn’t handle version control… then I can just burn it on a DVD and send it to the client. I mean… I’m the only one working on it at this point.

:slight_smile: Weeeeeeeeee

At least on Mac and LINUX this command should do the trick:

find FOLDER_NAME -depth -name .svn -type d -exec rm -rf {} \;

Replacing FOLDER_NAME with your suites folder.

thank for the info…


state farm term life insurance
How Much Life Insurance Do I Need

I opened iTerm and just plugged it in… with the Folder name of course… and respecting Caps. I did a copy and past of the folder name in fact.

Last login: Sun Mar 18 12:51:07 on console
iMac:~ johnspitta$ find EggPlantSuites -depth -name .svn -type d -exec rm -rf {} \;
find: EggPlantSuites: No such file or directory
iMac:~ johnspitta$ 

Any tips? When you say “folder name” you don’t mean the full path do you?

Thanks

Full path would work, or you can change into the parent directory (with cd).

So, I think I got it. If you are foolish enough to COPY PASTE to create new suites - figure out the path to your folder and do this:

find /Users/john/Desktop/EggPlantSuites -depth -name .svn -type d -exec rm -rf {} \;

Depending on you SVN setup just remove all your previous repositories and start over… re-commit everything.

But one of my questions remains. What is the Best Practice for creating new suites?

thanks

Why not just create a new suite via the New Suite command in the application? Any other form of copying is going to be moving log files and configuration files that aren’t going to make sense in your new suite. What benefit are you trying to gain by copying them from existing suites?

When I create a new Suite… it’s empty. I want all my current scripts and images copied over.

The easiest thing to do would probably be to first create the Suite in eggPlant, then go to the Finder and copy in the Scripts and Images folders from another Suite. That won’t eliminate the problems with the SVN files though; you’d still need to run your command line call to clean those up.

I’m assuming that you don’t want all the old results and that’s one of the problems with just making a copy of an entire suite. You could just delete the Results folder after you do the copy (eggPlant will automatically create a new one), but that will still leave you with one other issue, which is…

…the SuiteInfo file, which lives at the top level of the Suite. This contains lots of other information that you may or may not want to include. One thing the SuiteInfo file records is the paths to the Helper Suites – if you want to include those from an old suite in a new suite, then you could do so by including the SuiteInfo file – if you just duplicate the Suite, you’re getting those whether you want them or not. Another thing you’ll get is the summary for each script: First run, last run, last status, number of fails, number of runs. The configuration of the Schedule tab is also stored in this file.

So when you just do a copy of a suite, you’re getting a lot more than just the Scripts and Images. Whether that’s what you want and how much of it you want is up to you.