1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-27 12:42:12 +01:00

- fix update in directory with unmodified files: don't try to merge if upstream

file wasn't changed at all
- use given project name in new_project_templ
This commit is contained in:
Dr. Peter Poeml 2006-05-23 16:16:14 +00:00
parent bc68a2d277
commit 1f764554a0
2 changed files with 7 additions and 3 deletions

View File

@ -338,6 +338,7 @@ usage: up
for i in p.filenamelist:
if p.status(i) == 'M':
saved_modifiedfiles.append(i)
oldp = p
p.update_filesmeta()
p = Package(p.dir)
@ -357,7 +358,10 @@ usage: up
for filename in p.filenamelist:
state = p.status(filename)
if state == 'M' and filename in saved_modifiedfiles:
if p.findfilebyname(filename).md5 == oldp.findfilebyname(filename).md5:
# no merge necessary... local file is changed, but upstream isn't
pass
elif state == 'M' and filename in saved_modifiedfiles:
status_after_merge = p.mergefile(filename)
print statfrmt(status_after_merge, filename)
elif state == 'M':

View File

@ -27,7 +27,7 @@ exclude_stuff = [store, '.svn', 'CVS']
new_project_templ = """\
<project name="NewProjectName">
<project name="%s">
<title>Short title of NewProject</title>
<description>This project aims at providing some foo and bar.
@ -691,7 +691,7 @@ def edit_meta(prj, pac):
m = show_project_meta(prj)
except urllib2.HTTPError, e:
if e.code == 404:
m = new_project_templ % username
m = new_project_templ % (prj, username)
f = open(filename, 'w')
f.write(''.join(m))