fold/import: Remove requirement on git 1.6.2
authorGustav Hållberg <gustav@virtutech.com>
Wed, 28 Oct 2009 11:21:28 +0000 (12:21 +0100)
committerKarl Wiberg <kha@treskal.com>
Wed, 28 Oct 2009 11:22:12 +0000 (12:22 +0100)
Send "-p<N>" flag to "git apply" rather than "-p <N>".

This removes dependency on git 1.6.2, commit:
  f26c494 parse-opt: migrate builtin-apply.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
stgit/git.py

index 97b1e96..0316342 100644 (file)
@@ -841,7 +841,7 @@ def apply_patch(filename = None, diff = None, base = None,
     if reject:
         cmd += ['--reject']
     if strip != None:
     if reject:
         cmd += ['--reject']
     if strip != None:
-        cmd += ['-p', str(strip)]
+        cmd += ['-p%s' % (strip,)]
     try:
         GRun(*cmd).raw_input(diff).no_output()
     except GitRunException:
     try:
         GRun(*cmd).raw_input(diff).no_output()
     except GitRunException: