##// END OF EJS Templates
headsummary: expose the 'discardedheads' set in the headssummary...
marmoute -
r32708:90cb4ec8 default
parent child Browse files
Show More
@@ -185,13 +185,15 b' def findcommonoutgoing(repo, other, only'
185 185 def _headssummary(pushop):
186 186 """compute a summary of branch and heads status before and after push
187 187
188 return {'branch': ([remoteheads], [newheads], [unsyncedheads])} mapping
188 return {'branch': ([remoteheads], [newheads],
189 [unsyncedheads], [discardedheads])} mapping
189 190
190 - branch: the branch name
191 - branch: the branch name,
191 192 - remoteheads: the list of remote heads known locally
192 None if the branch is new
193 - newheads: the new remote heads (known locally) with outgoing pushed
194 - unsyncedheads: the list of remote heads unknown locally.
193 None if the branch is new,
194 - newheads: the new remote heads (known locally) with outgoing pushed,
195 - unsyncedheads: the list of remote heads unknown locally,
196 - discardedheads: the list of heads made obsolete by the push.
195 197 """
196 198 repo = pushop.repo.unfiltered()
197 199 remote = pushop.remote
@@ -242,6 +244,8 b' def _headssummary(pushop):'
242 244 for l in items:
243 245 if l is not None:
244 246 l.sort()
247 headssum[branch] = items + ([],)
248
245 249 # If there are no obsstore, no post processing are needed.
246 250 if repo.obsstore:
247 251 allmissing = set(outgoing.missing)
@@ -249,10 +253,10 b' def _headssummary(pushop):'
249 253 allfuturecommon = set(c.node() for c in cctx)
250 254 allfuturecommon.update(allmissing)
251 255 for branch, heads in sorted(headssum.iteritems()):
252 remoteheads, newheads, unsyncedheads = heads
256 remoteheads, newheads, unsyncedheads, placeholder = heads
253 257 result = _postprocessobsolete(pushop, allfuturecommon, newheads)
254 newheads = sorted(result[0])
255 headssum[branch] = (remoteheads, newheads, unsyncedheads)
258 headssum[branch] = (remoteheads, sorted(result[0]), unsyncedheads,
259 sorted(result[1]))
256 260 return headssum
257 261
258 262 def _oldheadssummary(repo, remoteheads, outgoing, inc=False):
@@ -275,7 +279,7 b' def _oldheadssummary(repo, remoteheads, '
275 279 unsynced = [None]
276 280 else:
277 281 unsynced = []
278 return {None: (oldheads, newheads, unsynced)}
282 return {None: (oldheads, newheads, unsynced, [])}
279 283
280 284 def _nowarnheads(pushop):
281 285 # Compute newly pushed bookmarks. We don't warn about bookmarked heads.
@@ -346,7 +350,7 b' def checkheads(pushop):'
346 350 # error message, depending on unsynced status, is displayed.
347 351 errormsg = None
348 352 for branch, heads in sorted(headssum.iteritems()):
349 remoteheads, newheads, unsyncedheads = heads
353 remoteheads, newheads, unsyncedheads, discardedheads = heads
350 354 # add unsynced data
351 355 if remoteheads is None:
352 356 oldhs = set()
General Comments 0
You need to be logged in to leave comments. Login now