equal
deleted
inserted
replaced
2056 def reportphasechanges(repo, tr): |
2056 def reportphasechanges(repo, tr): |
2057 """Report statistics of phase changes for changesets pre-existing |
2057 """Report statistics of phase changes for changesets pre-existing |
2058 pull/unbundle. |
2058 pull/unbundle. |
2059 """ |
2059 """ |
2060 origrepolen = tr.changes.get(b'origrepolen', len(repo)) |
2060 origrepolen = tr.changes.get(b'origrepolen', len(repo)) |
2061 phasetracking = tr.changes.get(b'phases', {}) |
2061 published = [] |
2062 if not phasetracking: |
2062 for revs, (old, new) in tr.changes.get(b'phases', []): |
2063 return |
2063 if new != phases.public: |
2064 published = [ |
2064 continue |
2065 rev |
2065 published.extend(rev for rev in revs if rev < origrepolen) |
2066 for rev, (old, new) in pycompat.iteritems(phasetracking) |
|
2067 if new == phases.public and rev < origrepolen |
|
2068 ] |
|
2069 if not published: |
2066 if not published: |
2070 return |
2067 return |
2071 msg = _(b'%d local changesets published\n') |
2068 msg = _(b'%d local changesets published\n') |
2072 if as_validator: |
2069 if as_validator: |
2073 msg = _(b'%d local changesets will be published\n') |
2070 msg = _(b'%d local changesets will be published\n') |