@hgcommand
def release_apply(ui, repo, clname, **opts):
 c = repo[None]
 if (not releaseBranch):
  raise hg_util.Abort('no active release branches')
 if (c.branch() != releaseBranch):
  if (c.modified() or c.added() or c.removed()):
   raise hg_util.Abort('uncommitted local changes - cannot switch branches')
  err = hg_clean(repo, releaseBranch)
  if err:
   raise hg_util.Abort(err)
 try:
  err = clpatch_or_undo(ui, repo, clname, opts, mode='backport')
  if err:
   raise hg_util.Abort(err)
 except Exception as e:
  hg_clean(repo, 'default')
  raise e

@ hgcommand def release_apply ( ui , repo , clname , ** opts ) : c = repo [ None ] if ( not releaseBranch ) : raise hg_util . Abort ( 'no active release branches' ) if ( c . branch ( ) != releaseBranch ) : if ( c . modified ( ) or c . added ( ) or c . removed ( ) ) : raise hg_util . Abort ( 'uncommitted local changes - cannot switch branches' ) err = hg_clean ( repo , releaseBranch ) if err : raise hg_util . Abort ( err ) try : err = clpatch_or_undo ( ui , repo , clname , opts , mode = 'backport' ) if err : raise hg_util . Abort ( err ) except Exception as e : hg_clean ( repo , 'default' ) raise e
apply a cl to the release branch creates a new cl copying a previously committed change from the main branch to the release branch .