equal
deleted
inserted
replaced
1481 updatedcount = attr.ib() |
1481 updatedcount = attr.ib() |
1482 mergedcount = attr.ib() |
1482 mergedcount = attr.ib() |
1483 removedcount = attr.ib() |
1483 removedcount = attr.ib() |
1484 unresolvedcount = attr.ib() |
1484 unresolvedcount = attr.ib() |
1485 |
1485 |
|
1486 def isempty(self): |
|
1487 return (not self.updatedcount and not self.mergedcount |
|
1488 and not self.removedcount and not self.unresolvedcount) |
|
1489 |
1486 # TODO remove container emulation once consumers switch to new API. |
1490 # TODO remove container emulation once consumers switch to new API. |
1487 |
1491 |
1488 def __getitem__(self, x): |
1492 def __getitem__(self, x): |
|
1493 util.nouideprecwarn('access merge.update() results by name instead of ' |
|
1494 'index', '4.6', 2) |
1489 if x == 0: |
1495 if x == 0: |
1490 return self.updatedcount |
1496 return self.updatedcount |
1491 elif x == 1: |
1497 elif x == 1: |
1492 return self.mergedcount |
1498 return self.mergedcount |
1493 elif x == 2: |
1499 elif x == 2: |
1496 return self.unresolvedcount |
1502 return self.unresolvedcount |
1497 else: |
1503 else: |
1498 raise IndexError('can only access items 0-3') |
1504 raise IndexError('can only access items 0-3') |
1499 |
1505 |
1500 def __len__(self): |
1506 def __len__(self): |
|
1507 util.nouideprecwarn('access merge.update() results by name instead of ' |
|
1508 'index', '4.6', 2) |
1501 return 4 |
1509 return 4 |
1502 |
1510 |
1503 def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None): |
1511 def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None): |
1504 """apply the merge action list to the working directory |
1512 """apply the merge action list to the working directory |
1505 |
1513 |
2162 # (ex: this happens during hg rebase --abort). |
2170 # (ex: this happens during hg rebase --abort). |
2163 if not branchmerge: |
2171 if not branchmerge: |
2164 sparse.prunetemporaryincludes(repo) |
2172 sparse.prunetemporaryincludes(repo) |
2165 |
2173 |
2166 if not partial: |
2174 if not partial: |
2167 repo.hook('update', parent1=xp1, parent2=xp2, error=stats[3]) |
2175 repo.hook('update', parent1=xp1, parent2=xp2, |
|
2176 error=stats.unresolvedcount) |
2168 return stats |
2177 return stats |
2169 |
2178 |
2170 def graft(repo, ctx, pctx, labels, keepparent=False): |
2179 def graft(repo, ctx, pctx, labels, keepparent=False): |
2171 """Do a graft-like merge. |
2180 """Do a graft-like merge. |
2172 |
2181 |