comparison 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
comparison
equal deleted inserted replaced
23631:b8260abfeb7d 23632:e7fcf58acd71
240 self.bundle = exchange.readbundle(ui, f, bundlename, self.vfs) 240 self.bundle = exchange.readbundle(ui, f, bundlename, self.vfs)
241 241
242 # dict with the mapping 'filename' -> position in the bundle 242 # dict with the mapping 'filename' -> position in the bundle
243 self.bundlefilespos = {} 243 self.bundlefilespos = {}
244 244
245 self.firstnewrev = self.changelog.repotiprev + 1
246 phases.retractboundary(self, None, phases.draft,
247 [ctx.node() for ctx in self[self.firstnewrev:]])
248
245 @localrepo.unfilteredpropertycache 249 @localrepo.unfilteredpropertycache
246 def _phasecache(self): 250 def _phasecache(self):
247 return bundlephasecache(self, self._phasedefaults) 251 return bundlephasecache(self, self._phasedefaults)
248 252
249 @localrepo.unfilteredpropertycache 253 @localrepo.unfilteredpropertycache