equal
deleted
inserted
replaced
5 # This software may be used and distributed according to the terms of the |
5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. |
6 # GNU General Public License version 2 or any later version. |
7 |
7 |
8 from mercurial.i18n import _ |
8 from mercurial.i18n import _ |
9 from mercurial.node import hex |
9 from mercurial.node import hex |
10 from mercurial import encoding, error, util, obsolete, phases |
10 from mercurial import encoding, error, util, obsolete |
11 import errno, os |
11 import errno, os |
12 |
12 |
13 def read(repo): |
13 def read(repo): |
14 '''Parse .hg/bookmarks file and return a dictionary |
14 '''Parse .hg/bookmarks file and return a dictionary |
15 |
15 |
262 # compute the whole set of successors or descendants |
262 # compute the whole set of successors or descendants |
263 while len(validdests) != plen: |
263 while len(validdests) != plen: |
264 plen = len(validdests) |
264 plen = len(validdests) |
265 succs = set(c.node() for c in validdests) |
265 succs = set(c.node() for c in validdests) |
266 for c in validdests: |
266 for c in validdests: |
267 if c.phase() > phases.public: |
267 if c.mutable(): |
268 # obsolescence marker does not apply to public changeset |
268 # obsolescence marker does not apply to public changeset |
269 succs.update(obsolete.allsuccessors(repo.obsstore, |
269 succs.update(obsolete.allsuccessors(repo.obsstore, |
270 [c.node()])) |
270 [c.node()])) |
271 known = (n for n in succs if n in nm) |
271 known = (n for n in succs if n in nm) |
272 validdests = set(repo.set('%ln::', known)) |
272 validdests = set(repo.set('%ln::', known)) |