Mercurial > hg
comparison hgext/fetch.py @ 44434: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 | 8ff1ecfadcd1 |
children | 89a2afe31e82 |
comparison
equal
deleted
inserted
replaced
44433:f82d2d4e71db | 44434:2f290136b7d6 |
---|---|
169 ui.status( | 169 ui.status( |
170 _(b'updating to %d:%s\n') | 170 _(b'updating to %d:%s\n') |
171 % (repo.changelog.rev(firstparent), short(firstparent)) | 171 % (repo.changelog.rev(firstparent), short(firstparent)) |
172 ) | 172 ) |
173 hg.clean(repo, firstparent) | 173 hg.clean(repo, firstparent) |
174 p2ctx = repo[secondparent] | |
174 ui.status( | 175 ui.status( |
175 _(b'merging with %d:%s\n') | 176 _(b'merging with %d:%s\n') % (p2ctx.rev(), short(secondparent)) |
176 % (repo.changelog.rev(secondparent), short(secondparent)) | |
177 ) | 177 ) |
178 err = hg.merge(repo, secondparent, remind=False) | 178 err = hg.merge(p2ctx, remind=False) |
179 | 179 |
180 if not err: | 180 if not err: |
181 # we don't translate commit messages | 181 # we don't translate commit messages |
182 message = cmdutil.logmessage(ui, opts) or ( | 182 message = cmdutil.logmessage(ui, opts) or ( |
183 b'Automated merge with %s' % util.removeauth(other.url()) | 183 b'Automated merge with %s' % util.removeauth(other.url()) |