Mercurial > hg
comparison hgext/transplant.py @ 45557:2c86b9587740
merge: make low-level update() private (API)
We have very few callers left that call the low-level `merge.update()`
function. I think it's time to make it private. I'll remove the
remaining callers in coming patches, except for one call from the
`rebase` module. I hope to eventually fix that too, but it's more
complex because it requires teaching `merge.graft()` to work with a
dirty working copy.
Differential Revision: https://phab.mercurial-scm.org/D9065
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 21 Sep 2020 11:12:58 -0700 |
parents | 03726f5b6092 |
children | c1b603cdc95a |
comparison
equal
deleted
inserted
replaced
45556:03726f5b6092 | 45557:2c86b9587740 |
---|---|
196 p1 = node | 196 p1 = node |
197 continue | 197 continue |
198 if pulls: | 198 if pulls: |
199 if source != repo: | 199 if source != repo: |
200 exchange.pull(repo, source.peer(), heads=pulls) | 200 exchange.pull(repo, source.peer(), heads=pulls) |
201 merge.update( | 201 merge._update( |
202 repo, pulls[-1], branchmerge=False, force=False | 202 repo, pulls[-1], branchmerge=False, force=False |
203 ) | 203 ) |
204 p1 = repo.dirstate.p1() | 204 p1 = repo.dirstate.p1() |
205 pulls = [] | 205 pulls = [] |
206 | 206 |
273 if patchfile: | 273 if patchfile: |
274 os.unlink(patchfile) | 274 os.unlink(patchfile) |
275 tr.close() | 275 tr.close() |
276 if pulls: | 276 if pulls: |
277 exchange.pull(repo, source.peer(), heads=pulls) | 277 exchange.pull(repo, source.peer(), heads=pulls) |
278 merge.update(repo, pulls[-1], branchmerge=False, force=False) | 278 merge._update(repo, pulls[-1], branchmerge=False, force=False) |
279 finally: | 279 finally: |
280 self.saveseries(revmap, merges) | 280 self.saveseries(revmap, merges) |
281 self.transplants.write() | 281 self.transplants.write() |
282 if tr: | 282 if tr: |
283 tr.release() | 283 tr.release() |