src/mercurialserver/paths.py
author Paul Crowley <paul@lshift.net>
Sat, 07 Mar 2009 09:39:36 +0000
changeset 84 964b04126d01
parent 79 3a58a95fae2f
child 165 3606d60b07e5
permissions -rw-r--r--
Force install as root and allow path to change.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
70
abb9ed8972e0 Move more into hg-ssh
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     1
# Copyright 2008-2009 LShift Ltd
abb9ed8972e0 Move more into hg-ssh
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     2
abb9ed8972e0 Move more into hg-ssh
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     3
# Crude but it will do
abb9ed8972e0 Move more into hg-ssh
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     4
79
3a58a95fae2f abolish hg-ssh-wrapper
Paul Crowley <paul@lshift.net>
parents: 70
diff changeset
     5
import sys
3a58a95fae2f abolish hg-ssh-wrapper
Paul Crowley <paul@lshift.net>
parents: 70
diff changeset
     6
import os.path
3a58a95fae2f abolish hg-ssh-wrapper
Paul Crowley <paul@lshift.net>
parents: 70
diff changeset
     7
3a58a95fae2f abolish hg-ssh-wrapper
Paul Crowley <paul@lshift.net>
parents: 70
diff changeset
     8
def setExePath():
3a58a95fae2f abolish hg-ssh-wrapper
Paul Crowley <paul@lshift.net>
parents: 70
diff changeset
     9
    global _exePath
3a58a95fae2f abolish hg-ssh-wrapper
Paul Crowley <paul@lshift.net>
parents: 70
diff changeset
    10
    _exePath = os.path.dirname(os.path.abspath(sys.argv[0]))
3a58a95fae2f abolish hg-ssh-wrapper
Paul Crowley <paul@lshift.net>
parents: 70
diff changeset
    11
3a58a95fae2f abolish hg-ssh-wrapper
Paul Crowley <paul@lshift.net>
parents: 70
diff changeset
    12
def getExePath():
3a58a95fae2f abolish hg-ssh-wrapper
Paul Crowley <paul@lshift.net>
parents: 70
diff changeset
    13
    return _exePath
3a58a95fae2f abolish hg-ssh-wrapper
Paul Crowley <paul@lshift.net>
parents: 70
diff changeset
    14
70
abb9ed8972e0 Move more into hg-ssh
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    15
def getEtcPath():
abb9ed8972e0 Move more into hg-ssh
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    16
    return "/etc/mercurial-server"