mercurial/commands.py
changeset 15114 d1bbabf7d35d
parent 15113 b55129f7f039
child 15115 c84b3f42d5ae
equal deleted inserted replaced
15113:b55129f7f039 15114:d1bbabf7d35d
  4079     ] + walkopts,
  4079     ] + walkopts,
  4080     _('[OPTION]... FILE...'))
  4080     _('[OPTION]... FILE...'))
  4081 def remove(ui, repo, *pats, **opts):
  4081 def remove(ui, repo, *pats, **opts):
  4082     """remove the specified files on the next commit
  4082     """remove the specified files on the next commit
  4083 
  4083 
  4084     Schedule the indicated files for removal from the repository.
  4084     Schedule the indicated files for removal from the current branch.
  4085 
  4085 
  4086     This only removes files from the current branch, not from the
  4086     This command schedules the files to be removed at the next commit.
  4087     entire project history. -A/--after can be used to remove only
  4087     To undo a remove before that, see :hg:`revert`. To undo added
  4088     files that have already been deleted, -f/--force can be used to
  4088     files, see :hg:`forget`.
  4089     force deletion, and -Af can be used to remove files from the next
  4089 
  4090     revision without deleting them from the working directory.
  4090     .. container:: verbose
  4091 
  4091 
  4092     The following table details the behavior of remove for different
  4092       -A/--after can be used to remove only files that have already
  4093     file states (columns) and option combinations (rows). The file
  4093       been deleted, -f/--force can be used to force deletion, and -Af
  4094     states are Added [A], Clean [C], Modified [M] and Missing [!] (as
  4094       can be used to remove files from the next revision without
  4095     reported by :hg:`status`). The actions are Warn, Remove (from
  4095       deleting them from the working directory.
  4096     branch) and Delete (from disk):
  4096 
       
  4097       The following table details the behavior of remove for different
       
  4098       file states (columns) and option combinations (rows). The file
       
  4099       states are Added [A], Clean [C], Modified [M] and Missing [!]
       
  4100       (as reported by :hg:`status`). The actions are Warn, Remove
       
  4101       (from branch) and Delete (from disk):
  4097 
  4102 
  4098       ======= == == == ==
  4103       ======= == == == ==
  4099               A  C  M  !
  4104               A  C  M  !
  4100       ======= == == == ==
  4105       ======= == == == ==
  4101       none    W  RD W  R
  4106       none    W  RD W  R
  4102       -f      R  RD RD R
  4107       -f      R  RD RD R
  4103       -A      W  W  W  R
  4108       -A      W  W  W  R
  4104       -Af     R  R  R  R
  4109       -Af     R  R  R  R
  4105       ======= == == == ==
  4110       ======= == == == ==
  4106 
  4111 
  4107     Note that remove never deletes files in Added [A] state from the
  4112       Note that remove never deletes files in Added [A] state from the
  4108     working directory, not even if option --force is specified.
  4113       working directory, not even if option --force is specified.
  4109 
       
  4110     This command schedules the files to be removed at the next commit.
       
  4111     To undo a remove before that, see :hg:`revert`.
       
  4112 
  4114 
  4113     Returns 0 on success, 1 if any warnings encountered.
  4115     Returns 0 on success, 1 if any warnings encountered.
  4114     """
  4116     """
  4115 
  4117 
  4116     ret = 0
  4118     ret = 0