##// END OF EJS Templates
strip: simplify some repeated conditions...
Martin von Zweigbergk -
r29951:e7acbe53 default
parent child Browse files
Show More
@@ -147,7 +147,8 def strip(ui, repo, nodelist, backup=Tru
147 147 vfs.join(backupfile))
148 148 repo.ui.log("backupbundle", "saved backup bundle to %s\n",
149 149 vfs.join(backupfile))
150 if saveheads or savebases:
150 chgrpfile = None
151 if saveheads:
151 152 # do not compress partial bundle if we remove it from disk later
152 153 chgrpfile = _bundle(repo, savebases, saveheads, node, 'temp',
153 154 compress=False)
@@ -184,7 +185,7 def strip(ui, repo, nodelist, backup=Tru
184 185 if troffset == 0:
185 186 repo.store.markremoved(file)
186 187
187 if saveheads or savebases:
188 if chgrpfile:
188 189 ui.note(_("adding branch\n"))
189 190 f = vfs.open(chgrpfile, "rb")
190 191 gen = exchange.readbundle(ui, f, chgrpfile, vfs)
@@ -229,12 +230,12 def strip(ui, repo, nodelist, backup=Tru
229 230 if backupfile:
230 231 ui.warn(_("strip failed, full bundle stored in '%s'\n")
231 232 % vfs.join(backupfile))
232 elif saveheads:
233 elif chgrpfile:
233 234 ui.warn(_("strip failed, partial bundle stored in '%s'\n")
234 235 % vfs.join(chgrpfile))
235 236 raise
236 237 else:
237 if saveheads or savebases:
238 if chgrpfile:
238 239 # Remove partial backup only if there were no exceptions
239 240 vfs.unlink(chgrpfile)
240 241
General Comments 0
You need to be logged in to leave comments. Login now