hgext/phabricator.py
changeset 44719 c482e2fe444c
parent 44718 0680b8a1992a
child 44720 601ce5392cb0
equal deleted inserted replaced
44718:0680b8a1992a 44719:c482e2fe444c
  1302     if opts.get(b'amend'):
  1302     if opts.get(b'amend'):
  1303         cmdutil.checkunfinished(repo)
  1303         cmdutil.checkunfinished(repo)
  1304 
  1304 
  1305     ctxs = [repo[rev] for rev in revs]
  1305     ctxs = [repo[rev] for rev in revs]
  1306 
  1306 
       
  1307     if any(c for c in ctxs if c.obsolete()):
       
  1308         raise error.Abort(_(b"obsolete commits cannot be posted for review"))
       
  1309 
  1307     fold = opts.get(b'fold')
  1310     fold = opts.get(b'fold')
  1308     if fold:
  1311     if fold:
  1309         if len(revs) == 1:
  1312         if len(revs) == 1:
  1310             # TODO: just switch to --no-fold instead?
  1313             # TODO: just switch to --no-fold instead?
  1311             raise error.Abort(_(b"cannot fold a single revision"))
  1314             raise error.Abort(_(b"cannot fold a single revision"))