Mercurial > hg-stable
diff mercurial/bundlerepo.py @ 23632:e7fcf58acd71
bundlerepo: retract phase boundary
This patch makes bundrepo retract the phase boundary for new commits to 'draft'
status, which is consistent with the behavior of 'hg unbundle'. The old
behavior was for commits to appear with the same phase as their nearest
ancestor in the base repository.
This affects several classes of operation:
* Inspecting a bundle with the -B flag
* Treating a bundle file as a peer (old: everything public, new: everything draft)
* Incoming command (neither old or new behavior is sensible -- fixed in next patch)
author | Eric Sumner <ericsumner@fb.com> |
---|---|
date | Thu, 18 Dec 2014 12:22:43 -0800 |
parents | b8260abfeb7d |
children | 96c3cbec006f |
line wrap: on
line diff
--- a/mercurial/bundlerepo.py Thu Dec 18 11:38:48 2014 -0800 +++ b/mercurial/bundlerepo.py Thu Dec 18 12:22:43 2014 -0800 @@ -242,6 +242,10 @@ # dict with the mapping 'filename' -> position in the bundle self.bundlefilespos = {} + self.firstnewrev = self.changelog.repotiprev + 1 + phases.retractboundary(self, None, phases.draft, + [ctx.node() for ctx in self[self.firstnewrev:]]) + @localrepo.unfilteredpropertycache def _phasecache(self): return bundlephasecache(self, self._phasedefaults)