diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-02-17 21:57:54 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-02-17 21:57:54 +0100 |
commit | 5b74ef535e5137e040af1a1f5462e7f91e120d60 (patch) | |
tree | e04ed771a831751a573556fb517c99f459717967 | |
parent | b62f7361467f1d451180831da3c286503379f43a (diff) | |
download | sciteco-5b74ef535e5137e040af1a1f5462e7f91e120d60.tar.gz |
added session.svn macro to set up a session profile in the current Subversion working copy
* it uses "svn info --xml" since otherwise the output of "svn info" might
be localized.
-rw-r--r-- | lib/session.tes | 18 | ||||
-rw-r--r-- | sample.teco_ini | 4 |
2 files changed, 19 insertions, 3 deletions
diff --git a/lib/session.tes b/lib/session.tes index 9b924bc..455eaa7 100644 --- a/lib/session.tes +++ b/lib/session.tes @@ -34,11 +34,25 @@ EU[session.path]Q[$SCITECOCONFIG]/.teco_session ' } -! Call this to set up the session path unique to - the current Git repository (if there is one) ! +! Call this to set up the session path unique to the + Git repository of the current working directory (if there is one). + This requires the Git command-line client in $PATH. ! @[session.git]{ ! if there is no Git repository, session.path is left as it is ! :EG[session.path]git rev-parse --show-toplevel"S [* EQ[session.path] ZJ -D I/.teco_session ]* ' } + +! Call to set up the session path unique to the + SVN working copy containing the current working directory. + Requires the SVN client v1.7 or later in $PATH. ! +@[session.svn]{ + ! if there is no SVN working copy, session.path is left as it is ! + :EG.isvn info --xml"S [* + EQ.i + :S<wcroot-abspath>"S + .(S</.-2)X[session.path] :[session.path]/.teco_session + ' + ]* ' +} diff --git a/sample.teco_ini b/sample.teco_ini index 9314859..b53362d 100644 --- a/sample.teco_ini +++ b/sample.teco_ini @@ -44,8 +44,10 @@ EMQ[$SCITECOPATH]/fnkeys.tes and disable session saving. Otherwise open a buffer session. ! Z"= - ! Uncomment to use a separate session per Git repository: ! + ! Uncomment to use a separate session per VCS repository or + working copy (see session.tes): ! ! M[session.git] ! + ! M[session.svn] ! M[session.load] | [session.path] ! disables session saving ! |