Mercurial > hg
comparison mercurial/hg.py @ 1040:35e883d1ff9b
Show number of new heads when doing a pull
author | mpm@selenic.com |
---|---|
date | Wed, 24 Aug 2005 18:42:42 -0700 |
parents | a9cca981c423 |
children | 6d5a62a549fa |
comparison
equal
deleted
inserted
replaced
1039:4296754ba7b4 | 1040:35e883d1ff9b |
---|---|
1567 if not source: return | 1567 if not source: return |
1568 changesets = files = revisions = 0 | 1568 changesets = files = revisions = 0 |
1569 | 1569 |
1570 tr = self.transaction() | 1570 tr = self.transaction() |
1571 | 1571 |
1572 oldheads = len(self.changelog.heads()) | |
1573 | |
1572 # pull off the changeset group | 1574 # pull off the changeset group |
1573 self.ui.status("adding changesets\n") | 1575 self.ui.status("adding changesets\n") |
1574 co = self.changelog.tip() | 1576 co = self.changelog.tip() |
1575 cn = self.changelog.addgroup(getgroup(), csmap, tr, 1) # unique | 1577 cn = self.changelog.addgroup(getgroup(), csmap, tr, 1) # unique |
1576 changesets = self.changelog.rev(cn) - self.changelog.rev(co) | 1578 changesets = self.changelog.rev(cn) - self.changelog.rev(co) |
1590 o = fl.count() | 1592 o = fl.count() |
1591 n = fl.addgroup(getgroup(), revmap, tr) | 1593 n = fl.addgroup(getgroup(), revmap, tr) |
1592 revisions += fl.count() - o | 1594 revisions += fl.count() - o |
1593 files += 1 | 1595 files += 1 |
1594 | 1596 |
1597 newheads = len(self.changelog.heads()) | |
1598 heads = "" | |
1599 if oldheads and newheads > oldheads: | |
1600 heads = " (+%d heads)" % (newheads - oldheads) | |
1601 | |
1595 self.ui.status(("added %d changesets" + | 1602 self.ui.status(("added %d changesets" + |
1596 " with %d changes to %d files\n") | 1603 " with %d changes to %d files%s\n") |
1597 % (changesets, revisions, files)) | 1604 % (changesets, revisions, files, heads)) |
1598 | 1605 |
1599 tr.close() | 1606 tr.close() |
1600 | 1607 |
1601 if not self.hook("changegroup"): | 1608 if not self.hook("changegroup"): |
1602 return 1 | 1609 return 1 |