comparison hgext/uncommit.py @ 51762:ca7bde5dbafb

black: format the codebase with 23.3.0 The CI has moved to 23.3.0, which is the last version that supports 3.7 at runtime, so we should honor this change. # skip-blame mass-reformating only
author Rapha?l Gom?s <rgomes@octobus.net>
date Thu, 18 Jul 2024 12:36:12 +0200
parents 7f0cb9ee0534
children f4733654f144
comparison
equal deleted inserted replaced
51761:b0a4de6c14f8 51762:ca7bde5dbafb
152 """ 152 """
153 cmdutil.check_note_size(opts) 153 cmdutil.check_note_size(opts)
154 cmdutil.resolve_commit_options(ui, opts) 154 cmdutil.resolve_commit_options(ui, opts)
155 155
156 with repo.wlock(), repo.lock(): 156 with repo.wlock(), repo.lock():
157
158 st = repo.status() 157 st = repo.status()
159 m, a, r, d = st.modified, st.added, st.removed, st.deleted 158 m, a, r, d = st.modified, st.added, st.removed, st.deleted
160 isdirtypath = any(set(m + a + r + d) & set(pats)) 159 isdirtypath = any(set(m + a + r + d) & set(pats))
161 allowdirtywcopy = opts[ 160 allowdirtywcopy = opts[
162 'allow_dirty_working_copy' 161 'allow_dirty_working_copy'
262 marked as modified `hg status`) 261 marked as modified `hg status`)
263 """ 262 """
264 263
265 unfi = repo.unfiltered() 264 unfi = repo.unfiltered()
266 with repo.wlock(), repo.lock(), repo.transaction(b'unamend'): 265 with repo.wlock(), repo.lock(), repo.transaction(b'unamend'):
267
268 # identify the commit from which to unamend 266 # identify the commit from which to unamend
269 curctx = repo[b'.'] 267 curctx = repo[b'.']
270 268
271 rewriteutil.precheck(repo, [curctx.rev()], b'unamend') 269 rewriteutil.precheck(repo, [curctx.rev()], b'unamend')
272 if len(curctx.parents()) > 1: 270 if len(curctx.parents()) > 1: