Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHGd25eb277e925: mq: replace `drop` call with newer API
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
Alphare |
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | hgext/mq.py (6 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
868c5dca2d49 | 195576db5bc1 | Pierre-Yves David | Jul 18 2021, 4:32 PM |
tobackup = set(a + m + r) & tobackup | tobackup = set(a + m + r) & tobackup | ||||
if keepchanges and tobackup: | if keepchanges and tobackup: | ||||
raise error.Abort(_(b"local changes found, qrefresh first")) | raise error.Abort(_(b"local changes found, qrefresh first")) | ||||
self.backup(repo, tobackup) | self.backup(repo, tobackup) | ||||
with repo.dirstate.parentchange(): | with repo.dirstate.parentchange(): | ||||
for f in a: | for f in a: | ||||
repo.wvfs.unlinkpath(f, ignoremissing=True) | repo.wvfs.unlinkpath(f, ignoremissing=True) | ||||
repo.dirstate.drop(f) | repo.dirstate.update_file( | ||||
f, p1_tracked=False, wc_tracked=False | |||||
) | |||||
for f in m + r: | for f in m + r: | ||||
fctx = ctx[f] | fctx = ctx[f] | ||||
repo.wwrite(f, fctx.data(), fctx.flags()) | repo.wwrite(f, fctx.data(), fctx.flags()) | ||||
repo.dirstate.update_file( | repo.dirstate.update_file( | ||||
f, p1_tracked=True, wc_tracked=True | f, p1_tracked=True, wc_tracked=True | ||||
) | ) | ||||
repo.setparents(qp, repo.nullid) | repo.setparents(qp, repo.nullid) | ||||
for patch in reversed(self.applied[start:end]): | for patch in reversed(self.applied[start:end]): | ||||
if not match1(m[i]): | if not match1(m[i]): | ||||
mm.append(m[i]) | mm.append(m[i]) | ||||
del m[i] | del m[i] | ||||
for f in m: | for f in m: | ||||
repo.dirstate.update_file_p1(f, p1_tracked=True) | repo.dirstate.update_file_p1(f, p1_tracked=True) | ||||
for f in mm: | for f in mm: | ||||
repo.dirstate.update_file_p1(f, p1_tracked=True) | repo.dirstate.update_file_p1(f, p1_tracked=True) | ||||
for f in forget: | for f in forget: | ||||
repo.dirstate.drop(f) | repo.dirstate.update_file_p1(f, p1_tracked=False) | ||||
user = ph.user or ctx.user() | user = ph.user or ctx.user() | ||||
oldphase = repo[top].phase() | oldphase = repo[top].phase() | ||||
# assumes strip can roll itself back if interrupted | # assumes strip can roll itself back if interrupted | ||||
repo.setparents(*cparents) | repo.setparents(*cparents) | ||||
self.applied.pop() | self.applied.pop() |