##// END OF EJS Templates
mq: make qrefresh/qfold keep wlock until saving patch status...
Yuya Nishihara -
r14620:2b9c3292 default
parent child Browse files
Show More
@@ -2275,9 +2275,13 b' def refresh(ui, repo, *pats, **opts):'
2275 # We don't want to lose the patch message if qrefresh fails (issue2062)
2275 # We don't want to lose the patch message if qrefresh fails (issue2062)
2276 repo.savecommitmessage(message)
2276 repo.savecommitmessage(message)
2277 setupheaderopts(ui, opts)
2277 setupheaderopts(ui, opts)
2278 wlock = repo.wlock()
2279 try:
2278 ret = q.refresh(repo, pats, msg=message, **opts)
2280 ret = q.refresh(repo, pats, msg=message, **opts)
2279 q.savedirty()
2281 q.savedirty()
2280 return ret
2282 return ret
2283 finally:
2284 wlock.release()
2281
2285
2282 @command("^qdiff",
2286 @command("^qdiff",
2283 commands.diffopts + commands.diffopts2 + commands.walkopts,
2287 commands.diffopts + commands.diffopts2 + commands.walkopts,
@@ -2366,9 +2370,13 b' def fold(ui, repo, *files, **opts):'
2366 message = ui.edit(message, user or ui.username())
2370 message = ui.edit(message, user or ui.username())
2367
2371
2368 diffopts = q.patchopts(q.diffopts(), *patches)
2372 diffopts = q.patchopts(q.diffopts(), *patches)
2373 wlock = repo.wlock()
2374 try:
2369 q.refresh(repo, msg=message, git=diffopts.git)
2375 q.refresh(repo, msg=message, git=diffopts.git)
2370 q.delete(repo, patches, opts)
2376 q.delete(repo, patches, opts)
2371 q.savedirty()
2377 q.savedirty()
2378 finally:
2379 wlock.release()
2372
2380
2373 @command("qgoto",
2381 @command("qgoto",
2374 [('f', 'force', None, _('overwrite any local changes'))],
2382 [('f', 'force', None, _('overwrite any local changes'))],
General Comments 0
You need to be logged in to leave comments. Login now