Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/merge.py @ 38003:000039f6ca2d
merge: drop support for using updateresults as tuples (API)
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 11 May 2018 00:54:37 -0400 |
parents | 7269b87f817c |
children | 8f37b5fc5abf |
comparison
equal
deleted
inserted
replaced
38002:14f4449711b8 | 38003:000039f6ca2d |
---|---|
1488 | 1488 |
1489 def isempty(self): | 1489 def isempty(self): |
1490 return (not self.updatedcount and not self.mergedcount | 1490 return (not self.updatedcount and not self.mergedcount |
1491 and not self.removedcount and not self.unresolvedcount) | 1491 and not self.removedcount and not self.unresolvedcount) |
1492 | 1492 |
1493 # TODO remove container emulation once consumers switch to new API. | |
1494 | |
1495 def __getitem__(self, x): | |
1496 util.nouideprecwarn('access merge.update() results by name instead of ' | |
1497 'index', '4.6', 2) | |
1498 if x == 0: | |
1499 return self.updatedcount | |
1500 elif x == 1: | |
1501 return self.mergedcount | |
1502 elif x == 2: | |
1503 return self.removedcount | |
1504 elif x == 3: | |
1505 return self.unresolvedcount | |
1506 else: | |
1507 raise IndexError('can only access items 0-3') | |
1508 | |
1509 def __len__(self): | |
1510 util.nouideprecwarn('access merge.update() results by name instead of ' | |
1511 'index', '4.6', 2) | |
1512 return 4 | |
1513 | |
1514 def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None): | 1493 def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None): |
1515 """apply the merge action list to the working directory | 1494 """apply the merge action list to the working directory |
1516 | 1495 |
1517 wctx is the working copy context | 1496 wctx is the working copy context |
1518 mctx is the context to be merged into the working copy | 1497 mctx is the context to be merged into the working copy |