ViciousXUSMC

How do you manage version control?

15 posts in this topic

#1 ·  Posted

I build things in pieces, sometimes if I like a method I used in an old version of a script but I came up with a better way I may rename the old version of the script to xxx(old).au3 so I can reference it in the future.

Sometimes as I make major updates to a script I name each one v1, v2, v3, etc

But all of them have some flaws and are subject to error.  I may call a compiled.exe by ScriptName.exe but my .au3 is ScriptNameV1.au3 so I forget what version I have compiled and currently in production :/

For a while I was using the built in meta headers (https://www.autoitscript.com/wiki/AutoIt3Wrapper_Directives)

But I got lazy and started messing those up too because I would make changes without changing the version.

 

My most recent idea is to start putting things that can be public because they do not contain sensitive information on GitHUb, this way it keeps history of my changes.  If I mess up something and need to find an old version its in there.  I just did that today.  Went to make a very fast change to an .au3 and deleted the wrong line and lost my  original :/

 

So how do you do it?

Also is there any other good way to keep history of files and compare changes other than say GitHub?

Maybe a local solution so it does not have to be published to the net.

Share this post


Link to post
Share on other sites



#2 ·  Posted

Honestly, git is one of the best ways for version control. As long as you commit often, it's very easy to keep track of changes and revert back to past methods. It just takes some getting used to.

If I'm just keeping an old version of a method in case I want it later, I sometimes just comment out the block and move it to the bottom of the code. Not exactly the most organized way but it isn't too difficult to do.


UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=

Share this post


Link to post
Share on other sites

#4 ·  Posted

1 hour ago, willichan said:

bitbucket and tortoisehg are what I use.

Cool, I'll check it out.

I see it offers private repo for free, one of the few reasons I am hesitant to use github as its public without paying (unless you use gist)

Share this post


Link to post
Share on other sites

#5 ·  Posted

bitbucket will also let you choose between using Git or Mercurial.  Tortoisehg is for Mercurial.  You will need a different utility if you go with the Git format.

Share this post


Link to post
Share on other sites

#6 ·  Posted

Version control is also build in into the SciTE4AutoIt3 installer setup...  check the helpfile for: Using SVN Versioning on a local Computer.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

17 hours ago, Jos said:

Version control is also build in into the SciTE4AutoIt3 installer setup...  check the helpfile for: Using SVN Versioning on a local Computer.

Jos

Just got this up and running, might be viable.

Like that its local, but also that is the downfall.  If I want to take home some work.

Probably the best fit for what I need however since while scripts are small, if I want to keep dependencies along with them it can get large, and the bitbucket solution is like 1GB a week or something limitation. 

Edited by ViciousXUSMC

Share this post


Link to post
Share on other sites

#8 ·  Posted

2 hours ago, ViciousXUSMC said:

Like that its local, but also that is the downfall.  

I've put the SVN repository in dropbox so can use the repository also in other places if I want and have an offside backup. :)

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#9 ·  Posted

I am really liking TortoiseHg Workbench!

It does the local sync, easy to read, easy to use.

I can setup a clone to do like what you are saying and have a copy of my repository.

So its 100% perfect for the local side.

What I have left to test is to see if I connect it to BitBucket is it capable of only pushing/cloning specific files or does it try the whole repository where I may want to exclude large files that can be publicly downloaded or link offsite. 

Share this post


Link to post
Share on other sites

#10 ·  Posted

@ViciousXUSMC, It will only sync what you commit.  You specify which files to include in versioning, and which to exclude.

 

@Jos, I used to use TortoiseSVN on a local setup, but moved things to BitBucket when I had a project that was a collaboration with someone else.  How difficult would it be to make SciTE4AutoIt3 work with TortoiseHG?  Aside from changing where it looks for the EXE files, the integration should be fairly similar.   (Maybe I should be asking this in a separate post.)

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

It is fully configurable to your own needs in AutoIt3Wrapper.ini located in %SCITE_USERHOME%:

[Versioning]
Versioning=SVN
DiffPGM=C:\Program Files (x86)\WinMerge\WinMergeU.exe
DiffPGMOptions=/wr
Prompt_Comments=y
debug=1

[SVN]
VersionPGM=C:\Program Files\TortoiseSVN\bin\svn.exe
CommandChkVersioning=info "%sourcedir%"
CommandChkVersioning_ok_txt=Working Copy Root Path:
CommandChkVersioning_ok_rc=
CommandStatusSource=status "%sourcefile%" -u
CommandStatusSource_ADD_txt=\?\s*?%sourcefile%
CommandStatusSource_ok_txt=[MA\?][\s\d-]*?%sourcefile%
CommandLogSource=log "%sourcefile%" -l 5
CommandAddSource=add "%sourcefile%"
CommandAddSource_ok_txt=A.*?%sourcefileonly%
CommandAddSource_ok_rc=
CommandCommitSource=commit "%sourcefile%" --message "%commitcomment%"
CommandCommitSource_ok_txt=
CommandCommitSource_ok_rc=0
CommandCommitSource_new_revision=(?i)(?s)committed revision\s*([0-9]*)
CommandGetLastVersion=cat "%sourcefile%"
CommandGetLastVersion_ok_txt=
CommandGetLastVersion_ok_rc=0

Just copy the section [SVN] and call it [HG] and fill in all the appropriate commands to be used for that function of the build in versioning. each line defines the required commandline parameters for the VersionPGM to be used for its function.
Hope the names are pretty self explanatory...  else shoot :)

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#12 ·  Posted

That was even easier than I thought.  May still need some tweaking, but time will tell.

Here is the AutoItWrapper.ini that seems to work for me.

[Versioning]
Versioning=HG
;;DiffPGM=C:\Program Files (x86)\WinMerge\WinMergeU.exe
;;DiffPGMOptions=/wr
DiffPGM=C:\Program Files\TortoiseHg\bin\kdiff3.exe
DiffPGMOptions=
Prompt_Comments=y
[HG]
VersionPGM=C:\Program Files\TortoiseHg\hg.exe
CommandChkVersioning=config
CommandChkVersioning_ok_txt=bundle.mainreporoot=
CommandChkVersioning_ok_rc=
CommandStatusSource=status "%sourcefile%" -u
CommandStatusSource_ADD_txt=\?\s*?%sourcefile%
CommandStatusSource_ok_txt=[MA\?][\s\d-]*?%sourcefile%
CommandLogSource=log "%sourcefile%" -l 5
CommandAddSource=add "%sourcefile%"
CommandAddSource_ok_txt=A.*?%sourcefileonly%
CommandAddSource_ok_rc=
CommandCommitSource=commit "%sourcefile%" --message "%commitcomment%"
CommandCommitSource_ok_txt=
CommandCommitSource_ok_rc=0
CommandCommitSource_new_revision=(?i)(?s)committed revision\s*([0-9]*)
CommandGetLastVersion=cat "%sourcefile%"
CommandGetLastVersion_ok_txt=
CommandGetLastVersion_ok_rc=0

 

Share this post


Link to post
Share on other sites

#13 ·  Posted

26 minutes ago, willichan said:

That was even easier than I thought. 

That was what I was hoping when setting it up this way. :)

 


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#14 ·  Posted

Hi,

I use ISN Studio (for AutoIT) has an builtin versioning control.

Cheers.

Share this post


Link to post
Share on other sites

#15 ·  Posted

On 6/15/2017 at 4:58 PM, willichan said:

That was even easier than I thought.  May still need some tweaking, but time will tell.

Here is the AutoItWrapper.ini that seems to work for me.

[Versioning]
Versioning=HG
;;DiffPGM=C:\Program Files (x86)\WinMerge\WinMergeU.exe
;;DiffPGMOptions=/wr
DiffPGM=C:\Program Files\TortoiseHg\bin\kdiff3.exe
DiffPGMOptions=
Prompt_Comments=y
[HG]
VersionPGM=C:\Program Files\TortoiseHg\hg.exe
CommandChkVersioning=config
CommandChkVersioning_ok_txt=bundle.mainreporoot=
CommandChkVersioning_ok_rc=
CommandStatusSource=status "%sourcefile%" -u
CommandStatusSource_ADD_txt=\?\s*?%sourcefile%
CommandStatusSource_ok_txt=[MA\?][\s\d-]*?%sourcefile%
CommandLogSource=log "%sourcefile%" -l 5
CommandAddSource=add "%sourcefile%"
CommandAddSource_ok_txt=A.*?%sourcefileonly%
CommandAddSource_ok_rc=
CommandCommitSource=commit "%sourcefile%" --message "%commitcomment%"
CommandCommitSource_ok_txt=
CommandCommitSource_ok_rc=0
CommandCommitSource_new_revision=(?i)(?s)committed revision\s*([0-9]*)
CommandGetLastVersion=cat "%sourcefile%"
CommandGetLastVersion_ok_txt=
CommandGetLastVersion_ok_rc=0

 

Thanks for giving direction, for me even with an update says to me that Your version is the same as HG version, nothing to update"

But I do not mind using the workbench for HG its easily integrated.

 

ISN Studio is cool too, like that dark color theme but have not yet explored its capabilities for project management or SVN.  I do like the built in global search, regex testing, and overall look/feel.

Share this post


Link to post
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