Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 1346:88a9c75dc76a
Execute hooks in the repository root
author | mpm@selenic.com |
---|---|
date | Fri, 23 Sep 2005 19:46:12 -0700 |
parents | b650bfdfc7ee |
children | c6295d2a361e |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Sep 23 19:41:45 2005 -0700 +++ b/mercurial/localrepo.py Fri Sep 23 19:46:12 2005 -0700 @@ -55,7 +55,11 @@ old[k] = os.environ.get(k, None) os.environ[k] = v + # Hooks run in the repository root + olddir = os.getcwd() + os.chdir(self.root) r = os.system(s) + os.chdir(olddir) for k, v in old.items(): if v != None: