Skip to content
  • Katsunori FUJIWARA's avatar
    commands: make backout acquire locks before processing · c7217f1458bf
    Katsunori FUJIWARA authored
    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.
    c7217f1458bf