Re: Source code management with IDL Workbench [message #57549] |
Thu, 13 December 2007 17:20 |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On Dec 13, 5:32 pm, David Fanning <n...@dfanning.com> wrote:
> Well, here is what I did, which is what I thought I
> was trying to do. Tell me if I did it right.
I think your listed steps are fine, I just prefer another way. I
prefer to "act locally" as much as possible i.e. I do as few commands
that cause the remote repo to change as possible. So I would:
1. Via New > Project, checkout the directory of the repo that I want
to add stuff to. (I have the projects I normally use already checked
out, so this normally only happens when a project is starting.)
2. Add things "normally" to this project (i.e. creating/copying files
and directories via the Workbench, the file system, whatever). As new
files/directories arrive in the project, right click on them and
select "Team > Add to Version Control." Note that adding a directory
adds everything under it.
3. Make sure everything works.
4. Commit. (Up to now all changes have been just to my local working
copy. This is the only command that changes the remote repo.)
Mike
--
www.michaelgalloy.com
Tech-X Corporation
Software Developer II
|
|
|
Re: Source code management with IDL Workbench [message #57550 is a reply to message #57549] |
Thu, 13 December 2007 16:32  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mgalloy@gmail.com writes:
> Vince's technique about using "import" in the SVN Repository
> Perspective is the right one to add stuff directly to the repo. But
> note that you will still have to checkout the repo in order to have a
> local working copy (i.e. the imported files are not under version
> control).
>
> I guess I just always start by checking out a directory from the repo
> (even if it is just an empty directory) and gradually adding to it as
> I verify that each addition still leaves everything working. Importing
> stuff directly to the repo just seems a bit dangerous to me.
Well, here is what I did, which is what I thought I
was trying to do. Tell me if I did it right.
I switched to SVN Repository perspective and did
New -> New Remote Folder to create a new folder in
the repository.
Then, I found that newly created folder in the
repository (still in SVN Repository perspective)
and right-clicked and chose Checkout. This gave
me a Project in my IDL Workspace.
I switched to IDL Perspective and right-clicked
on the new project, and chose Import... This
allowed me to import my IDL files into the project.
Then, I simply right clicked on the project folder
again and chose Team -> Commit. This copied all those
IDL files over into my repository.
Does that sound right to you?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Source code management with IDL Workbench [message #57551 is a reply to message #57550] |
Thu, 13 December 2007 15:51  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On Dec 13, 2:23 pm, David Fanning <n...@dfanning.com> wrote:
> Mike Galloy writes:
>> In my experience, every way of adding files to a repository requires
>> checking out the repository first. The Subversion book says about "svn
>> add":
>
>> "Add files, directories, or symbolic links to your working copy and
>> schedule them for addition to the repository. They will be uploaded
>> and added to the repository on your next commit. If you add something
>> and change your mind before committing, you can unschedule the
>> addition using svn revert."
>
>> So I think that means you have to have a working copy first.
>
>> But, why would you do that? Don't you need to have a local copy of
>> everything working, test it, etc. AND then check in the file? I
>> suppose if you had a library of completely unrelated routines then
>> adding them directly would make sense.
>
> Alright, you are totally confusing me. :-)
>
> I have set up a Subversion repository. And I have IDL programs,
> sitting right here in a directory on my C drive that
> I want to add to the repository. How do I do that from
> within IDL?
Vince's technique about using "import" in the SVN Repository
Perspective is the right one to add stuff directly to the repo. But
note that you will still have to checkout the repo in order to have a
local working copy (i.e. the imported files are not under version
control).
I guess I just always start by checking out a directory from the repo
(even if it is just an empty directory) and gradually adding to it as
I verify that each addition still leaves everything working. Importing
stuff directly to the repo just seems a bit dangerous to me.
Mike
--
www.michaelgalloy.com
Tech-X Corporation
Software Developer II
|
|
|
Re: Source code management with IDL Workbench [message #57552 is a reply to message #57551] |
Thu, 13 December 2007 15:40  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Vince Hradil writes:
> You need to switch to the SVN Repository Perspective, or at least open
> the SVN Repository view and right click on the folder and import...
> If you want to make a new folder right-click on the repository and do
> New->new remote folder
Ah, I see. It would have taken me a few more days to figure
that out on my own. This little guide I'm writing might
be useful for someone. (Probably me, after I delete everything
I learned in my experimenting and start over!)
It would be handy if those version control thingies had
an UNDO button. :-)
Thanks,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Source code management with IDL Workbench [message #57553 is a reply to message #57552] |
Thu, 13 December 2007 14:04  |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Dec 13, 3:23 pm, David Fanning <n...@dfanning.com> wrote:
> Mike Galloy writes:
>> In my experience, every way of adding files to a repository requires
>> checking out the repository first. The Subversion book says about "svn
>> add":
>
>> "Add files, directories, or symbolic links to your working copy and
>> schedule them for addition to the repository. They will be uploaded
>> and added to the repository on your next commit. If you add something
>> and change your mind before committing, you can unschedule the
>> addition using svn revert."
>
>> So I think that means you have to have a working copy first.
>
>> But, why would you do that? Don't you need to have a local copy of
>> everything working, test it, etc. AND then check in the file? I
>> suppose if you had a library of completely unrelated routines then
>> adding them directly would make sense.
>
> Alright, you are totally confusing me. :-)
>
> I have set up a Subversion repository. And I have IDL programs,
> sitting right here in a directory on my C drive that
> I want to add to the repository. How do I do that from
> within IDL?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
You need to switch to the SVN Repository Perspective, or at least open
the SVN Repository view and right click on the folder and import...
If you want to make a new folder right-click on the repository and do
New->new remote folder
|
|
|
Re: Source code management with IDL Workbench [message #57554 is a reply to message #57553] |
Thu, 13 December 2007 13:23  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Mike Galloy writes:
> In my experience, every way of adding files to a repository requires
> checking out the repository first. The Subversion book says about "svn
> add":
>
> "Add files, directories, or symbolic links to your working copy and
> schedule them for addition to the repository. They will be uploaded
> and added to the repository on your next commit. If you add something
> and change your mind before committing, you can unschedule the
> addition using svn revert."
>
> So I think that means you have to have a working copy first.
>
> But, why would you do that? Don't you need to have a local copy of
> everything working, test it, etc. AND then check in the file? I
> suppose if you had a library of completely unrelated routines then
> adding them directly would make sense.
Alright, you are totally confusing me. :-)
I have set up a Subversion repository. And I have IDL programs,
sitting right here in a directory on my C drive that
I want to add to the repository. How do I do that from
within IDL?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Source code management with IDL Workbench [message #57555 is a reply to message #57554] |
Thu, 13 December 2007 13:20  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paul van Delst writes:
> except I can't even get regular old IDL training set up for a colleague
> here (ITTVIS keeps canceling the sessions and, while the budget will pay the few 1000's
> for the training, it won't pay for the airfare and hotel out in Colorado :o)
You are probably asking the wrong people. You need
someone with a couple of kids in college who will
work on the cheap. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Source code management with IDL Workbench [message #57556 is a reply to message #57555] |
Thu, 13 December 2007 12:26  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On Dec 13, 11:32 am, David Fanning <n...@dfanning.com> wrote:
> David Fanning writes:
>> The key thing appears to be that the file MUST be in a directory
>> or project that was checked out or created from the repository by
>> Subclipse. Then, you DO get the Team menu with useful options.
>
> But, no one has really answered this question directly:
> No way to ADD a directory of files directly to the
> repository via IDL, is that right? The project (and by
> extension, the directory) needs to be created from
> the repository first, then files added, then you can
> commit those files to the repository. But someone has
> to muck with the repository first. This can't be done
> from inside of IDL. Am I correct in this?
In my experience, every way of adding files to a repository requires
checking out the repository first. The Subversion book says about "svn
add":
"Add files, directories, or symbolic links to your working copy and
schedule them for addition to the repository. They will be uploaded
and added to the repository on your next commit. If you add something
and change your mind before committing, you can unschedule the
addition using svn revert."
So I think that means you have to have a working copy first.
But, why would you do that? Don't you need to have a local copy of
everything working, test it, etc. AND then check in the file? I
suppose if you had a library of completely unrelated routines then
adding them directly would make sense.
Mike
--
www.michaelgalloy.com
Tech-X Corporation
Software Developer II
|
|
|
Re: Source code management with IDL Workbench [message #57557 is a reply to message #57556] |
Thu, 13 December 2007 10:55  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paul van Delst writes:
> I would like to ask some possibly simple/stupid question:
>
> 1) Code that I use is typically scattered across several directories, organised in a
> logical (to me at least) manner according to what it does. Does that mean I have to import
> *all* my directories *every* time I want to create a Project?
I'm not sure this question makes sense in terms of
the IDL Workbench. I suspect (because I have similar
problems with "workspace") that your definition of a
"project" and IDL's definition might be different.
You could open these directories as a "series" of projects,
and yes, if you wanted to write a program that made use of
IDL programs in these directories, you would have to do that.
Or, you could just work in the normal way and put these
directories on your path, but not make projects out of them.
And, since you can save the file you are working on to any
place you like, I don't see why you can't just use the Workbench
in *exactly* the way you use it now. (But what would be the
point of it? Might as well use all that RAM you bought to
run the damn thing for something useful.)
I am slowly coming to the belief there is *some* logic in
doing things the Eclipse way. At least I am more open to it
than I was before. I am still wrestling with how to advise
someone to go from what they had before to the new system.
It confounds me at times.
> 2) What is the point of importing versioned code as a "Project"?
I guess I've spent a week working on it so I can manage it
from within IDL. But, frankly, TortoiseSVN is such a nice
application, that I am beginning to wonder why I would bother.
It might be at the end of the day, people DON'T bother.
They just go on using whatever they have been using. I don't
see anything particular wrong with that. (Except, of course,
that I *couldn't* go on using what I was using, because the
Workbench would write the damn file anyway. But, I mean, if you
were using something compatible.) Subversion seems OK to me.
I think it will do what I want it to do. I don't write code
that requires fancy build methods. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Source code management with IDL Workbench [message #57558 is a reply to message #57557] |
Thu, 13 December 2007 10:32  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> The key thing appears to be that the file MUST be in a directory
> or project that was checked out or created from the repository by
> Subclipse. Then, you DO get the Team menu with useful options.
But, no one has really answered this question directly:
No way to ADD a directory of files directly to the
repository via IDL, is that right? The project (and by
extension, the directory) needs to be created from
the repository first, then files added, then you can
commit those files to the repository. But someone has
to muck with the repository first. This can't be done
from inside of IDL. Am I correct in this?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Source code management with IDL Workbench [message #57559 is a reply to message #57558] |
Thu, 13 December 2007 10:31  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Chris Torrence wrote:
> Hi all,
>
> Just thought it would be useful to post a quick summary of how I'm
> using a source code management (SCM) system like Perforce, Subversion
> or CVS, from within the IDL Workbench. This is essentially the same
> info as Chris Padwick's earlier post.
>
> 1. Install your favorite SCM plugin feature. I'll use Perforce as an
> example.
> 2. Start with a clean IDL Workspace. Do *not* create any projects.
> 3. Change perspectives to the Perforce perspective (or whatever yours
> is).
> 4. Set up your connection to your server. Make sure you can see the
> files and folders within your depot/repository/
> 5. Navigate to the folder that contains the IDL code that you want to
> work on. This folder can contain subfolders, doesn't matter. You need
> to decide on how best to split up your repository into IDL Projects.
> 6. Right click on the desired folder within the depot/repository view,
> choose Team->Import as Project. (menu item may be slightly different
> depending on your SCM)
I would like to ask some possibly simple/stupid question:
1) Code that I use is typically scattered across several directories, organised in a
logical (to me at least) manner according to what it does. Does that mean I have to import
*all* my directories *every* time I want to create a Project?
2) What is the point of importing versioned code as a "Project"?
The second question is the big one I guess. What does the IDE offer me that I don't get
via using a version control system and a syntax and context sensitive editor. All I see in
using the Workbench is a bunch of extra overhead.
cheers,
paulv
p.s. I can't speak for Perforce, but I don't consider subversion and CVS as source code
management systems. A more common definition of SCM I come across all the time is Software
Configuration Management - of which version control (using perforce, subversion, whatever)
is just one part. E.g. see GForge or Trac for a good start, but what about automated
testing, build configuration management, etc etc.
>
> At this point, the IDL Workbench will import that folder into your
> Workspace as a new Project. Because it contains IDL code, it will
> automatically recognize it as an IDL Project. Note that the files are
> *not* copied. They still live over in your "sandbox", wherever that
> happens to be on your system. You don't care.
>
> Some tips on how to use your SCM plugin. This assumes that the IDL
> Project has been imported using the above steps.
>
> * Open up the Preferences dialog, type the word "decoration" into the
> filter box. This should show all pages that have to do with marking or
> decorating the files within the Project Explorer. Go under the first
> page, which should be General->Appearance->Label Decorations. Be sure
> to enable decorations for your SCM plugin. Then go under the other
> decoration pages and change the settings to what you want.
>
> * When you begin editing a file within an IDL Project, it should
> automatically check it out and mark it as writeable. If you've set up
> your decorations correctly, the Project Explorer should now have some
> sort of little decorator indicating that the file is checked out. You
> should also be able to see if other people have the same file checked
> out.
>
> * To add a new file, either create the file within the desired folder
> within your Project, or copy an existing file into the folder. Then
> right click on the file, choose Team->Open for Add (or whatever your
> menu item is). This will mark the file for "add", but won't check it
> in.
>
> * To sync your project (if multiple people are working on the same
> repository), just do Team->Sync to Head. You may need to also do a
> Team->Refresh if you have synced manually outside of the IDL
> Workbench.
>
> Hope this helps.
> -Chris
> ITTVIS
|
|
|
Re: Source code management with IDL Workbench [message #57560 is a reply to message #57559] |
Thu, 13 December 2007 10:25  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Chris Torrence writes:
> Just thought it would be useful to post a quick summary of how I'm
> using a source code management (SCM) system like Perforce, Subversion
> or CVS, from within the IDL Workbench. This is essentially the same
> info as Chris Padwick's earlier post.
>
> 1. Install your favorite SCM plugin feature. I'll use Perforce as an
> example.
> 2. Start with a clean IDL Workspace. Do *not* create any projects.
> 3. Change perspectives to the Perforce perspective (or whatever yours
> is).
> 4. Set up your connection to your server. Make sure you can see the
> files and folders within your depot/repository/
> 5. Navigate to the folder that contains the IDL code that you want to
> work on. This folder can contain subfolders, doesn't matter. You need
> to decide on how best to split up your repository into IDL Projects.
> 6. Right click on the desired folder within the depot/repository view,
> choose Team->Import as Project. (menu item may be slightly different
> depending on your SCM)
With Subclipse, if you right-click on the folder in the
SVN Repository view, you don't get anything like a TEAM menu. You
do have the option to "Checkout", and you can make a new Project
in in the Workspace to checkout to.
>
> At this point, the IDL Workbench will import that folder into your
> Workspace as a new Project. Because it contains IDL code, it will
> automatically recognize it as an IDL Project. Note that the files are
> *not* copied. They still live over in your "sandbox", wherever that
> happens to be on your system. You don't care.
I'm not sure what a "sandbox" is, but it certainly appears to me
the files were copied into the directory that is now the IDL
project. In fact, indubitably so.
> * To add a new file, either create the file within the desired folder
> within your Project, or copy an existing file into the folder. Then
> right click on the file, choose Team->Open for Add (or whatever your
> menu item is). This will mark the file for "add", but won't check it
> in.
The key thing appears to be that the file MUST be in a directory
or project that was checked out or created from the repository by
Subclipse. Then, you DO get the Team menu with useful options.
Thanks for the help.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|