Skip to content
Browse files

Adds support for Mercurial.

  • Loading branch information...
1 parent d3a3962 commit 6eec825a90784b349e2c416d19e4a6cd97f272d1 @mitchellrj mitchellrj committed Feb 10, 2012
Showing with 9 additions and 2 deletions.
  1. +1 −1 CHANGES.txt
  2. +1 −1 README.rst
  3. +7 −0 isotoma/recipe/facts/__init__.py
View
2 CHANGES.txt
@@ -4,7 +4,7 @@ Changelog
0.0.6 (unreleased)
------------------
-- Nothing changed yet.
+- Added support for Mercurial VCS
0.0.5 (2012-02-03)
View
2 README.rst
@@ -23,7 +23,7 @@ user.gid
user.home
The home directory of the user running buildout
vcs.type
- The type of checkout that buildout is being run from. Supports Git or SVN, otherwise will be 'unknown'.
+ The type of checkout that buildout is being run from. Supports Mercurial ('hg'), Git ('git') or Subversion ('svn'), otherwise will be 'unknown'.
vcs.branch
The branch or that that buildout is being run from. Will be 'unknown' for unsupported VCS.
View
7 isotoma/recipe/facts/__init__.py
@@ -118,6 +118,13 @@ def set_vcs(self):
self.options['vcs.branch'] = line[2:]
break
+ elif os.path.exists(os.path.join(vsc_dir, ".hg")):
+ self.options["vcs.type"] = "hg"
+
+ p = subprocess.Popen(['hg', 'branch'], stdout=subprocess.PIPE, cwd=vcs_dir)
+ s, e = p.communicate()
+
+ self.option['vcs.branch'] = s.strip()
else:
self.options["vcs.type"] = "unknown"

0 comments on commit 6eec825

Please sign in to comment.
Something went wrong with that request. Please try again.