Show More
@@ -257,11 +257,11 b' def validdest(repo, old, new):' | |||||
257 | """Is the new bookmark destination a valid update from the old one""" |
|
257 | """Is the new bookmark destination a valid update from the old one""" | |
258 | if old == new: |
|
258 | if old == new: | |
259 | # Old == new -> nothing to update. |
|
259 | # Old == new -> nothing to update. | |
260 | validdests = () |
|
260 | return False | |
261 | elif not old: |
|
261 | elif not old: | |
262 | # old is nullrev, anything is valid. |
|
262 | # old is nullrev, anything is valid. | |
263 | # (new != nullrev has been excluded by the previous check) |
|
263 | # (new != nullrev has been excluded by the previous check) | |
264 | validdests = (new,) |
|
264 | return True | |
265 | elif repo.obsstore: |
|
265 | elif repo.obsstore: | |
266 | # We only need this complicated logic if there is obsolescence |
|
266 | # We only need this complicated logic if there is obsolescence | |
267 | # XXX will probably deserve an optimised rset. |
|
267 | # XXX will probably deserve an optimised rset. | |
@@ -279,6 +279,6 b' def validdest(repo, old, new):' | |||||
279 | c.node())) |
|
279 | c.node())) | |
280 | validdests = set(repo.set('%ln::', succs)) |
|
280 | validdests = set(repo.set('%ln::', succs)) | |
281 | validdests.remove(old) |
|
281 | validdests.remove(old) | |
|
282 | return new in validdests | |||
282 | else: |
|
283 | else: | |
283 |
|
|
284 | return new in old.descendants() | |
284 | return new in validdests |
|
General Comments 0
You need to be logged in to leave comments.
Login now