summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib')
-rw-r--r--morphlib/buildsystem.py2
-rw-r--r--morphlib/buildsystem_tests.py2
-rw-r--r--morphlib/plugins/branch_and_merge_plugin.py6
-rw-r--r--morphlib/plugins/expand_repo_plugin.py42
-rw-r--r--morphlib/plugins/trebuchet_plugin.py2
5 files changed, 48 insertions, 6 deletions
diff --git a/morphlib/buildsystem.py b/morphlib/buildsystem.py
index 6287063a..98aa2219 100644
--- a/morphlib/buildsystem.py
+++ b/morphlib/buildsystem.py
@@ -103,7 +103,7 @@ class AutotoolsBuildSystem(BuildSystem):
'if [ -e autogen ]; then ./autogen; ' +
'elif [ -e autogen.sh ]; then ./autogen.sh; ' +
'elif [ ! -e ./configure ]; then autoreconf -ivf; fi',
- './configure --prefix="$PREFIX"',
+ './configure --prefix="$PREFIX" --sysconfdir=/etc',
]
self.build_commands = [
'make',
diff --git a/morphlib/buildsystem_tests.py b/morphlib/buildsystem_tests.py
index fa7f36f7..d1095037 100644
--- a/morphlib/buildsystem_tests.py
+++ b/morphlib/buildsystem_tests.py
@@ -106,7 +106,7 @@ class LookupBuildSystemTests(unittest.TestCase):
return morphlib.buildsystem.lookup_build_system(name)
def test_raises_keyerror_for_unknown_name(self):
- self.assertRaises(KeyError, self.lookup, 'unkonwn')
+ self.assertRaises(KeyError, self.lookup, 'unknown')
def test_looks_up_manual(self):
self.assertEqual(type(self.lookup('manual')),
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py
index 161b2b4d..efaa8dfe 100644
--- a/morphlib/plugins/branch_and_merge_plugin.py
+++ b/morphlib/plugins/branch_and_merge_plugin.py
@@ -712,7 +712,7 @@ class BranchAndMergePlugin(cliapp.Plugin):
(stratum_name, chunk_name, system_branch))
self.print_changelog('The following changes were made but have not '
- 'been comitted')
+ 'been committed')
def petrify(self, args):
'''Convert all chunk refs in a system branch to be fixed SHA1s
@@ -783,7 +783,7 @@ class BranchAndMergePlugin(cliapp.Plugin):
self.save_morphology(repo_dir, morph, stratum)
self.print_changelog('The following changes were made but have not '
- 'been comitted')
+ 'been committed')
def unpetrify(self, args):
'''Reverse the process of petrification'''
@@ -823,7 +823,7 @@ class BranchAndMergePlugin(cliapp.Plugin):
self.save_morphology(root_repo_dir, name, morphology)
self.print_changelog('The following changes were made but have not '
- 'been comitted')
+ 'been committed')
# When 'merge' is unset, git doesn't try to resolve conflicts itself in
# those files.
diff --git a/morphlib/plugins/expand_repo_plugin.py b/morphlib/plugins/expand_repo_plugin.py
new file mode 100644
index 00000000..16087c6b
--- /dev/null
+++ b/morphlib/plugins/expand_repo_plugin.py
@@ -0,0 +1,42 @@
+# Copyright (C) 2012 Codethink Limited
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+import cliapp
+
+import morphlib
+
+
+class ExpandRepoPlugin(cliapp.Plugin):
+
+ '''Expand an aliased repo URL to be unaliases.'''
+
+ def enable(self):
+ self.app.add_subcommand(
+ 'expand-repo', self.expand_repo, arg_synopsis='[REPOURL...]')
+
+ def disable(self):
+ pass
+
+ def expand_repo(self, args):
+ aliases = self.app.settings['repo-alias']
+ resolver = morphlib.repoaliasresolver.RepoAliasResolver(aliases)
+ for repourl in args:
+ self.app.output.write(
+ 'Original: %s\npull: %s\npush: %s\n\n' %
+ (repourl,
+ resolver.pull_url(repourl),
+ resolver.push_url(repourl)))
+
diff --git a/morphlib/plugins/trebuchet_plugin.py b/morphlib/plugins/trebuchet_plugin.py
index 4fa25e91..2bdf4c3c 100644
--- a/morphlib/plugins/trebuchet_plugin.py
+++ b/morphlib/plugins/trebuchet_plugin.py
@@ -93,7 +93,7 @@ class TrebuchetPlugin(cliapp.Plugin):
if len(args) != 7:
raise cliapp.AppException('make-patch requires arguments: '
- 'name of output file plus two triplest')
+ 'name of output file plus two triplets')
output = args[0]
repo_name1, ref1, filename1 = args[1:4]