CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug Reports on this forum. Send them to support@ccsinfo.com

Simple version control

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jujoab



Joined: 05 Aug 2017
Posts: 41
Location: brazil

View user's profile Send private message

Simple version control
PostPosted: Sat Sep 30, 2017 11:37 am     Reply with quote

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: 13523

View user's profile Send private message

PostPosted: Sat Sep 30, 2017 12:02 pm     Reply with quote

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: 6249
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Sep 30, 2017 12:27 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Sep 30, 2017 12:57 pm     Reply with quote

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: 67
Location: Bombay, India

View user's profile Send private message Visit poster's website Yahoo Messenger

PostPosted: Sat Sep 30, 2017 10:34 pm     Reply with quote

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: 1530
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sun Oct 01, 2017 11:57 pm     Reply with quote

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: 312
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Sun Oct 08, 2017 10:26 pm     Reply with quote

I am with you on that Jay Smile
It was the only way in Assembler, I think is also the only way in C.

Best wishes
Joe
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group