comparison hgext/uncommit.py @ 51700:7f0cb9ee0534

Backout accidental publication of a large range of revisions I accidentally published 25e7f9dcad0f::bd1483fd7088, this is the inverse.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 23 Jul 2024 10:02:46 +0200
parents 493034cc3265
children ca7bde5dbafb
comparison
equal deleted inserted replaced
51699:bd1483fd7088 51700:7f0cb9ee0534
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
157 st = repo.status() 158 st = repo.status()
158 m, a, r, d = st.modified, st.added, st.removed, st.deleted 159 m, a, r, d = st.modified, st.added, st.removed, st.deleted
159 isdirtypath = any(set(m + a + r + d) & set(pats)) 160 isdirtypath = any(set(m + a + r + d) & set(pats))
160 allowdirtywcopy = opts[ 161 allowdirtywcopy = opts[
161 'allow_dirty_working_copy' 162 'allow_dirty_working_copy'
261 marked as modified `hg status`) 262 marked as modified `hg status`)
262 """ 263 """
263 264
264 unfi = repo.unfiltered() 265 unfi = repo.unfiltered()
265 with repo.wlock(), repo.lock(), repo.transaction(b'unamend'): 266 with repo.wlock(), repo.lock(), repo.transaction(b'unamend'):
267
266 # identify the commit from which to unamend 268 # identify the commit from which to unamend
267 curctx = repo[b'.'] 269 curctx = repo[b'.']
268 270
269 rewriteutil.precheck(repo, [curctx.rev()], b'unamend') 271 rewriteutil.precheck(repo, [curctx.rev()], b'unamend')
270 if len(curctx.parents()) > 1: 272 if len(curctx.parents()) > 1: