Mercurial > hg
comparison hgext/histedit.py @ 17451:8e1fa8a32f2b
histedit: fix unused variable warnings spotted by pyflakes
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Wed, 05 Sep 2012 22:01:09 +0200 |
parents | 31c123a2f273 |
children | 2d750e885512 |
comparison
equal
deleted
inserted
replaced
17450:9c362a497eae | 17451:8e1fa8a32f2b |
---|---|
236 | 236 |
237 def edit(ui, repo, ctx, ha, opts): | 237 def edit(ui, repo, ctx, ha, opts): |
238 oldctx = repo[ha] | 238 oldctx = repo[ha] |
239 hg.update(repo, ctx.node()) | 239 hg.update(repo, ctx.node()) |
240 try: | 240 try: |
241 files = foldchanges(ui, repo, oldctx.p1().node() , ha, opts) | 241 foldchanges(ui, repo, oldctx.p1().node() , ha, opts) |
242 except Exception: | 242 except Exception: |
243 pass | 243 pass |
244 raise util.Abort(_('Make changes as needed, you may commit or record as ' | 244 raise util.Abort(_('Make changes as needed, you may commit or record as ' |
245 'needed now.\nWhen you are finished, run hg' | 245 'needed now.\nWhen you are finished, run hg' |
246 ' histedit --continue to resume.')) | 246 ' histedit --continue to resume.')) |
262 return finishfold(ui, repo, ctx, oldctx, n, opts, []) | 262 return finishfold(ui, repo, ctx, oldctx, n, opts, []) |
263 | 263 |
264 def finishfold(ui, repo, ctx, oldctx, newnode, opts, internalchanges): | 264 def finishfold(ui, repo, ctx, oldctx, newnode, opts, internalchanges): |
265 parent = ctx.parents()[0].node() | 265 parent = ctx.parents()[0].node() |
266 hg.update(repo, parent) | 266 hg.update(repo, parent) |
267 files = foldchanges(ui, repo, parent, newnode, opts) | 267 foldchanges(ui, repo, parent, newnode, opts) |
268 newmessage = '\n***\n'.join( | 268 newmessage = '\n***\n'.join( |
269 [ctx.description()] + | 269 [ctx.description()] + |
270 [repo[r].description() for r in internalchanges] + | 270 [repo[r].description() for r in internalchanges] + |
271 [oldctx.description()]) + '\n' | 271 [oldctx.description()]) + '\n' |
272 # If the changesets are from the same author, keep it. | 272 # If the changesets are from the same author, keep it. |
285 | 285 |
286 def message(ui, repo, ctx, ha, opts): | 286 def message(ui, repo, ctx, ha, opts): |
287 oldctx = repo[ha] | 287 oldctx = repo[ha] |
288 hg.update(repo, ctx.node()) | 288 hg.update(repo, ctx.node()) |
289 try: | 289 try: |
290 files = foldchanges(ui, repo, oldctx.p1().node() , ha, opts) | 290 foldchanges(ui, repo, oldctx.p1().node() , ha, opts) |
291 except Exception: | 291 except Exception: |
292 raise util.Abort(_('Fix up the change and run ' | 292 raise util.Abort(_('Fix up the change and run ' |
293 'hg histedit --continue')) | 293 'hg histedit --continue')) |
294 message = oldctx.description() + '\n' | 294 message = oldctx.description() + '\n' |
295 message = ui.edit(message, ui.username()) | 295 message = ui.edit(message, ui.username()) |