1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-25 17:36:13 +01:00

- adjusted store_write_string calls so that the storefile ends with a newline

- adjusted testcase fixtures for this change
This commit is contained in:
Marcus Huewe 2010-08-30 14:20:12 +02:00
parent c8e849b391
commit c4ceb7f700
16 changed files with 23 additions and 23 deletions

View File

@ -190,7 +190,7 @@ class Osc(cmdln.Cmdln):
print 'Initializing %s (Project: %s)' % (os.curdir, project)
else:
Package.init_package(apiurl, project, package, os.curdir)
store_write_string(os.curdir, '_files', show_files_meta(apiurl, project, package))
store_write_string(os.curdir, '_files', show_files_meta(apiurl, project, package) + '\n')
print 'Initializing %s (Project: %s, Package: %s)' % (os.curdir, project, package)
@cmdln.alias('ls')
@ -3026,7 +3026,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
msg = edit_message(footer='\n'.join(footer), template=template)
if msg:
store_write_string(os.path.abspath('.'), '_commit_msg', msg)
store_write_string(os.path.abspath('.'), '_commit_msg', msg + '\n')
else:
store_unlink_file(os.path.abspath('.'), '_commit_msg')
@ -5495,7 +5495,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
os.mkdir(destdir)
Package.init_package(apiurl, target_prj, target_package, destdir)
store_write_string(destdir, '_files', ''.join(meta))
store_write_string(destdir, '_files', ''.join(meta) + '\n')
store_write_string(destdir, '_linkrepair', '')
pac = Package(destdir)
@ -5681,7 +5681,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
p.write_deletelist()
p.write_conflictlist()
# store new linkrev
store_write_string(p.absdir, '_pulled', linkinfo_new.get('srcmd5'))
store_write_string(p.absdir, '_pulled', linkinfo_new.get('srcmd5') + '\n')
p.unmark_frozen()
print
if len(p.in_conflict):

View File

@ -900,7 +900,7 @@ class Package:
except:
pass
else:
store_write_string(self.absdir, '_size_limit', self.size_limit)
store_write_string(self.absdir, '_size_limit', str(self.size_limit) + '\n')
def write_addlist(self):
self.__write_storelist('_to_be_added', self.to_be_added)
@ -1143,7 +1143,7 @@ class Package:
It is replaced with the version pulled from upstream.
"""
meta = ''.join(show_files_meta(self.apiurl, self.prjname, self.name, revision=revision, limit_size=self.limit_size, meta=self.meta))
store_write_string(self.absdir, '_files', meta)
store_write_string(self.absdir, '_files', meta + '\n')
def update_datastructs(self):
"""
@ -1256,7 +1256,7 @@ class Package:
It is replaced with the version pulled from upstream.
"""
meta = ''.join(show_package_meta(self.apiurl, self.prjname, self.name))
store_write_string(self.absdir, '_meta', meta)
store_write_string(self.absdir, '_meta', meta + '\n')
def findfilebyname(self, n):
for i in self.filelist:
@ -1644,7 +1644,7 @@ rev: %s
fm = show_files_meta(self.apiurl, self.prjname, self.name, revision=rev, limit_size=limit_size)
root = ET.fromstring(fm)
rfiles = self.__get_files(root)
store_write_string(self.absdir, '_files', fm, subdir='_in_update')
store_write_string(self.absdir, '_files', fm + '\n', subdir='_in_update')
kept, added, deleted, services = self.__get_rev_changes(rfiles)
if not service_files:
services = []
@ -1720,7 +1720,7 @@ rev: %s
targetfilename=os.path.join(self.absdir, f.name), revision=rev,
progress_obj=self.progress_obj, mtime=f.mtime, meta=self.meta)
print statfrmt('A', os.path.join(pathn, f.name))
store_write_string(self.absdir, '_files', fm)
store_write_string(self.absdir, '_files', fm + '\n')
self.update_local_pacmeta()
self.update_datastructs()

View File

@ -2,4 +2,4 @@
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282133912" name="foo" size="23" />
<entry md5="14758f1afd44c09b7992073ccf00b43d" mtime="1282134056" name="merge" size="7" />
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282133912" name="nochange" size="25" />
</directory>
</directory>

View File

@ -2,4 +2,4 @@
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282130148" name="foo" size="23" />
<entry md5="89fcd308c6e6919c472e56ec82ace945" mtime="1282130545" name="merge" size="46" />
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282130148" name="nochange" size="25" />
</directory>
</directory>

View File

@ -1,4 +1,4 @@
<directory name="simple" rev="2" srcmd5="2df1eacfe03a3bec2112529e7f4dc39a" vrev="2">
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
</directory>
</directory>

View File

@ -3,4 +3,4 @@
<entry md5="d15dbfcb847653913855e21370d83af1" mtime="1282553634" name="exists" size="6" />
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282320303" name="foo" size="23" skipped="true" />
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282320303" name="merge" size="48" skipped="true" />
</directory>
</directory>

View File

@ -3,4 +3,4 @@
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282320303" name="foo" size="23" />
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282320303" name="merge" size="48" />
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
</directory>
</directory>

View File

@ -2,4 +2,4 @@
<entry md5="2bb5f888a0063a0931c12f35851953e4" mtime="1282135005" name="foo" size="37" />
<entry md5="426e11f11438365322f102c02b0a33f0" mtime="1282134896" name="merge" size="50" />
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282134731" name="nochange" size="25" />
</directory>
</directory>

View File

@ -3,4 +3,4 @@
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282047302" name="foo" size="23" />
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
</directory>
</directory>

View File

@ -3,4 +3,4 @@
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282054323" name="upstream_added" size="23" />
</directory>
</directory>

View File

@ -2,4 +2,4 @@
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282047302" name="foo" size="23" />
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
</directory>
</directory>

View File

@ -2,4 +2,4 @@
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282047302" name="foo" size="23" />
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
</directory>
</directory>

View File

@ -2,4 +2,4 @@
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282047302" name="foo" size="23" />
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
</directory>
</directory>

View File

@ -3,4 +3,4 @@
<entry md5="14758f1afd44c09b7992073ccf00b43d" mtime="1282137220" name="foo" size="7" />
<entry md5="256d8f76ba7a0a231fb46a84866f25d8" mtime="1282137238" name="merge" size="20" />
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
</directory>
</directory>

View File

@ -4,4 +4,4 @@
<entry md5="ed955c917012307d982b7cdd5799ff1a" mtime="1282320398" name="bigfile" size="69" />
<entry md5="0d62ceea6020d75154078a20d8c9f9ba" mtime="1282320303" name="foo" size="23" />
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282320303" name="merge" size="48" />
</directory>
</directory>

View File

@ -2,4 +2,4 @@
<entry md5="bb3a1efda68dff80ec3a2fb599b97ad8" mtime="1282058167" name="foo" size="39" />
<entry md5="17b9e9e1a032ed44e7a584dc6303ffa8" mtime="1282047303" name="merge" size="48" />
<entry md5="7efa70f68983fad1cf487f69dedf93e9" mtime="1282047303" name="nochange" size="25" />
</directory>
</directory>