Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: what is the correct way to save project versions, ie, ver1 ver2, ...


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Nov 25, 2014 12:33 PM Last Post By: Remy Lebeau (Te...
john lmast

Posts: 22
Registered: 12/1/14
what is the correct way to save project versions, ie, ver1 ver2, ...  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 24, 2014 5:17 PM
Hi, I've been trying to save my projects in versions, each day, and load up the correct version, but I am having trouble. It does not seem to be working as I originally thought.

Let me explain how I've been doing it since, and maybe that will help you understand my problem.

The way I've been doing it in Delphi 6, once I started up delphi, and began programming, I would save_project, and Delphi would first ask me to give a project_name*.dpr and then follow that asking for the Unit_name*.pas file. after giving those pieces of info, I would continue in the project until I closed down for the day. The next day, before starting Delphi, I would first go to the folder, ie, e:\desktop_recorder\ and select the ver01 folder and copy/paste it and rename it ver02, thus, e:\desktop_recorder\ver02, or see below. I would go through these steps in any project and have been doing this since I can remember. Perhaps I have been doing it wrong all along. The reason I work this way, is so that if something unexpected happened in the latest verxx project or I want to start from a previous verxx, I can just go to that folder, ie, ver01, and re-copy/paste and start over or make it something like ver01b, etc.. I can't tell you how many times I had to do just that, and start from a previous version. it saved me a lot of trouble.

So, this time, in Delphi XE7, when I follow the same method outlined above, and run the .dproj for e:\desktop_recorder\ver02, Delphi issues an error that it can't find the unit file or if I fudge the file names, it uses the last unit.pas file from the \ver01\ folder.

How can I accomplish creating ver01, ver02, ver03, ... for a main project, like desktop_recorder and have the correct folder and file ?

Thank you,
JohnLM

e:\desktop_recorder
|_ ver01
|_ ver02
|_ ver03

e:\personal_filer_d6
|_ ver01
|_ ver02
|_ ver03

e:\personal_filer_xe7
|_ ver01
|_ ver02

Edited by: john lmast on Nov 24, 2014 5:18 PM

Edited by: john lmast on Nov 24, 2014 5:23 PM
typos and corrections.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: what is the correct way to save project versions, ie, ver1 ver2, ...[Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 24, 2014 6:23 PM   in response to: john lmast in response to: john lmast
john wrote:

The reason I work this way, is so that if something unexpected
happened in the latest verxx project or I want to start from a
previous verxx, I can just go to that folder, ie, ver01, and
re-copy/paste and start over or make it something like ver01b,
etc.. I can't tell you how many times I had to do just that,
and start from a previous version. it saved me a lot of trouble.

This is the type of situation that Version Control Systems are meant for.
Also, modern Delphi versions have a built-in History feature as well. You
really need to take advantage of them. Even something simple, like a local
SVN server and repository, would go a long way. To create a new version,
you simply create a new Branch from the current checked in code, work on
that code as needed, and check it back into the branch. If you want to,
you can merge the branch into the mainline code later on. But this allows
to easily switch between different branches as well, designate differen local
folders for each branch, as well as the benefit of maintaining a full history
of the code changes you make over time, document why you are making those
changes, compare different versions of the code, etc.

So, this time, in Delphi XE7, when I follow the same method outlined
above, and run the .dproj for e:\desktop_recorder\ver02, Delphi issues
an error that it can't find the unit file or if I fudge the file
names, it uses the last unit.pas file from the \ver01\ folder.

DPR and DPROJ files contain file paths in them, so make sure they accurately
reflect the new folder path after copying. Or, simply don't copy the DPROJ
file at all, just open the DPR/DPK file (make sure its paths are relative
to the DPR/DPK file) and let the IDE generate a new DPROJ file, which you
can then customize (settings, version resources, etc) as needed.

--
Remy Lebeau (TeamB)
john lmast

Posts: 22
Registered: 12/1/14
Re: what is the correct way to save project versions, ie, ver1 ver2, ...[Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 24, 2014 6:47 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB)

I can't save just the project because the unit.pas is needed since that is where all the code is.

But I still prefer my method because it is easier for me to start over from the last project if something goes wrong. I prefer to just go back to the last verxx and re-copy/paste it...much quicker than trying to anylize where I screwed up in order to backup or whatever. my projects aren't that big.

Edited by: john lmast on Nov 24, 2014 6:47 PM
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: what is the correct way to save project versions, ie, ver1 ver2,...[Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 25, 2014 12:33 PM   in response to: john lmast in response to: john lmast
Hello john,

I can't save just the project because the unit.pas is needed
since that is where all the code is.

Where did I suggest that you make a copy of the project by itself? A VCS
would allow youto make copies of entire projects.

But I still prefer my method because it is easier for me to start over
from the last project if something goes wrong.

Again, a VCS would allow you to do exactly that, and safer than your manual
approach.

I prefer to just go back to the last verxx and re-copy/paste it...much
quicker than trying to anylize where I screwed up in order to backup
or whatever.

As I mentioned, another benefit of using a VCS is being able to compare different
versions of code to see the differences between them, and in some VCS systems
even copy code snippets from one to the other.

--
Remy Lebeau (TeamB)
john lmast

Posts: 22
Registered: 12/1/14
Re: what is the correct way to save project versions, ie, ver1 ver2, ...  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 24, 2014 7:37 PM   in response to: john lmast in response to: john lmast
john lmast wrote:
Hi, I've been trying to save my projects in versions, each day, and load up the correct version, but I am having trouble. It does not seem to be working as I originally thought.

How can I accomplish creating ver01, ver02, ver03, ... for a main project, like desktop_recorder and have the correct folder and file ?

Let me answer my own question. I figured it out. It involves multiple steps unfortunately, but at least it works.

Where the following folders are already created:

e:\desktop_recorder
|_ ver01

And we want to add the next version folder (ver02) to this project:

1. before closing down the project for the day, select [File\Save As..]
2. navigate to the main folder, (using desktop_recorder in this example), where we started the first version as folder ver01, create folder ver02 and save the unit1.pas
3. then, select [File\Save Project As...] and save the .dproj file(s).
4. close down Delphi XE7, if you're finished for the day, and you're done.
5. the next day, start up Delphi XE7 and open the project from the ver02 folder or your usual method. All of project forms and code will be updated in that folder.
6. done. repeat steps 1-5 for each new folder series for the project.

If I don't like how the project is going from the last version, (or I want to start somewhere in the version series) I have the option to start from the earlier version of choice and start it again or take it into a different direction or build a completely new project and remove and/or build new controls/code, etc.. This is how I work. For instance, I once took a capture app and stripped one of its versions to make just a simple tv_app so that I could watch tv while working.

e:\desktop_recorder
|_ ver01
|_ ver02
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02