On Fri, Apr 11, 2008 at 1:51 PM, Dan White <[EMAIL PROTECTED]> wrote:

>
> On Fri, Apr 11, 2008 at 1:05 PM, TL <[EMAIL PROTECTED]> wrote:
> >  Has anybody developed a method for choosing which local Leo branch to
> >  use when opening a .leo file?  I assume this capability is often
> >  needed by Leo developers.
>

Good question.  I've been refining this on xp over the last few days.

My technique is to define two 'helper' batch files:

leo.bat:

rem *** Global Leo ***
python c:\leo.repo\trunk\leo\src\leo.py %1 %2 %3

leo-local.bat

python src\leo.py %1 %2 %3

leo.bat opens leo.py (possibly with arguments) in the trunk directory.  In
contrast, leo-local.bat opens leo.py in the "local" directory.  The
assumption is that you will cd aBranch/leo before executing leo-local.bat.

However, I don't use these scripts directly.  Instead, I define many scripts
that (mostly) use leo-local.bat.  Examples:

leo-src.bat contains:

leo-local src\leoPy.leo

leo-test.bat (and also leo-t.bat) contain:

leo-local test\test.leo

leo-doc.bat (and also leo-d.bat) contain:

leo-local doc\LeoDocs.leo

And similarly for leo-settings.bat, leo-mySettings.bat and leo-utest.bat
(aka, leo-u.bat).  The assumption in most cases is that I must cd
aBranch/leo before executing these scripts.  Exception: leo-mySettings.bat
always opens <myHome>/myLeoSettings.leo.

Finally, I defined the repo.bat, trunk.bat, devel.bat and sax.bat that do
the following, respectively:

cd c:\leo.repo
cd c:\leo.repo\trunk\leo
cd c:\leo.repo\ekr-devel\leo
cd c:\leo.repo\sax\leo

With these tools in place, to start work in a branch I do the following:

- open a console.
- type trunk, devel or sax, if I am using one of the standard branches.
  Otherwise I type:

repo
cd aBranch\leo

Either way, I am in myDesiredBranch\leo

Now I can type leo-src or leo-d or leo-t or leo-utest to start src/leoPy.leo
or doc/LeoDocs.leo or test/test.leo or test/utest.leo.

This takes very little typing.  For example, the following opens
trunk\leo\test\test.leo in a console, assuming cmd is in the xp start menu:

<start>c<return> # opens the console.
trunk
leo-t

Interestingly, with this new work flow, almost all my work is console
based.  It is eerily similar to my Linux work flow.

HTH.

Edward

P.S.  All these .bat scripts reside in c:\Windows.  I put shortcuts to these
.bat files in an a single, easy-to-get-at place so I can refresh my memory
about exactly what these scripts do.  These shortcuts were helpful, for
example, when writing this post.

EKR

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to