summaryrefslogtreecommitdiff
path: root/exporters
diff options
context:
space:
mode:
authorIan Clatworthy <ian.clatworthy@canonical.com>2009-08-26 18:11:26 +1000
committerIan Clatworthy <ian.clatworthy@canonical.com>2009-08-26 18:11:26 +1000
commit47177525a3848d17d2d435067cf9e93804b459a9 (patch)
tree07a4093e35e36194aa297f14c2ab1afaa26b98c8 /exporters
parent8f95533c4244a62e3f46375a03b20bfcacd390bb (diff)
downloadbzr-fastimport-47177525a3848d17d2d435067cf9e93804b459a9.tar.gz
Use the git on Windows path for the check and not just the run itself
Diffstat (limited to 'exporters')
-rw-r--r--exporters/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/exporters/__init__.py b/exporters/__init__.py
index b7f52a8..dfdf4f5 100644
--- a/exporters/__init__.py
+++ b/exporters/__init__.py
@@ -218,14 +218,14 @@ class MercurialExporter(_Exporter):
class GitExporter(_Exporter):
def __init__(self):
- self.check_install('Git', '1.6', ['git'])
+ self.cmd_name = "git"
+ if sys.platform == 'win32':
+ self.cmd_name = "git.cmd"
+ self.check_install('Git', '1.6', [self.cmd_name])
def generate(self, source, destination, verbose=False, custom=None):
"""Generate a fast import stream. See _Exporter.generate() for details."""
- cmd_name = "git"
- if sys.platform == 'win32':
- cmd_name = "git.cmd"
- args = [cmd_name, "fast-export", "--all", "--signed-tags=warn"]
+ args = [self.cmd_name, "fast-export", "--all", "--signed-tags=warn"]
outf, base, marks = self.get_output_info(destination)
if marks:
marks = os.path.abspath(marks)