mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-12 23:56:13 +01:00
Merge branch 'mergefile_fixed_suffix' of https://github.com/marcus-h/osc
Use a fixed suffix for the upfilename in Package.mergefile.
This commit is contained in:
commit
e5dda8337c
11
osc/core.py
11
osc/core.py
@ -1300,7 +1300,7 @@ class Package:
|
|||||||
self.to_be_added.remove(n)
|
self.to_be_added.remove(n)
|
||||||
self.write_addlist()
|
self.write_addlist()
|
||||||
elif state == 'C':
|
elif state == 'C':
|
||||||
# don't remove "merge files" (*.r, *.mine...)
|
# don't remove "merge files" (*.mine, *.new...)
|
||||||
# that's why we don't use clear_from_conflictlist
|
# that's why we don't use clear_from_conflictlist
|
||||||
self.in_conflict.remove(n)
|
self.in_conflict.remove(n)
|
||||||
self.write_conflictlist()
|
self.write_conflictlist()
|
||||||
@ -1336,15 +1336,10 @@ class Package:
|
|||||||
filename = os.path.join(self.dir, n)
|
filename = os.path.join(self.dir, n)
|
||||||
storefilename = os.path.join(self.storedir, n)
|
storefilename = os.path.join(self.storedir, n)
|
||||||
myfilename = os.path.join(self.dir, n + '.mine')
|
myfilename = os.path.join(self.dir, n + '.mine')
|
||||||
if self.islinkrepair() or self.ispulled():
|
upfilename = os.path.join(self.dir, n + '.new')
|
||||||
upfilename = os.path.join(self.dir, n + '.new')
|
|
||||||
else:
|
|
||||||
upfilename = os.path.join(self.dir, n + '.r' + self.rev)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.unlink(myfilename)
|
os.unlink(myfilename)
|
||||||
# the working copy may be updated, so the .r* ending may be obsolete...
|
|
||||||
# then we don't care
|
|
||||||
os.unlink(upfilename)
|
os.unlink(upfilename)
|
||||||
if self.islinkrepair() or self.ispulled():
|
if self.islinkrepair() or self.ispulled():
|
||||||
os.unlink(os.path.join(self.dir, n + '.old'))
|
os.unlink(os.path.join(self.dir, n + '.old'))
|
||||||
@ -1683,7 +1678,7 @@ class Package:
|
|||||||
filename = os.path.join(self.dir, n)
|
filename = os.path.join(self.dir, n)
|
||||||
storefilename = os.path.join(self.storedir, n)
|
storefilename = os.path.join(self.storedir, n)
|
||||||
myfilename = os.path.join(self.dir, n + '.mine')
|
myfilename = os.path.join(self.dir, n + '.mine')
|
||||||
upfilename = os.path.join(self.dir, n + '.r' + self.rev)
|
upfilename = os.path.join(self.dir, n + '.new')
|
||||||
origfile_tmp = os.path.join(self.storedir, '_in_update', '%s.copy' % n)
|
origfile_tmp = os.path.join(self.storedir, '_in_update', '%s.copy' % n)
|
||||||
origfile = os.path.join(self.storedir, '_in_update', n)
|
origfile = os.path.join(self.storedir, '_in_update', n)
|
||||||
shutil.copyfile(filename, origfile_tmp)
|
shutil.copyfile(filename, origfile_tmp)
|
||||||
|
Loading…
Reference in New Issue
Block a user