##// END OF EJS Templates
fix: don't include obsolete descendants with -s...
Martin von Zweigbergk -
r46400:7f07e634 default draft
parent child Browse files
Show More
@@ -417,7 +417,7 b' def getrevstofix(ui, repo, opts):'
417 revs = repo.revs(b'(not public() and not obsolete()) or wdir()')
417 revs = repo.revs(b'(not public() and not obsolete()) or wdir()')
418 elif opts[b'source']:
418 elif opts[b'source']:
419 source_revs = scmutil.revrange(repo, opts[b'source'])
419 source_revs = scmutil.revrange(repo, opts[b'source'])
420 revs = set(repo.revs(b'%ld::', source_revs))
420 revs = set(repo.revs(b'(%ld::) - obsolete()', source_revs))
421 if wdirrev in source_revs:
421 if wdirrev in source_revs:
422 # `wdir()::` is currently empty, so manually add wdir
422 # `wdir()::` is currently empty, so manually add wdir
423 revs.add(wdirrev)
423 revs.add(wdirrev)
@@ -390,14 +390,11 b' Test passing multiple revisions to --sou'
390 o 0 A
390 o 0 A
391
391
392 $ hg fix -s A
392 $ hg fix -s A
393 abort: fixing obsolete revision could cause divergence
394 [255]
395 $ hg fix -s B
393 $ hg fix -s B
396 abort: fixing obsolete revision could cause divergence
394 abort: no changesets specified
395 (use --source or --working-dir)
397 [255]
396 [255]
398 $ hg fix -s D
397 $ hg fix -s D
399 abort: fixing obsolete revision could cause divergence
400 [255]
401 $ hg fix -s E
398 $ hg fix -s E
402 $ cd ..
399 $ cd ..
403
400
General Comments 0
You need to be logged in to leave comments. Login now