Jump to content

Version Control Basics?


davej

Recommended Posts

I just suffered some confusion a few days ago due to having apparently edited the wrong project in Netbeans. I tend to rename my folders with a date suffix but this is not visible inside Netbeans once you enter the project, so apparently I entered some changes into a non-current version. I am curious about simple version control aids that might prevent that from occurring again in the future. I was thinking of writing a program to compare the source-file contents of all project folders that matched a specified wildcard. This program would also offer a two-pane text display highlighting source differences. I'm suspecting my concept is nothing like a _real_ version control program. So I want to ask -- what are the basic features of a "real" version control system? Thanks!

Edited by davej
Link to comment
Share on other sites

You're talking about a file compare tool, which most version control clients have built in. The major concepts of version control is that the repository will keep track of every revision, so you can always export a specific revision of a project, and it will keep track of who made what changes and help resolve conflicts if people are editing the same files.

Link to comment
Share on other sites

You're talking about a file compare tool, which most version control clients have built in. The major concepts of version control is that the repository will keep track of every revision, so you can always export a specific revision of a project, and it will keep track of who made what changes and help resolve conflicts if people are editing the same files.
Well, I don't think I would want to track every change to every line, but I might want to have a utility that could go out and find every project named by a wildcard and then generate a report detailing exactly how they are different from each other. Or I might want to search every sourcefile in every project named by a wildcard for a particular wildcarded string. I also want to stop using notepad because the dumb thing will open the same file multiple times and lacks about six other features that I want, so I might as well add this to the above utility program project.
Link to comment
Share on other sites

Or I might want to search every sourcefile in every project named by a wildcard for a particular wildcarded string.
Some SVN systems may have search tools like that, but that's not really what SVN is for. If you want to do a regular expression search on files in multiple directories then look into Windows Grep.
I also want to stop using notepad because the dumb thing will open the same file multiple times and lacks about six other features that I want, so I might as well add this to the above utility program project.
Yes, you should stop using Notepad. Look into Sublime Text. There are also IDEs which have an integrated SVN client, like Netbeans.
Link to comment
Share on other sites

A revision isn't necessarily done every time you save a file. It happens when you explicitly ask the VCS to save a snapshot of your current files.There are programs that can show you differences between files even without a VCS, but the thing about having this in a VCS is that it is built into the VCS itself, and you can always compare with whichever snapshot you want. Most VCS also have filters, though I personally don't need to use those (instead, I only ever compare a file with it's latest "stable" snapshot).

Link to comment
Share on other sites

Look into Sublime Text.
I thought you were always a ConTEXT advocate? Sublime Text is a very good editor. I love being able to write my own custom macros and snippets. I am also quite fond of the multiple selection feature and the ability to have multiple views of the same file.
Link to comment
Share on other sites

ConTEXT is nice and lightweight, but a new version hasn't been released in years. A guy named Eden Kirin originally built it and a few years ago he decided to sell it to the highest bidder because he had moved to Linux from Windows. So the community got together and raised several thousand dollars to buy it and open-source it but we got outbid by some random British guy who took out a loan in order to pay $20k for it, decided not to open the code, went on hiatus for a year or so and eventually got around to opening the code but by then much of the community had moved on. The forum is filled with spam now. Sort of sad really, it had potential. The current version offered on the site is the last version that Eden released, the new owner has never released an update. Sublime has a lot of the features that we wanted to add to ConTEXT, like proper UTF support and code folding. I still use ConTEXT for certain things when I prefer a fast lightweight editor, like it's my default editor for opening files through Filezilla where I just want to open the file, make a quick change and upload it without launching Java or whatever else.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...