Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/subrepo.py @ 44454:2f290136b7d6
merge: make hg.merge() take a context instead of a node
Many callers already have a repo, so we might as well pass
that. `merge.update()` will look up the context object later. This
patch is part of making it so we pass around the context object all
the way down instead.
I also removed the `repo` argument since it can be retrieved from the
context.
Differential Revision: https://phab.mercurial-scm.org/D7999
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 24 Jan 2020 15:28:37 -0800 |
parents | a61287a95dc3 |
children | 3b7aabd02e11 |
comparison
equal
deleted
inserted
replaced
44453:f82d2d4e71db | 44454:2f290136b7d6 |
---|---|
804 ) | 804 ) |
805 else: | 805 else: |
806 self.ui.debug( | 806 self.ui.debug( |
807 b'merging subrepository "%s"\n' % subrelpath(self) | 807 b'merging subrepository "%s"\n' % subrelpath(self) |
808 ) | 808 ) |
809 hg.merge(self._repo, state[1], remind=False) | 809 hg.merge(dst, remind=False) |
810 | 810 |
811 wctx = self._repo[None] | 811 wctx = self._repo[None] |
812 if self.dirty(): | 812 if self.dirty(): |
813 if anc != dst: | 813 if anc != dst: |
814 if _updateprompt(self.ui, self, wctx.dirty(), cur, dst): | 814 if _updateprompt(self.ui, self, wctx.dirty(), cur, dst): |