Skip to content
Snippets Groups Projects
Commit c7217f14 authored by Katsunori FUJIWARA's avatar Katsunori FUJIWARA
Browse files

commands: make backout acquire locks before processing

Before this patch, "hg backout" executes below before acquisition of
wlock.

  - cmdutil.checkunfinished()
  - cmdutil.bailifchanged()
  - repo.dirstate.parents()

It may cause unintentional result, if another command runs parallelly
(see also issue4368).

In addition to it, "hg backout" refers changelog for purposes below
without acquisition of store lock (slock), and it may cause
unintentional result, if store is updated parallelly.

  - show and update to the revision by 'repo.changelog.tip()'

  - examine for "created new head" by 'repo.branchheads()' and
    'cmdutil.commitstatus()'

To avoid this issue, this patch makes "hg backout" acquire wlock and
slock before processing.
parent a01d3d32
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment