Suggestion for code maintaining

0 views
Skip to first unread message

Par_Tojkander

unread,
Jul 30, 2009, 6:14:28 AM7/30/09
to vmsbackup
Hi,

I have a few suggestions for improvement when it comes to maintaining
the code at the google code site.

The "usual" way when working with code, changes and releases goes
something like this:

- You work with the code (trunk version) in the repository, making
changes.
- These changes are then uploaded and are turned into new revisions of
the code
- When you want to release the code, you take a certain revision (i.e.
5) and freeze that into a version (i.e. 3.12b)

The advantage of this system is that you can always track what changes
have been made in between certain revisions, and that you can roll
back changes that maybe weren't so good. This way, everyone involved
in the project can have full knowledge on what happens with the code.

As the code is maintained right now, it's somewhat hard to keep track
of what changes are made between the releases, and that makes it
harder to help out with improvements, patches and so on.

I also propose that you change the structure of the repository to
something like this:

- svn
-- branches
-- tags
-- trunk
---- INSTALL.TXT
---- README.TXT
---- backup_vmware.conf
---- backup_vmware.sh (remove version from filename)
---- changelog.txt
---- gpl-3.0.txt
---- old
------ (here the old files from the previous project are kept)

The zip file is removed, and is instead kept as a release in the
download section.

These are only suggestions, please advise me if you think I'm out of
line here. :)

If you think these suggestions are good, please let me know if I can
be of assistance.

Best regards, Pär

Michele Pensotti

unread,
Jul 30, 2009, 8:47:57 AM7/30/09
to vmsb...@googlegroups.com
This is exactly what I initally meant when I said I don't know how to work with SVN! :-)

Ok, let's go with my questions:
You say "You work with the code (trunk version) in the repository, making changes."
But I actually do work this way:

I have version x on the hd of my pc.
It's in a folder named release_candidate\x\date_of_last_save
If I want to make changes to it I copy over to my linux host with WinSCP and make modifications using WinSCP editor (Notepad++ actually).
When I "think" it's ok, I copy this version back to my pc and in a folder like "release_candidate\x\today_date"
I then copy this version over to my other test hosts and check that everything is all right.
Then eventually, when I'm convinced it's ok, I copy the most recent version from the linux host back to my pc.

If I think it's ready to be released, I make a new folder like "release\x" and inside that I copy the script and all the accessory files (license, README, INSTALL, etc).
I then zip this folder and upload it to the group.

What should my workflow become if I used SVN?
I cannot directly work with the file in the trunk, since I make the modifications on the linux hosts.

Also, how do I number the revisions of the code?
Is this an automatic feature of svn or what?

Please get me right, I acknowledge that for anyone other than me it's very hard to keep track of the changes I made.
I only don't understand how I can integrate the "SVN way" into my workflow.

Also, for me to respect the repository structure you proposed, I shoud wipe out the files currently present into it, but they aren't mine; their owner is username "hardaur".

So, to answer your question: you most certainly aren't out of the line, and your suggestions are welcome!
I "only" need advice on how to proceed.

Thank you,

            Michele



________________________________
Da: Par_Tojkander <par.to...@gmail.com>
A: vmsbackup <vmsb...@googlegroups.com>
Inviato: Giovedì 30 luglio 2009, 12:14:28
Oggetto: [vmsbackup] Suggestion for code maintaining

Dominique C.F.

unread,
Jul 30, 2009, 8:43:31 AM7/30/09
to vmsbackup
Hi people.

I use vmware server and as I'm seeing, you all are doing a really
great job.
Well, I'm not good in programming and shell script at all, but i'd
like to help some how.
I have a website and i'd like to know what do you all think of
maintaining the code development on it.
Maybe we could use some system like a forum, or any kind of
repository.
The site is www.domain0.com.br and maybe we could put a subdomain on
it. I take the responsability of keep it on-line.

It's just a suggestion, if you think it could be interesting, please
let me know.

Par_Tojkander

unread,
Jul 30, 2009, 1:56:25 PM7/30/09
to vmsbackup
Okay, there are a few ways of inserting the svn part into your
workflow. As I don't know how much control you have over your linux
hosts, some of the alternatives may not be possible. I'm listing the
alternatives in (what I believe to be) the simplest work-flow for
you.

1. Check-out svn repository on linux host, work with notepad++ via
samba

For this, you'd create a samba share on the linux host, i.e in your
home directory. You'd then check out the svn code to that directory,
then you mount the samba share on your Windows computer. You can now
edit the files as if they were local on your computer.

When you have made changes that you're happy with, you would check-in
the svn code by issuing 'svn commit' in the directory you had checked
out the code into.

So, for example, if you choose the directory /home/yourusername/
backup_vmware/, the commands would be:

- Check-out svn code

svn checkout --username YOUR_USERNAME --password YOUR_PASSWORD
http://vmsbackup.googlecode.com/svn/trunk/ /home/yourusername/
backup_vmware/

- Configure and mount the directory in your Windows computer

Guides are available on this, google for "samba mount windows" or
the like

- Edit and save files with notepad++
- Look at the differences in your code and the one in the svn
repository

cd /home/yourusername/backup_vmware/
svn diff

- If you're happy with the changes, check in the code to the svn
repository

svn ci -m "Describe your commit here"


2. Check out svn repository on linux host, work with WinSCP

Essentially the same as above, just without the samba part. Basic
workflow:

- Check-out the repository on the linux host
- Transfer the files from the linux host to your windows computer
- Make edits and save
- Transfer back the changed files to the linux host (to the directory
where you checked out the repository)
- Issue 'svn diff' to verify that you're happy with the changes
- Issue 'svn ci -m "Message"' to commit the changes


3. Check out the svn repository on your windows machine, transfer
files with WinSCP

Like number 2, only that you keep the repository on your windows
machine. This gives you a graphical interface to svn, which you may
like better.


As for revision numbering, svn takes care of that. The good thing is,
all the earlier revisions are available! Even if you delete a file in
r5, it's still available in r4 and can be checked-out.

When you want to create a release zip file, you simply zip up the
revision you like, and put it in the download area.

Talking about the older files, is hardaur still active in developing
the script? If no, do you have the correct permissions to move his
files around? All of the previous revisions are still available, so
even if you delete his files it would be possible to get them by
checking out an earlier revision.

Hope this helps!

Please get back to me if you have more questions!

Best regards, Pär
> Da: Par_Tojkander <par.tojkan...@gmail.com>

10nico

unread,
Aug 1, 2009, 4:20:52 AM8/1/09
to vmsbackup
Hello again Par!

Your suggestions are very welcome and I will try out all of them to
decide which best fits my current setup (I have 2 test hosts , one
with VMware Server 1.0x and one with VMware Server 2.0x (plus all the
production hosts of course!)

I really appreciate all the knowledge you shared :-)

P.S: As for sharing the home folder of my user, I'm a bit reluctant
since I use root.
But I also have to say its a private LAN and there's no access from
outside, and also the two test hosts do not contain any sensitive
data...

Also, I've contacted "hardaur" which turned out to be the founder of
this group and he gave me permission to re-structure the SVN trunk to
fit my script and collaborate on it :-)

Sadly, I'm not home in the weekend so I don't have any access to my
office's machines, so i guess my tests with SVN will have to wait
until monday.

I'll report back to you then.

Have a nice weekend!

Michele
> > Best regards, Pär- Nascondi testo citato
>
> - Mostra testo citato -

10nico

unread,
Aug 1, 2009, 4:25:01 AM8/1/09
to vmsbackup
Hello!

On 30 Lug, 14:43, "Dominique C.F." <dominiquecarva...@gmail.com>
wrote:
> Hi people.
>
> I use vmware server and as I'm seeing, you all are doing a really
> great job.

Thank you :-)

> Well, I'm not good in programming and shell script at all, but i'd
> like to help some how.
> I have a website and i'd like to know what do you all think of
> maintaining the code development on it.
> Maybe we could use some system like a forum, or any kind of
> repository.
> The site iswww.domain0.com.brand maybe we could put a subdomain on
> it. I take the responsability of keep it on-line.
>
> It's just a suggestion, if you think it could be interesting, please
> let me know.
>

Your kind offer is most welcome, however, for now, the main need is to
test the script and find out all the bugs/features needed, so if you
want to contribute you may try to use the script and give us
feedbacks.
Just out of curiosity, on which architecture/O.S./VMware version do
you intend/need to use/test the script?

Thanks again

Live long and prosper,

Michele

Par_Tojkander

unread,
Aug 4, 2009, 8:43:15 AM8/4/09
to vmsbackup
On Aug 1, 10:20 am, 10nico <gcanavra...@yahoo.it> wrote:
<snip>
> P.S: As for sharing the home folder of my user, I'm a bit reluctant
> since I use root.
> But I also have to say its a private LAN and there's no access from
> outside, and also the two test hosts do not contain any sensitive
> data...

You can choose any folder you like, I tend to keep source code either
in my home directory, or in /usr/src.

You could create /usr/src/vmsbackup, and only share that folder via
samba.

> Also, I've contacted "hardaur" which turned out to be the founder of
> this group and he gave me permission to re-structure the SVN trunk to
> fit my script and collaborate on it :-)

Excellent!

Another thing for consideration, you don't have to make a new release
out of every revision. You can create new releases when you feel like
the code is mature enough, new features have been added, major bug
fixes, etc.

/ Pär

10nico

unread,
Aug 5, 2009, 6:34:46 AM8/5/09
to vmsbackup
Hello again.

I've seen you've released two patches based on 3.12a
I already have a 3.12b so before releasing it/putting it on svn/
migrating my workflow to svn I'll have to integrate the changes I made
( from 3.12a to 3.12b ) with your changes.

It will take some time; I'll let you know as soon as I complete.

Thank you for all,

Michele

Par_Tojkander

unread,
Aug 5, 2009, 3:14:00 PM8/5/09
to vmsbackup
Hello,

I can see you've started moving files around -- excellent!

As for my changes, if it's more convenient for you, you can simply put
up your next revision and I'll modify my changes to fit. This also has
the advantage of making the changes smaller, and that makes the
revisions easier to track and (when needed) roll back.

/ Pär

10nico

unread,
Aug 6, 2009, 6:02:39 AM8/6/09
to vmsbackup
I've managed to integrate your patches to 3.12a and then re-integrate
my changes (those i made to pre-3.12b) back into it.
I'm currently testing it before renaming it to backup_vmware.sh an
then putting it into the trunk.

I'll let you know as soon as I complete.

Michele

10nico

unread,
Aug 6, 2009, 12:08:46 PM8/6/09
to vmsbackup
Hello, I've just uploaded "my idea of 3.12b" to the svn repository.
I've fixed various things and integrated your patches, please take a
look at the changelog.txt.
I didn't create a repository on my pc, I simply opened the repository
browser and did drag and drop the files into the trunk.
Seems the revision did increment right even if I did not use the
"checkout" function in tortoise.

When it's tested (not only by me) I'd like to release it as 3.12b, for
now your comments are welcome ^_^

P.S: If I make some changes I'll upload the updated version on svn
first, so that anyone can patch it at once.
I'm still learning svn, so if I did some mistakes please point those
out and I'll correct my workflow accordingly.

Thank you and good evening,

Michele

P.S: I've also updated some of the issues

Par_Tojkander

unread,
Aug 6, 2009, 3:58:07 PM8/6/09
to vmsbackup
On Aug 6, 6:08 pm, 10nico <gcanavra...@yahoo.it> wrote:
> Hello, I've just uploaded "my idea of 3.12b" to the svn repository.
> I've fixed various things and integrated your patches, please take a
> look at the changelog.txt.

Excellent work! All the changes seem to work fine.

> I didn't create a repository on my pc, I simply opened the repository
> browser and did drag and drop the files into the trunk.
> Seems the revision did increment right even if I did not use the
> "checkout" function in tortoise.

I haven't used TortoiseSVN that much, but you did everything
correctly. The revisions are correct and the code is updated.

Checkout is only needed the first time, now the directory is linked to
the svn repository at google, so everytime you commit changes it will
go to the vmsbackup repository.

> P.S: If I make some changes I'll upload the updated version on svn
> first, so that anyone can patch it at once.

Very good, that's the whole idea with subversion and revisions. If you
update often, it's easier for others to send patches that work against
the latest code!

> I'm still learning svn, so if I did some mistakes please point those
> out and I'll correct my workflow accordingly.

You're doing excellent so far! The only improvement I can see right
now is to provide commit messages for each commit. It may feel silly,
but putting in "Added readme.txt" is useful, especially when you look
at the changes list (http://code.google.com/p/vmsbackup/source/list).

I don't really know how or where you type the commit message in
TortoiseSVN, but you should be able to type it in there somewhere,
just before you commit your changes.

Keep up the good work :D


Pär

10nico

unread,
Aug 7, 2009, 11:29:19 AM8/7/09
to vmsbackup
Oops! It was too good to be true!
I'm having difficulty uploading r17 into svn; every time I try to
upload the new version of the script (the one with issue 12 fixed) it
keeps telling me
"Path 'https://vmsbackup.googlecode.com/svn/trunk/backup_vmware.sh'
already exists"

It would seem I can't overwrite a file which already exists on the
googlecode repository?

As a "side" note, I didn't "make a checkout the first time".
I simply opened the repo browser and uploaded all the files one by one
(and for each more file I uploaded, the revision number was
incremented).

Now I've tried to make a checkout on my current working dir (on the
harddrive of my pc) but it complains that the directory is not empty.
So I created a new empty folder named "svn" and checked out that.
But now in the directory there are various files in a structure like
this:

(dir) conf
(dir) db
(dir) hooks
(dir) locks
(file) format
(file) README.txt

What should I do with all of this "mess"?

Please excuse my ignorance...

Thank you for all your contributions!

Regards,

Michele

Par_Tojkander

unread,
Aug 7, 2009, 3:41:53 PM8/7/09
to vmsbackup
On Aug 7, 5:29 pm, 10nico <gcanavra...@yahoo.it> wrote:
> As a "side" note, I didn't "make a checkout the first time".
> I simply opened the repo browser and uploaded all the files one by one
> (and for each more file I uploaded, the revision number was
> incremented).
>
> Now I've tried to make a checkout on my current working dir (on the
> harddrive of my pc) but it complains that the directory is not empty.
> So I created a new empty folder named "svn" and checked out that.
> But now in the directory there are various files in a structure like
> this:
>
> (dir) conf
> (dir) db
> (dir) hooks
> (dir) locks
> (file) format
> (file) README.txt

Hm, this doesn't look correct. Let's start over by checking out like
this:

http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-checkout.html

...and the path you should check out is this:

http://vmsbackup.googlecode.com/svn/trunk/

You should get asked about username and password.

When you've done that, try to simply copy your modified files to that
folder, and then commit them:

http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-commit.html

Hopefully that should work.


Pär

10nico

unread,
Aug 12, 2009, 4:34:46 AM8/12/09
to vmsbackup
Hello, I've followed the instructions and it seems to work now.
In fact I now see a lot more options when right-clicking on the "svn"
folder.
And I can make diffs , updates, etc etc with such an ease!

As a test, I've added some instructions into the INSTALL.TXT on how to
install the sendEmail program and tried to upload them, and it worked
like a charm!

^_^

Thank you very much Par!

Regards,
Michele

On 7 Ago, 21:41, Par_Tojkander <par.tojkan...@gmail.com> wrote:
> On Aug 7, 5:29 pm, 10nico <gcanavra...@yahoo.it> wrote:
>
>
>
> > As a "side" note, I didn't "make a checkout the first time".
> > I simply opened the repo browser and uploaded all the files one by one
> > (and for each more file I uploaded, the revision number was
> > incremented).
>
> > Now I've tried to make a checkout on my current working dir (on the
> > harddrive of my pc) but it complains that the directory is not empty.
> > So I created a new empty folder named "svn" and checked out that.
> > But now in the directory there are various files in a structure like
> > this:
>
> > (dir) conf
> > (dir) db
> > (dir) hooks
> > (dir) locks
> > (file) format
> > (file) README.txt
>
> Hm, this doesn't look correct. Let's start over by checking out like
> this:
>
>    http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-checkout....

Par_Tojkander

unread,
Aug 12, 2009, 4:43:42 AM8/12/09
to vmsbackup
Excellent, glad to hear it's working! :)

Pär
Reply all
Reply to author
Forward
0 new messages