Mercurial > public > mercurial-scm > hg
comparison mercurial/simplemerge.py @ 33907:1ad3085239ad
simplemerge: make context parameters non-optional
Also update the function docstring.
Differential Revision: https://phab.mercurial-scm.org/D382
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Thu, 24 Aug 2017 21:30:51 -0700 |
parents | fa6309c5761d |
children | 4074de97b512 |
comparison
equal
deleted
inserted
replaced
33906:fa6309c5761d | 33907:1ad3085239ad |
---|---|
417 if len(overrides) > 3: | 417 if len(overrides) > 3: |
418 raise error.Abort(_("can only specify three labels.")) | 418 raise error.Abort(_("can only specify three labels.")) |
419 | 419 |
420 return [name_a, name_b, name_base] | 420 return [name_a, name_b, name_base] |
421 | 421 |
422 def simplemerge(ui, localctx=None, basectx=None, otherctx=None, repo=None, | 422 def simplemerge(ui, localctx, basectx, otherctx, repo=None, **opts): |
423 **opts): | |
424 """Performs the simplemerge algorithm. | 423 """Performs the simplemerge algorithm. |
425 | 424 |
426 {local|base|other}ctx are optional. If passed, they (local/base/other) will | 425 The merged result is written into `localctx`. |
427 be read from and the merge result written to (local). You should pass | |
428 explicit labels in this mode since the default is to use the file paths. | |
429 """ | 426 """ |
430 def readctx(ctx): | 427 def readctx(ctx): |
431 if not ctx: | 428 if not ctx: |
432 return None | 429 return None |
433 # Merges were always run in the working copy before, which means | 430 # Merges were always run in the working copy before, which means |