View previous topic :: View next topic |
Author |
Message |
jujoab
Joined: 05 Aug 2017 Posts: 41 Location: brazil
|
Simple version control |
Posted: Sat Sep 30, 2017 11:37 am |
|
|
I am looking for a simple way to keep different versions of a project on the disk, but seems to be no information on the subject.
Any suggestion please ?
jujoab |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Sat Sep 30, 2017 12:02 pm |
|
|
Just make different versions.
Make sub directory's with names like version1, 2 etc.. Put all the files into each, except the project file. Make sure the #include statements for your include files use "" rather than <>. This means 'look in the local directory first'. Then open the main code file with the compiler, and compile. It'll generate a project file, referring to the local copies, not others, and put all the result files in the directory. Include a note in your source file saying what compiler version this uses.
Do the same with the compiler, Instead of just having one, install each time into a separate directory and turn off automatic updates.
You can then use your code versionxx, with the right compiler version it was built with before. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9246 Location: Greensville,Ontario
|
|
Posted: Sat Sep 30, 2017 12:27 pm |
|
|
Instead of always editting the same 'project' file, over and over, I copy the source to a new file called 'projectxv2'. THEN I edit that source, compile and test. Next time I copy 'projectxv2' to 'projectxv3', edit that source, compile and test. Yup, I've got 40, 50, 80 versions of some projects on the PC.
.. BUT I can ALWAYS go back 1, 2 or 102 versions to something that did work ! All to often you can make 3-4 changes and you'll spend hours wondering WHAT did I do, it ran 5 minutes ago......
Once the project is complete, just delete all but the last 3 versions, though with hard drives being huge you'll probably never have to make space.
Jay |
|
|
jujoab
Joined: 05 Aug 2017 Posts: 41 Location: brazil
|
|
Posted: Sat Sep 30, 2017 12:57 pm |
|
|
Ttelmah wrote: | Just make different versions.
Make sub directory's with names like version1, 2 etc.. Put all the files into each, except the project file. Make sure the #include statements for your include files use "" rather than <>. This means 'look in the local directory first'. Then open the main code file with the compiler, and compile. It'll generate a project file, referring to the local copies, not others, and put all the result files in the directory. Include a note in your source file saying what compiler version this uses.
Do the same with the compiler, Instead of just having one, install each time into a separate directory and turn off automatic updates.
You can then use your code versionxx, with the right compiler version it was built with before. |
It works like a charm.
Thanks a lot.
Have a nice weekend.
jujoab |
|
|
Jerson
Joined: 31 Jul 2009 Posts: 125 Location: Bombay, India
|
|
Posted: Sat Sep 30, 2017 10:34 pm |
|
|
For those who wish to have a nice standalone VCS, take a look at fossil-scm.org Single binary, powerful features. Command line operation mainly, but can be viewed via browser. Handles tickets, wiki all in one. Highly recommended. I am just a user. |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Sun Oct 01, 2017 11:57 pm |
|
|
If you have Windows and load Cygqin, you can probably install RCS...
If you have a linux system as your NAS, the possibilities are endless.
Just google it. To many choices to list. _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
|
Posted: Sun Oct 08, 2017 10:26 pm |
|
|
I am with you on that Jay
It was the only way in Assembler, I think is also the only way in C.
Best wishes
Joe |
|
|
|