##// END OF EJS Templates
strip: make query to get new bookmark target cheaper...
Siddharth Agarwal -
r18040:fe8caf28 default
parent child Browse files
Show More
@@ -112,8 +112,10 b' def strip(ui, repo, nodelist, backup="al'
112 112 saverevs.difference_update(descendants)
113 113 savebases = [cl.node(r) for r in saverevs]
114 114 stripbases = [cl.node(r) for r in tostrip]
115 newbmtarget = repo.revs('sort(heads((::%ld) - (%ld)), -rev)',
116 tostrip, tostrip)
115
116 # For a set s, max(parents(s) - s) is the same as max(heads(::s - s)), but
117 # is much faster
118 newbmtarget = repo.revs('max(parents(%ld) - (%ld))', tostrip, tostrip)
117 119 if newbmtarget:
118 120 newbmtarget = repo[newbmtarget[0]].node()
119 121 else:
General Comments 0
You need to be logged in to leave comments. Login now