equal
deleted
inserted
replaced
111 nullid, |
111 nullid, |
112 nullrev, |
112 nullrev, |
113 short, |
113 short, |
114 ) |
114 ) |
115 from . import ( |
115 from . import ( |
116 encoding, |
|
117 error, |
116 error, |
118 smartset, |
117 smartset, |
|
118 txnutil, |
119 ) |
119 ) |
120 |
120 |
121 allphases = public, draft, secret = range(3) |
121 allphases = public, draft, secret = range(3) |
122 trackedphases = allphases[1:] |
122 trackedphases = allphases[1:] |
123 phasenames = ['public', 'draft', 'secret'] |
123 phasenames = ['public', 'draft', 'secret'] |
135 """ |
135 """ |
136 repo = repo.unfiltered() |
136 repo = repo.unfiltered() |
137 dirty = False |
137 dirty = False |
138 roots = [set() for i in allphases] |
138 roots = [set() for i in allphases] |
139 try: |
139 try: |
140 f = None |
140 f, pending = txnutil.trypending(repo.root, repo.svfs, 'phaseroots') |
141 if 'HG_PENDING' in encoding.environ: |
|
142 try: |
|
143 f = repo.svfs('phaseroots.pending') |
|
144 except IOError as inst: |
|
145 if inst.errno != errno.ENOENT: |
|
146 raise |
|
147 if f is None: |
|
148 f = repo.svfs('phaseroots') |
|
149 try: |
141 try: |
150 for line in f: |
142 for line in f: |
151 phase, nh = line.split() |
143 phase, nh = line.split() |
152 roots[int(phase)].add(bin(nh)) |
144 roots[int(phase)].add(bin(nh)) |
153 finally: |
145 finally: |