XCode 4 Snapshots file set management - xcode4

I've been using snapshots in Xcode 4 and have restored some old files now and then or compared the current version of a file with a previous version occasionally, so I thought it was pretty handy.
But then, I've tried using it on a fairly big project with dozens of files and I have just realized that this sucker doesn't remember the actual list of files that are part of the project in the snapshot, or at least it doesn't make uses of it.
For instance, at a certain time, I make a snapshot (S1) of my project, which contains files A, B, and C. Then later, I rework my code, delete file B and introduce files D and E, and make a number of snapshots (S2, S3, S4).
Now suppose I recover S3 in full. Well, I end up with file B in my project folder, even though it's not part of the project since snapshot S2...
There's a way to select which files you want to restore out of the complete set, but when I have 100+ files in the project, I don't even remember which ones are really still used and which ones are old and I can't be bothered clicking those stupid checkmarks one after the other to remove those files I don't want.
Is there something I'm doing wrong? Is there a way to tell Xcode to restore only those files that were indeed in the project at the time of the snapshot (as it should do if it had any sort of brain)?
Thanks

Related

How to extract infos in a .db file to create .csv or any viable "bookmark" file?

I am using a quite unknown bookmark manager on Android. I picked this one after trying others because it was possible to import, export, classify by folders, the design was good and it was easy to search in my bookmarks.
After importing all my bookmarks from other browsers and also from files, I started classifying all of them into folders, subfolders, etc..
I spent many days to classify them all as I wanted.
After classifying them, I tried to export them.
The problem is that the only option offered is to export them in a .html file, containing all the bookmarks but without any folder.
The .html file contains all my bookmarks but in complete desorder, and doesnt mention the folders.
In the app there was also a "backup" function, so I tried and it creates a .db file.
I opened this .db file with some SQLiteViewer app and I found written inside, among other things I dont understand, a list of all my bookmarks with a number next to each one of them, and also a list of my folders with next to them the corresponding number.
When I open the .db file, I have a choice between
-SQlite master
-android metadata
-bookmarks
-folders
-sqlite sequence
If I click on "Bookmarks", all my bookmarks are in a kind of spreadsheet with lines and columns. Next to them in another columns, for example for each bookmark related with "Kitchen recipes" it's written the number 1.
And in the "Folders" folder, next to the folder called "Recipes" its also written 1.
So I'm happy because it seems that my classification is stored in this file.
But the fact is I dont know how to extract easily all that data, and create with it a "bookmark" file importable in other bookmark app or browser ( for example .csv or .xbel or .html but with folders)
I guess I need some "script" working like this:
if the first raw in "Folders" got the number 8 next to it
Then take all the bookmarks in the "bookmarks" folder that also got an 8 written next to it, and put it inside this folder.
I'm a complete noob in coding, I dont know what is SQlite, nor anything.
So i know that maybe I am asking for too much informations at the same time.
But if some kind person could put me in the way, by explaining me if
thats possible
what would be the easiest way
if some solution already exist
if someone like me can do it and what do I have to learn if I want some day to be able to do it
Thanks
Here's pictures so you understand easier:
Sqlite
Folders
Bookmarks

Version control with RStudio: how to compare and modify files from multiple users

I am new to the use of version control in RStudio. I would like to know what is the optimal way to do this:
I have a R project, and I can give one version of the project to a coworker.
Then he will modify some files (and me too).
When he gives the folder back to me, is there is simple way to compare two files and decide which which lines go to the final version?
The usual workflow for comparing files using builtin Rstudio is through version control tools such as git or subversion.
Your process is more "I give you the content of the project folder, make whatever you want and give it back to me" then "you want to know what have changed between your copy and his".
Rstudio won't help you in this case. You'd better use merge tools such as meld, winmerge, .. that will spot the differences between files and their content and allow you to copy changes in either way (from you to him or him to you)

Load file back from local history in Brackets IDE

We use Adobe Brackets on Windows OS. Is there any way to get file back from its local history in Brackets IDE?
You know, many of ides save file`s local history without need for a vcs.
There’s no such thing as a local history in Adobe Brackets at the time of writing. But you can upvote the corresponding backlog item to increase its priority.
You are going to load a past history of the file from a Windows Backup. Before you do it you need to anticipate that that backup is not going to contain any current additions. So to save some time you need to (for example) copy and paste the full extent of your current css file into notepad, and also copy and paste any rows or columns of good HTML that are fairly recent. Now you are ready to revert to a prior version of your HTML, CSS files that will be approx. 2 days older.
https://www.howtogeek.com/209080/how-to-restore-previous-versions-of-a-file-on-any-operating-system/

How to determine a text block of a file in one version come from which file in the previous version?

The problem is described below:
Suppose I have a list of files in one version(say A,B,C,D). In the next version I have the following files(A,E,F,G). There are some similarities in their contents. The files in the later version comes from the previous version by file name renaming, content addition, deletion or partial modification or without any change( for example A is not changed).
I take a block of text from a file(E, 2nd version) and check which files(in the 1st version) contain this text block. I found that B,C and D contain the text fragment. I want to determine from which file(B or c or d) this text block actually comes from.(I assume that E is a file whose name change in the second version).
Since the contents may be changed, added or deleted in the later version, so in order to determine similarity I use LCS algorithm. But I cannot map the file with its previous version.
I think one possible approach might be to use the location information of the match text blocks. But this heuristics not always work. Is there any research or algorithm exist to find so. Any direction will be helpful. Thanks in advance.
I think it may be helpful to take a look at Subversion, and its capability to track file renaming between versions. http://svnbook.red-bean.com/
It's tried and tested, because it's used by so many developers. Renaming has to occur by using subversion tools though, but there are many (command line, file explorer integration for different OS, GUIs, IDEs, you name it). It also covers moving files between directories, and merging several lines of changes (branches).

Want to revert back 3 revisions, how?

Let's say I have a user's object, I deleted a property and all things in the web project that used this property (admin pages that updated the property, data layer etc etc).
Now I was told that we need that property, looking at Subversions log it seems the correct code is 3 revisions back.
How can I go back, then somehow get any updates that may have occurred by other devleopers also?
Get the revision number from log for the correct code. Right-click the file you want to rollback. Select Tortoise SVN -> Update to Revision. In dialog fill number of revision you what to update file to, click OK and you are done!
EDIT:- to perform action on command line use svn merge. for more information type following in command line:
svn --help merge ENTER
Here is link to SVN book describing the operation.
You can also have a look at this question, which is also about same issue.
You'll need to know which files you want, and update all to "HEAD" and then those specific files to "HEAD - 3" revision number. Then you'll need to commit those specific files back.
There maybe a better option that I'm not aware of.
If you committed the whole change, and only that change in one go, you can back out that change to your working copy. You could then commit that if it works.
Log Messages > right-click the offending revision > Revert changes from this revision
I've only tried it for a small number of files, I imagine there could be serious conflict headaches.
Theoretically, you can reverse merge. I tried once and subversion absolutely failed to do this--corrupted my working copy or just flat out crashed every single time.
Practically, you might have to update to the old version, save off copies of the files affected, update to latest, manually reverse merge the changes.
It would be a lot more practical (though unsophisticated) if you can just update 3 revs back, recommit it, and have anyone who made changes since recommit them.
Use the log dialog.
Select the revision you want to revert. Right-click on that revision, choose "revert changes from this revision".

Resources