Strategies for push/merge problem?

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Thu Jul 17 10:15:36 CDT 2008


Kevin, it's not much really. If you're tracking your Eclipse project
files, there isn't much to do anyway. If not - as me in some cases -
you can generate them easily.

The following is what I use to set up clones of Hg itself. You might
also want to use local .hgignore stuff like adding `[ui] ignore =
~/.hgignore.defaults` to .hg/hgrc so you can ignore your local Eclipse
files without touching the repo's .hgignore (in case it's not yours to
touch for such things).

<script>
#! /bin/bash

if [ "$1" == "" ]; then
	echo "Need project name as first argument."
	exit
fi
projectname=$1


echo "Setting up mq..."

hg qinit -c


echo "Setting up Eclipse project $projectname..."

cat >.project <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>$projectname</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.python.pydev.PyDevBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.python.pydev.pythonNature</nature>
	</natures>
</projectDescription>
EOF

cat >.pydevproject <<EOF
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>

<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python
2.5</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/$projectname</path>
</pydev_pathproperty>
</pydev_project>
EOF


echo "Setting up test debug support..."

src=../linked-debug-support
ln -s -t . $src/breakpoint.py $src/breakondbg.py
ln -s -t tests $src/tests/debug-test


echo "Done."
</script>

-parren



On Wed, Jul 16, 2008 at 3:10 PM, Kevin Christen
<kevin.christen at gmail.com> wrote:
> Peter,
>
> Would you share this script with list?
>
> Thanks,
> Kevin Christen
>
> On Wed, Jul 16, 2008 at 1:06 AM, Peter Arrenbrecht
> <peter.arrenbrecht at gmail.com> wrote:
>>
>> On Wed, Jul 16, 2008 at 3:35 AM, Sean Russell <hg at ser1.net> wrote:
>> > On Monday 14 July 2008 10:45:41 pm Douglas Philips wrote:
>> >> >     http://www.selenic.com/mercurial/wiki/index.cgi/ShelveExtension
>> >>
>> >> Looks nice, but the announcement is 1.5 years old, and the
>> >
>> > Actually, local clones pretty much remove the need for shelving.  The
>> > main
>> > advantage for shelving that local clones don't satisfy is when you're
>> > using
>> > an IDE, and setting up a new project is non-trivial.  For example, it is
>> > much, much easier to "svn switch" in Eclipse than it is to create an
>> > entirely
>> > new project, and 90% of the overhead *isn't* in the checking out. It is
>> > in
>> > walking through the Wizards to create a project.  Shelving lets you
>> > re-use a
>> > workspace, which is a huge advantage when you're using an IDE.
>>
>> I use Eclipse extensively. I rely on a small script to initialize new
>> clones with the proper Eclipse project files. Then I can either use a
>> symlink to point to the active clone and run Eclipse on the symlink,
>> or just import the new clone into Eclipse as a new project. I have
>> come to prefer the latter approach recently.
>>
>> The advantage over shelve is that sometimes my one-liners turn out to
>> be just a trifle more complex than that (usually really, as they need
>> test support, too), and this makes it easy to go back to them and
>> improve, or use mq, or whatever is needed.
>>
>> -parren
>> _______________________________________________
>> Mercurial mailing list
>> Mercurial at selenic.com
>> http://selenic.com/mailman/listinfo/mercurial
>
>


More information about the Mercurial mailing list