Page 1 of 1

Version control

Posted: Tue Nov 13, 2018 6:54 pm
by NotNull
Introduction
I started working again on "JumpToFolder" (using Everything to feed folder names to Explorer and Open/Save dialogs), but lost oversight of different versions due to a lot of experimenting.

So now I will "have to" work on some version control system first.
Didn't like the 'big systems' - git. svn, ... - very much (enormous overkill; don't like to have a server, a service and a client running;
and I don't see myself checking in and out files every time).

Unless someone has a brilliant idea for a simple, no fuss version control system, I will write one myself.
That one will:
  • take snapshots of predefined folder (using Everything's EFU files) every <configurable period>
  • copy all new/changed files that were discovered to a central repository
  • <once in a while> or on demand ask to describe the changes that were made
  • have the possibility to restore a 'project' to the state it was at some point of time (also using the description you gave earlier on)
  • have the possibility to restore a single file to the state it was at some point of time (also using the description you gave earlier on)
  • Zip repository projects that are no longer in development (after <x time> )

The question (finally ... :))
Before I start designing and building this: do you see features that I definitely will regret not implementing?


BTW: In a stripped down version, this could also be a simple backup/restore utility..

Re: Version control

Posted: Tue Nov 13, 2018 7:05 pm
by horst.epp
Why don't use a tool like the free Gnu RCS version control system ?
Doesn't need any server is small and efficient and in use since many years.

Re: Version control

Posted: Wed Nov 14, 2018 4:19 pm
by NotNull
horst.epp wrote:
Tue Nov 13, 2018 7:05 pm
Why don't use a tool like the free Gnu RCS version control system ?
Doesn't need any server is small and efficient and in use since many years.
Sounds good! (although a quick scan mentions checking in and out, but maybe that's optional). Will check it out. Thanks for your suggestion!

Re: Version control

Posted: Thu Nov 15, 2018 11:21 am
by void
I've written my own version control program "voidsync", it is really really crude, but does what I need, which is:
  • Daily backups with version control
  • Does not delete files, ever.
backup.bat (runs at system shutdown, or daily as a scheduled task)

Code: Select all

c:\dev\voidsync\debug\voidsync.exe c:\dev d:\dev
Which copies everything in C:\dev to D:\dev
If a file already exists on D:\dev with a different date modified, voidsync will move it to a new folder first, for example:
c:\dev\voidsync\voidsync.c has been modified today, so d:\dev\voidsync\voidsync.c will have a different date modified compared to c:\dev\voidsync\voidsync.c.
When voidsync runs, d:\dev\voidsync\voidsync.c will be moved to d:\dev\_VOIDSYNC_\voidsync\voidsync.c\<OLD FILE DATE MODIFIED>\voidsync.c
and c:\dev\voidsync\voidsync.c will be copied to d:\dev\voidsync\voidsync.c

Restoring has to be done manually.
However, I've never had to restore more than one file at a time.

Example tree layout:


I can search in Everything for voidsync.c and find a copy from a couple days ago..

voidsync source code.

As for must have features: reliability.
My recommendations: stick with something well known.
gl!

Re: Version control

Posted: Thu Nov 15, 2018 7:03 pm
by horst.epp
The DSynchronize tool does such a version saving sync similar to voidsync.
Its free and very configurable.
http://dimio.altervista.org/eng/dsynchr ... onize.html

Re: Version control

Posted: Sat Nov 17, 2018 3:47 pm
by NotNull
@void, @horst.epp:
Can't test these for the next couple of days, but wanted to say Thank you! upfront. These look a lot of what I want to accomplish.

Re: Version control

Posted: Fri Nov 23, 2018 3:25 pm
by NotNull
I have tested DSynchronize.
So far I could not succeed in creating an 'incremental backup' (always copies all files).
I'll do some more tests, as this should be possible.

Is there anyone here that would be so kind to compile the voidsync C code for me? (preferably 64-bit).
I have no compiler on any of my Windows systems and I'm eager to try this.

I wrote something similar in PowerShell. Will post that code later (needs some serious cleaning and reorganizing the code first)

Re: Version control

Posted: Fri Nov 23, 2018 4:54 pm
by horst.epp
NotNull wrote:
Fri Nov 23, 2018 3:25 pm
I have tested DSynchronize.
So far I could not succeed in creating an 'incremental backup' (always copies all files).
I'll do some more tests, as this should be possible.

Is there anyone here that would be so kind to compile the voidsync C code for me? (preferably 64-bit).
I have no compiler on any of my Windows systems and I'm eager to try this.

I wrote something similar in PowerShell. Will post that code later (needs some serious cleaning and reorganizing the code first)
In DSynchronize for a job:
Set "Copy only newer files"
And under Options set the required number in Maintain old versions >

Re: Version control

Posted: Fri Nov 23, 2018 6:50 pm
by NotNull
That's how I configured it :?

- Maintain old versions > Unlimited
- Suffix destination with date
- Copy only newer files

And still it copies all files... First I thought those files that shouldn't be copied are hardlinks to the previously copied ones, but that's not the case.
Will start with a fresh install; maybe (probably! :) ) I changed something for the worse.

Thanks for your help!

EDIT: That was it: 'Suffix destination with date' option is not compatible with the 'Copy only newer files' option.
If the first one (suffix ...) is enabled, it will copy all files.
Too bad ....