Eclipse + local CVS + PyDev - python

I tried several Python IDEs (on Windows platform) but finally I found only Eclipse + PyDev meeting my needs. This set of tools is really comfortable and easy to use. I'm currently working on a quite bigger project. I'd like to have a possibility to use CVS or any other version control system which would be installed on my local harddrive (I recently moved my house and don't have yet an access to internet.)
It doesn't matter for me if it'd be CVS - can also be any other version control system. It'd be great if it will be not too hard to configure with Eclipse. Can anyone give me some possible solution? Any hints?
Regards and thanks in advance for any clues. Please forgive my English ;)

Last time I tried this, Eclipse did not support direct access to local repositories in the same way that command line cvs does because command line cvs has both client and server functionality whereas Eclipse only has client functionality and needs to go through (e.g.) pserver, so you would probably need to have a cvs server running.
Turns out that I didn't really need it anyway as Eclipse keeps its own history of all changes so I only needed to do an occasional manual update to cvs at major milestones.
[Eventually I decided not to use cvs at all with Eclipse under Linux as it got confused by symlinks and started deleting my include files when it "synchronised" with the repository.]

If you don't mind a switch to Subversion, Eclipse has its SubClipse plugin.

As others have indicated, there are plugins available for Eclipse for SVN, Bazar, Mercurial and Git.
Even so, despite their presence, I find using the command line the most comfortable.
svn commit -m 'now committing'
Assuming you are not committing for more than several times a day, this should work well enough. Is there anything specific that is preventing you from using the command line?

I tried Eclipse+Subclipse and Eclipse+Bazaar plugin. Both work very well, but I have found that Tortoise versions of those version source control tools are so good that I resigned from Eclipse plugins. On Windows Tortoise XXX are my choice. They integrate with shell (Explorer or TotalCommander), changes icon overlay if file is changed, shows log, compare revisions etc. etc.

I would definitely recommend switching over to a different VCS—I prefer Mercurial, along with a lot of the Python community. That way, you'll be able to work locally, but still have the ability to publish your changes to the world later.
You can install TortoiseHg for Windows Explorer, and the MercurialEclipse plugin for Eclipse.
There's even a Mercurial for CVS users document to help you change over, and a list of mostly-equivalent commands.

I believe Eclipse does have CVS support built in - or at least it did have when I last used it a couple of years ago.
For further information on how to use CVS with Eclipse see the Eclipse CVS FAQ

I recently moved my house and don't have yet an access to internet.
CVS and SVN are the Centralized Version control systems. Rather than having to install them on your local system just for single version control, you could use DVCS like Mercurial or Git.
When you clone a Mercurial Repository, you have literally all versions of all the repo files available locally.

I use Eclipse with a local CVS repository without issue. The only catch is that you cannot use the ":local:" CVS protocol. Since you're on Windows, I recommend installing TortoiseCVS and then configuring the included CVSNT server as follows:
Control Panel: CVSNT
Repository configuration: create a repository and publish it
Note the Server Name and make sure it matches your hostname
Eclipse: Create a new repository location using the :pserver: connection type and point it to your local hostname
This (or any actual source control system) has the advantage over the Eclipse Local History of being able to associate checkin comments with changes, group changes into change sets, etc. You can use the Eclipse Local History to recover from minor mistakes, but it's no replacement for source control (and expires as well: see Window->Preferences General->Workspace->Local History).

Related

pycharm will not allow me to use my python on an Ubuntu operating system

I have been working on getting pycharm to use python easy right.. wrong, when I try to add python 3.5 the gui, keeps going back to no SDK at all and it won't let me add one. to better explain the problem I made this video to help. what I am doing should work but it is not. note this is on an Ubuntu operating system.
https://www.youtube.com/watch?v=g5dy1jlIHCs
It seems weird beucase JetBrains' product detects local SDK first without pain, but you have really problem with that.
Anyway, I think, we can solve the problem.
Try to look PyCharm log. You may see interesting things over there.
Delete VirtualEnv and use /usr/bin/python3.5. (Maybe, it can solve)
Check JetBrains owner (chown), read and write permissions (chmod). Also, check .idea file
NOTE:
This invalid VCS doesn't effect your usage of SDK because JetBrains has to read .idea to find your VCS settings (or other things)
Thank you
You have two interpreters with the same name, not sure how it happened but PyCharm doesn't allow it
remove one, also you select an interpreter for a wrong project (you have multiple opened)

Python - Including external libraries in version control

We are a small team trying to work on a python project using eclipse + pydev.
For our version control we use cloudforge SVN and the subclipse plugin.
I am trying to figure out what is the right way to include external libs which are normally installed
locally to the python in Lib/site-packages.
I tried several ways but some of them made some complications.
I am looking for the best-practice method for this matter.
Thanks in advance!
Use svn:externals. Example:
svn propset svn:externals 'akismet http://plugins.svn.wordpress.org/akismet/trunk'
svn commit
Your next update is going to incorporate the external source from http://plugins.svn.wordpress.org/akismet/trunk in the akismet directory. Hope that helps...

best version control system for personal/home use when developing with eclipse and python/django

I am working on a small django project at home. I would like to install and use a small version control system for personal use for free. I don't want to use a web service like github because I am not always connected. I would like to have the VCS server/daemon installed and use it at my home pc (windows 7).
I would also like it to be compatible with eclipse+pydev which I use for programming.
Any help would be greatly appreciated!
Thanks,
Chris
GIT is built in a way that you can use it 'offline': doing commit, reverting change, browsing history.
I don't see any advantage in your case to use SVN instead of GIT (you can host your own GIT server, no need to use github.com)
http://book.git-scm.com/4_setting_up_a_public_repository.html
There are also GIT alternatives for distributed SCM:
Mercurial
Bazaar
BTW, for my personal prototype DropBox is sufficient ;)
I suggest using mercurial with a Bitbucket private repository. Mercurial will work just fine when you're offline, and you can push your changes to Bitbucket to access your code elsewhere (your laptop, server, etc.) later.
There's also mercurial plugins for eclipse. (see Mercurial Eclipse Plugin)
I would recommend to use Mercurial together with DropBox in order to make sure that you don't lose everything in case of crash.
See http://www.h4ck3r.net/2010/05/11/mercurial-hg-with-dropbox/
I hope it helps
For personal version control, I would recomend the following:
FileHamster
Oops! Backup
FolderTrack
Note: I am an author of FolderTrack. I recomend it for use with programming because it will treat a group of source files as one "work product". If you want to rewind your code to yesterday and that requires deleting 2 files, renameing 1 file, and chaning 15 more then foldertrack will do it.
The free license for Foldertrack is: BOS
SVN has Eclipse plugins (Subclipse, Subversive), I don't know for pydev though. But it is one of the most used version control system and it is free.
If it is for personal use, thus you probably don't have to go with distributed vcs, I would definitely go with subversion (svn). It has nice plugin for eclipse: subversive. I'm using it for years.
http://subversion.apache.org/
for eclipse:
http://www.polarion.com/products/svn/subversive.php

How to get started with a bare-bones Eclipse + PyDev

I am planning to move from SPE to Eclipse + PyDev for better code completion. I think SPE's code completion is rather weird.
Anyway, how should I get started with Eclipse + PyDev? I browsed http://www.eclipse.org and I found that Eclipse is made up of some base/core system and plugins are added for more functionality. I also stumbled upon http://www.easyeclipse.org which offers a ready-to-use Eclipse + PyDev distribution.
I have two options: the easy way and the hard way.
EASY WAY
Just download from http://www.easyeclipse.org. Problem is, I can't decide which version to use, v1.2.2.2 or v1.3.1?
HARD WAY
I want to keep a lean Eclipse installation, so I want to start out with a bare-bones download, then add plug-ins as I advance in skill. As of the moment, all I want in an IDE is the following:
Proper code completion, and
An easy shortcut key to run the current program. It should be something like F5 or F9.
Eventually, I will want to use more advanced tools, but I want to add plug-ins when I need or want to learn them:
Debugging
Unit testing
Version control
What plug-ins should I install to get the specific features I just mentioned?
The leanest Eclipse installation is the Platform Runtime Binary at around 50MB (look for it in the middle of the page). Install it and then once in eclipse go to Help->Install New Software... and use http://pydev.org/updates as link to install PyDev and you are done. Not very hard at all.
I've never really used the PyDev with Eclipse, but Eclipse comes with shortcut keys - you can change them to whatever suits you. If you install the standard version of Eclipse (which isn't exactly "lean", you know) with PyDev, you should have debugging built in. You can get Eclipse plugins for virtually any VCS you like, whether that's git or bazaar, subversion or CVS. Just check out the list.
edit: and it doesn't look like there's any reason not to use the newest stable version of Easyclipse, if that's what you decide.
I have used EasyEclipse for a while, but though less errors and incompatibilities occurred than in the standard version at that time, I didn't like that some modules were either too old or not supported at all. Meanwhile the standard distribution is stable enough.
Debugging and unit testing are integrated in PyDev. You must configure the Python interpreter in the preferences, "Auto config" should do, then choose "Run as..." "Python unit-test" on a Python module, and for debugging see the "Run" menu. Version control depends on what you use, I think CVS is already integrated, but I use Subversion, and for that you need to install the Subversive plugin (meanwhile available from the Eclipse repositories, but you must still install it).

Convert SCCS repository to SVN

I'm investigating migrating a source code repository currently kept under SCCS on an aging Digital UNIX box to Subversion on a Windows box. My initial searching has led me to a python script, sccs2svn, which looks like it would do the job - with some restrictions. A du -sk on the SCCS directory shows it to be about 550MB in size.
From what I can tell, the script runs on a local machine and operates on both SCCS and SVN locally: SCCS through executing SCCS commands directly; SVN through a python module, but also calls svnadmin to create a local directory.
Unfortunately, I need to create the repo on a different server; from what I read in the SVN mailing lists etc, a SVN repo can't simply be copied between servers if the platform is different: an svnadmin dump and restore is required.
The only way I think I can see this working is as a two-stage migration: firstly, to install SVN and python on the existing server, run the script there, then secondly dump the repo out and load it into the Windows SVN - which should work, just slightly more time consuming and requiring a little more disk.
Is anyone aware of a way I could do this without doing it in two stages? Could the python script be modified to act upon a remote repository if the lines to create the repo are commented out? I'll be doing some reading into the Python SVN module, but Python isn't a scripting language I've played with before.
If you use FSFS backend, you can just move the repository to your target platform. FSFS Repositories are truely platform indipendent. They are also standard setup since svn 1.3 so you should not have any problems by creating the repository and then copy it to your final server via any file transfer.
If sccs2svn really must work locally and you want to end up with the SVN repository on a Windows box, then use the Cygwin version of GNU CSSC to run sccs2svn on the Windows box itself. CSSC is an SCCS workalike: see http://www.gnu.org/software/cssc/
Another alternative if you have more flexibility is to use both CSSC and SVN on a GNU/Linux system.

Categories