I need a file compare and merge utility like Synchronize It! only for Mac. THE MOST IMPORTANT feature to me that I cannot seem to find is the ability to save off files that are different and keep the folder structure. As an example, I have a production version of a web app and a self-hosted version of the same app. When I make changes in the production version, I want to provide patches for the self-hosted version - but only the files that have changed. There could be 1/2 dozen files in 5 different directories. So, I need to be able to easily save these files somewhere instead of just merging them. And I don't want to have to print out a diff report, copy the files manually, create the file structure, etc. etc. Thanks!
patch is the inverse of diff. rsync is pretty awesome at keeping files synchronized.
Related
If I have an Xcode project that is version controlled and I want to keep related files together, would it be ok if I added them to a separate group in the project for as long as the files don't get included in any target? I am thinking Photoshop files and the like...
There is no technical reason why you couldn't do this. However, you should be aware that if you are using Git (which is likely since it sounds like you are using the Xcode integration), the Git doesn't deal well with binary files. It will cause your repository to be bloated, as well as the fact that you won't be able to merge these files at a later date.
That said, with tools like git-annex you can get around some of these limitations.
We want to Sync our dev environment to Prod. There are different kinds of files dlls, aspx, html, txt, folders, subdirectories. Is there any tool that can give us report that states these files are out of sync based on modified, created date or version
Is it possible to copy out of sync files from one location to other. We are using windows server 2003
Thanks!
Kris
there are a lot of version control / file comparison tools.. I personally like Scooter Soft's Beyond Compare http://www.scootersoftware.com, it's a bit simple (which is why i like it), then there's this one, which i use at my day job: diffMerge http://www.sourcegear.com/diffmerge/. Honestly, there's a ton of tools for this, each with there different pro's / con's.. it will depend on the granular needs of your situation.
Google "file comparison tool"
As I create more applications, my /code/shared/* increases.
this creates a problem: zipping and sending a project is no longer trivial. it looks like my options are:
in Xcode set shared files to use absolute path. Then every time I zip and send, I must also zip and send /code/shared/* and give instructions, and hope the recipient doesn't have anything already at that location.
this is really not practical; it makes the zip file too big
maintain a separate copy of my library files for each project
this is not really acceptable as a modification/improvements would have to be implemented everywhere separately. this makes maintenance unreasonably cumbersome.
some utility to go through every file in the Xcode project, figure out the lowest common folder, and create a zipped file structure that only contains the necessary files, but in their correct relative folder locations, so that the code will still build
(3) is what I'm looking for, but I have a feeling it doesn't as yet exist.
Anyone?
You should rethink your current process. The workflow you're describing in (3) is not normal. This all sounds very complicated and all basically handled with relative ease if you were using source control. (3) just doesn't exist and likely never will.
A properly configured SCM will allow you to manage multiple versions of multiple libraries (packages) and allow you to share projects (in branches) without ever requiring zipping up anything.
I would like to make a backup of my project, but the folder now exceeds 6.6 GB mainly through extra libraries like boost etc, but even if I just select the folders with my sources, I end up with big files like: .ipch, .sdf and potentially others. To make matters worse I use eclipse to code and VS to compile, so that adds to the mess, although I have the impression that only VS creates big files.
In case shit hits the fan I would like to be able to unpack one archive, and have everything in there like the project settings and solution files, and the sources so that I can easily open it again in VS. I can live with having to re-download boost or other third party libs.
How do you tackle this problem and do I need to preserve file like .sdf?
Answer:
Thanks for all the tips. I will now adopt the solution proposed by LocustHorde because that seems to fit my needs best. I simply want one file that I can take offsite as a safe backup (and I don't want to use an online service). Storing all versions of all files doesn't seem to work towards smaller and simpler and it would be a bit overkill in this case, although I will look to install some version control system because I have no experience with them and I would like to get some...
Final Answer
After having a good look I found that dishing out which files had to be ignored by the winrar archiving was still a hassle. I finally ended up installing Git out of curiosity and liked it. So I now have some of my projects in a local repository. From eclipse I can easily mark files and directories for being ignored, and to make a backup I use git-extensions to clone the repo. I still need to look at purging old versions, which isn't very userfriendly in Git, but seems to be possible at least and then i will just 7zip the folder up. In the worst case I just delete the git database and I just have the last version of my source files. Or maybe I can checkout to another directory. We'll see.
First: Instead of doing a backup, I would strongly recommend using a version control system (VCS) like Subversion, Mercurial, or Git. This is the professional equivalent of a backup, except it maintains every version of every file—not just a copy of the latest version.
Even with a VCS, you will still need to decide which files to check-in to the VCS, and you don’t want to back up files that can be easily re-generated.
For my projects, I generally don’t check-in:
Generated executables (the output in the Release, Debug, x64\Release, and x64\Debug directories).
Pre-compiled headers (the ipch folder)
The browsing database (sdf files)
All of these things can be re-generated by rebuilding your project. If you are working as part of a team, you probably shouldn’t check in:
Your personal settings (.suo)
You can always re-create this if needed.
A particularly nice way to backup your stuff is to put your source in a revision control system. I am using git sometimes, and other times mercurial. Using git I can ignore the files that should not be backed up, by adding them to .gitignore:
Debug
Yokto.sdf
Yokto.suo
*.filters
*.user
ipch
Release
Yokto.opensdf
*.opensdf
*.sdf
With git I can set up a backup repository on a network drive and simply push to it every now and then.
you can write a simple script (batch file) that only zips the types of files you want. suppose, you want to zip all your .aspx, .cs, .config, .xsd files only,
suppose you have winrar installed in your c:\program files\winrar
and your project is in c:\project\MyBigProject
then, just open your notepad, copy paste this, and save as "script.bat" (dont forget the double quotes while saving, you need to save it with double quotes, so that notepad saves as .bat extention instead of .txt)
so to backup (in other words, to zip wanted files) :
"C:\Program Files\WinRAR\rar" a -r0 -ed MyBackup.rar c:\project\MyBigProject\*.aspx,*.cs,*.xsd,*.config
the syntax is like this:
"path to winrar folder" 'switches' "Name of completed rar file" 'folder to zip'
just make sure the paths are in proper order. the "a -r0 -ed" parts are switches, and you can find out all about the switches here:
http://acritum.com/winrar/manual/index.html?html_helpswitches.htm
I use the "Ignore files" switch (http://acritum.com/winrar/manual/index.html?html_helpswxa.htm) to ignore all files and folders that I dont want (with wildcards) and My project is about 86 mb, when It gets compressed just with code files, it comes up to 6mb.
its the best way to do it really. If you need more help, please ask!
edit: Also, Look into SVN (its free!) - I use svn too, and its really helpfull. there is even a free tool called AnkhSvn to integrate into visual studio. its just fantastic!
Doing a "clean" before archiving removes most of what you don't need.
Edited to add:
Of course a version control system is essential for any ongoing project, but that's not what he's asking.
I've got an Xcode project under git and I've got a "experimental" branch off of my "master" branch. Both branches have diverged since the branch (so no fast-forwarding!), and I am merging "experimental" into my "master" branch.
I've setup a .gitattributes file to treat a particular Xcode file (project.pbxproj) as binary, as it should be treated as such. However, I'm not sure exactly how to merge it. I'm not sure what that particular file does, but if for example it handled which files were added to the project there's no way I can merge them, and therefore I'd have to manually add certain files back to the project (possibly not remembering them all). How do others handle this situation?
Also, I've read that you have to manually update binary files (obviously) or copy over different versions. However, once I'm into the merge process the file in my working copy is the "master" version. How can I access the "experimental" version? I can't check it out as it would disrupt the merging process.
Thanks for your time!
In general, for binary files, I recommend a copy-merge type of .gitattribute directive.
That is, I just copy the file coming from the remote end of a merge.
For .pbxproj files however, that may not be a good option, as described here.
Wrapping these files would only make the problem worse as far as I can tell - as you wold be completely unable to merge changes.
While you can merge project files in some cases, it's not something that you should
count on being able to do. The basic recommendation is to avoid editing the project files at the same time as someone else.
I like versionning projects files (like the ones for Eclipse), only if I know they are:
not modified that often (certainly not by each developers)
only using relative paths
no data specifics to one workstation
In short, if those files are not to be merged (or will only be trivial to merge), I want them in a VCS. In your case, that may not be so useful to have them in said VCS in the first place.
Note: as mentioned in the Git manual:
During the merge, the index holds three versions of each file. Each of these three "file stages" represents a different version of the file:
$ git show :1:file.txt # the file in a common ancestor of both branches
$ git show :2:file.txt # the version from HEAD.
$ git show :3:file.txt # the version from MERGE_HEAD