Mercurial > hg
comparison mercurial/localrepo.py @ 20332:a959f7167077 stable
clone: do not turn hidden changeset public on publishing clone (issue3935)
Before this changeset local clone of a repo with hidden changeset would include
then in the clone (why not) and turn them public (plain wrong). This happened
because the copy clone publish by dropping the phaseroot file entirely making
everything in the repo public (and therefore immune to obsolescence marker).
This changeset takes the simplest fix, we deny the copy clone in the case of hidden
changeset falling back to pull clone that will exclude them from the clone and
therefore not turning them public.
A smarter version of copy clone could be done, but I prefer to go for the
simplest solution first.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Thu, 30 Jan 2014 11:52:38 -0800 |
parents | b396032e1bb8 |
children | 8567b4ea76ac f042d4b263f4 |
comparison
equal
deleted
inserted
replaced
20331:1d155582a8ea | 20332:a959f7167077 |
---|---|
690 | 690 |
691 def local(self): | 691 def local(self): |
692 return self | 692 return self |
693 | 693 |
694 def cancopy(self): | 694 def cancopy(self): |
695 return self.local() # so statichttprepo's override of local() works | 695 # so statichttprepo's override of local() works |
696 if not self.local(): | |
697 return False | |
698 if not self.ui.configbool('phases', 'publish', True): | |
699 return True | |
700 # if publishing we can't copy if there is filtered content | |
701 return not self.filtered('visible').changelog.filteredrevs | |
696 | 702 |
697 def join(self, f): | 703 def join(self, f): |
698 return os.path.join(self.path, f) | 704 return os.path.join(self.path, f) |
699 | 705 |
700 def wjoin(self, f): | 706 def wjoin(self, f): |