Ticket #252 (closed defect: fixed)
moap cl prepare yields a traceback
| Reported by: | jan@… | Owned by: | thomas |
|---|---|---|---|
| Priority: | major | Milestone: | 0.2.5 |
| Component: | moap | Version: | TRUNK |
| Keywords: | Cc: |
Description
Here's an excerpt from the debug output:
DEBUG [ 6061] "Subversion" VCS Jun 11 12:41:41 Found change (moap/vcs/vcs.py:175) LOG [ 6061] "Subversion" VCS Jun 11 12:41:41 Found change block of 9 lines at line 28 (moap/vcs/vcs.py:195) DEBUG [ 6061] "Subversion" VCS Jun 11 12:41:41 Found change (moap/vcs/vcs.py:175) LOG [ 6061] "Subversion" VCS Jun 11 12:41:41 Found change block of 34 lines at line 38 (moap/vcs/vcs.py:195) Traceback (most recent call last):
File "/home/jan/.install/bin/moap", line 9, in <module>
sys.exit(main(sys.argv[1:]))
File "/home/jan/.install/lib/python2.5/site-packages/moap/main.py", line 13, in main
ret = c.parse(argv)
File "/home/jan/.install/lib/python2.5/site-packages/moap/extern/command/command.py", line 203, in parse
return self.aliasedSubCommands[command].parse(args[1:])
File "/home/jan/.install/lib/python2.5/site-packages/moap/extern/command/command.py", line 199, in parse
return self.subCommands[command].parse(args[1:])
File "/home/jan/.install/lib/python2.5/site-packages/moap/extern/command/command.py", line 187, in parse
return self.do(args)
File "/home/jan/.install/lib/python2.5/site-packages/moap/command/cl.py", line 331, in do
changes = v.getChanges(vcsPath)
File "/home/jan/.install/lib/python2.5/site-packages/moap/vcs/vcs.py", line 211, in getChanges
if line[0] == ' ':
IndexError?: string index out of range
Attachments
Change History
comment:2 Changed 6 years ago by thomas
- Status changed from new to closed
- Resolution set to fixed
(In [277]) * moap/test/test_vcs_svn.py:
Subclass from common.SVNTestCase and use its methods more. Add a test that triggers bug #252.
- moap/vcs/vcs.py: Handle the case where the diff is the single line on a one-line file, which gets diff location markers like @@ -1 +1 @@
- moap/vcs/svn.py: Fixes #252 by scrubbing the output from property changes. Coverage: 74 % (1038 / 1392)

after looking at it, seems that this is because getDiff on an SVN repository also returns the Property changes and this breaks the diff.
So I need to create a testcase for this, then remove Property changes from SVN getDiff output, and that should fix this...