Changeset 383
- Timestamp:
- 05-03-09 23:12:11 (4 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
moap/test/test_vcs_bzr.py (modified) (1 diff)
-
moap/test/test_vcs_git.py (modified) (4 diffs)
-
moap/vcs/bzr.py (modified) (1 diff)
-
moap/vcs/git.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r381 r383 1 2009-03-05 Thomas Vander Stichele <thomas at apestaart dot org> 2 3 patch by: Arek Korbik 4 5 * moap/test/test_vcs_bzr.py: 6 * moap/test/test_vcs_git.py: 7 * moap/vcs/bzr.py: 8 * moap/vcs/git.py: 9 Fix for quotes in commit messages. 10 Fixes #280. 11 1 12 2009-03-05 Thomas Vander Stichele <thomas at apestaart dot org> 2 13 -
trunk/moap/test/test_vcs_bzr.py
r366 r383 43 43 os.system('rm -rf %s' % checkout) 44 44 45 class TestCommit(BzrTestCase): 46 def testQuotedCommit(self): 47 filename = os.path.join(self.checkout, 'one_line_file.txt') 48 open(filename, 'w').write('This is one line file.\n') 49 cmd = 'bzr add %s' % filename 50 (status, output) = commands.getstatusoutput(cmd) 51 self.failIf(status, "Non-null status %r" % status) 52 53 v = bzr.VCSClass(self.checkout) 54 self.failUnless(v) 55 v.commit(['one_line_file.txt', ], "I contain quotes like ' and \"") 56 57 45 58 class TestTree(BzrTestCase): 46 59 def testBzr(self): -
trunk/moap/test/test_vcs_git.py
r366 r383 16 16 def setUp(self): 17 17 self.repository = tempfile.mkdtemp(prefix="moap.test.repo.") 18 oldPath = os.getcwd()18 self.oldPath = os.getcwd() 19 19 os.chdir(self.repository) 20 20 os.system('git init > /dev/null') … … 25 25 26 26 os.system('git add README > /dev/null') 27 os.system('git commit -a -m "readme > /dev/null"')27 os.system('git commit -a -m "readme" > /dev/null') 28 28 29 os.chdir( oldPath)29 os.chdir(self.oldPath) 30 30 self.checkout = tempfile.mkdtemp(prefix="moap.test.checkout.") 31 31 os.rmdir(self.checkout) … … 36 36 37 37 def tearDown(self): 38 os.chdir(self.oldPath) 38 39 os.system('rm -rf %s' % self.checkout) 39 40 os.system('rm -rf %s' % self.repository) … … 54 55 self.failIf(git.detect(checkout)) 55 56 os.system('rm -rf %s' % checkout) 57 58 class TestCommit(GitTestCase): 59 def testQuotedCommit(self): 60 filename = os.path.join(self.checkout, 'one_line_file.txt') 61 open(filename, 'w').write('This is one line file.\n') 62 os.chdir(self.checkout) 63 cmd = 'git add one_line_file.txt' 64 (status, output) = commands.getstatusoutput(cmd) 65 self.failIf(status, "Non-null status %r, output %r" % (status, output)) 66 67 v = git.VCSClass(self.checkout) 68 self.failUnless(v) 69 v.commit(['one_line_file.txt', ], "I contain quotes like ' and \"") 56 70 57 71 class TestTree(GitTestCase): -
trunk/moap/vcs/bzr.py
r366 r383 65 65 oldPath = os.getcwd() 66 66 os.chdir(self.path) 67 os.system("bzr commit -m \"%s\" %s" % (message, " ".join(paths))) 67 temp = util.writeTemp([message, ]) 68 os.system("bzr commit --file %s %s" % (temp, " ".join(paths))) 69 os.unlink(temp) 68 70 finally: 69 71 os.chdir(oldPath) -
trunk/moap/vcs/git.py
r366 r383 82 82 if status != 0: 83 83 raise vcs.VCSException(output) 84 cmd = "git commit -m '%s' %s" % (message, " ".join(paths)) 84 temp = util.writeTemp([message, ]) 85 cmd = "git commit -F %s %s" % (temp, " ".join(paths)) 85 86 self.debug("Running %s" % cmd) 86 87 status, output = commands.getstatusoutput(cmd) 88 os.unlink(temp) 87 89 if status != 0: 88 90 raise vcs.VCSException(output)
Note: See TracChangeset
for help on using the changeset viewer.
