Commit c7f7e381 authored by gotcha's avatar gotcha

fix for annotate broken tests on Windows

git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@102240 62d5b8a3-27da-0310-9561-8e5933582275
parent 2d888211
......@@ -90,13 +90,21 @@ def _print_annotate(data):
keys = data[section].keys()
keys.sort()
for key in keys:
value, files = data[section][key]
print "%s=%s" % (key, value)
for file in files.split():
print " " + file
print
value, notes = data[section][key]
keyvalue = "%s= %s" % (key, value)
print keyvalue
line = ' '
for note in notes.split():
if note == '[+]':
line = '+= '
elif note == '[-]':
line = '-= '
else:
print line, note
line = ' '
print
def _unannotate_section(section):
for key in section:
value, note = section[key]
......@@ -1323,14 +1331,14 @@ def _update_section(s1, s2):
if k.endswith('+'):
key = k.rstrip(' +')
v1, note1 = s1.get(key, ("", ""))
newnote = ' +'.join((note1, note2)).strip()
newnote = ' [+] '.join((note1, note2)).strip()
s2[key] = "\n".join((v1).split('\n') +
v2.split('\n')), newnote
del s2[k]
elif k.endswith('-'):
key = k.rstrip(' -')
v1, note1 = s1.get(key, ("", ""))
newnote = ' -'.join((note1, note2)).strip()
newnote = ' [-] '.join((note1, note2)).strip()
s2[key] = ("\n".join(
[v for v in v1.split('\n')
if v not in v2.split('\n')]), newnote)
......
......@@ -722,37 +722,36 @@ COMMAND_LINE_VALUE).
==================
<BLANKLINE>
[buildout]
bin-directory=bin
bin-directory= bin
DEFAULT_VALUE
develop=recipes
.../_TEST_/sample-buildout/buildout.cfg
develop-eggs-directory=develop-eggs
develop= recipes
/sample-buildout/buildout.cfg
develop-eggs-directory= develop-eggs
DEFAULT_VALUE
directory=.../_TEST_/sample-buildout
directory= /sample-buildout
COMPUTED_VALUE
eggs-directory=eggs
eggs-directory= eggs
DEFAULT_VALUE
executable=...
executable= ...
DEFAULT_VALUE
installed=.installed.cfg
installed= .installed.cfg
DEFAULT_VALUE
log-format=
DEFAULT_VALUE
log-level=INFO
log-level= INFO
DEFAULT_VALUE
parts=data-dir
.../_TEST_/sample-buildout/buildout.cfg
parts-directory=parts
parts= data-dir
/sample-buildout/buildout.cfg
parts-directory= parts
DEFAULT_VALUE
python=buildout
python= buildout
DEFAULT_VALUE
<BLANKLINE>
[data-dir]
path=foo bins
.../_TEST_/sample-buildout/buildout.cfg
recipe=recipes:mkdir
.../_TEST_/sample-buildout/buildout.cfg
<BLANKLINE>
path= foo bins
/sample-buildout/buildout.cfg
recipe= recipes:mkdir
/sample-buildout/buildout.cfg
<BLANKLINE>
Variable substitutions
......@@ -1083,34 +1082,34 @@ operations.
...
<BLANKLINE>
[part1]
option=a1 a2
option= a1 a2
a3 a4
a5
.../_TEST_/sample-buildout/base.cfg
+.../_TEST_/sample-buildout/extension1.cfg
+.../_TEST_/sample-buildout/extension2.cfg
/sample-buildout/base.cfg
+= /sample-buildout/extension1.cfg
+= /sample-buildout/extension2.cfg
recipe=
.../_TEST_/sample-buildout/base.cfg
/sample-buildout/base.cfg
<BLANKLINE>
[part2]
option=b1 b2 b3 b4
.../_TEST_/sample-buildout/base.cfg
-.../_TEST_/sample-buildout/extension1.cfg
-.../_TEST_/sample-buildout/extension2.cfg
option= b1 b2 b3 b4
/sample-buildout/base.cfg
-= /sample-buildout/extension1.cfg
-= /sample-buildout/extension2.cfg
recipe=
.../_TEST_/sample-buildout/base.cfg
/sample-buildout/base.cfg
<BLANKLINE>
[part3]
option=c1 c2
option= c1 c2
c3 c4 c5
.../_TEST_/sample-buildout/base.cfg
+.../_TEST_/sample-buildout/extension1.cfg
/sample-buildout/base.cfg
+= /sample-buildout/extension1.cfg
recipe=
.../_TEST_/sample-buildout/base.cfg
/sample-buildout/base.cfg
<BLANKLINE>
[part4]
option=h1 h2
.../_TEST_/sample-buildout/extension1.cfg
option= h1 h2
/sample-buildout/extension1.cfg
...
Cleanup.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment