aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/session.tes18
-rw-r--r--sample.teco_ini4
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 !