Subversion update does not recursively overwrite and overwrite files

Please let me know what commands should be used to update the repository non-recursively and above writing changed files using the command line

Above the entry means that there are some changes in the local AssemmblyInfo.vb / cs files in the build machine. Do not update this in repository when doing svn update

Thank you in advance

+2


source to share


3 answers


The following command will trigger the SVN update non-recursively:

svn update --depth = files

In general, you can find out all the parameters for a given command using:

svn help command


In the above example, replace the command to a valid command (for example, "update").

The update command will not modify or overwrite files with local changes. If there is a file with local changes and you would like to discard those local changes in favor of an updated version, you can run "svn revert" to revert local modifications and mark the file as clean.

EDIT: In my original post, I used "svn update --non-recursive"; however, as indicated, this parameter is currently deprecated.

+3


source


Use svn update

with option --depth

.

See http://svnbook.red-bean.com/en/1.5/svn.ref.svn.html#svn.ref.svn.sw

Edit:



Above the entry means that there are some changes in the local AssemmblyInfo.vb / cs files in the build machine. Do not update this in repository when doing svn update

It's not a problem. svn update

will never push changed files back to the repository (which it does commit

), it will fetch new data from the server.

Note. Your question indicates a fundamental misunderstanding of how Subversion (or any version control system) works. May I suggest reading the Subversion tutorial (or the excellent Version Control with Subversion ) that will save you a headache.

+2


source


You can check svn revert

to fix the statement changes:

revert: Restore pristine working copy file (undo most local edits).
usage: revert PATH...

  Note:  this subcommand does not require network access, and resolves
  any conflicted states.  However, it does not restore removed directories.

Valid options:
  --targets ARG            : pass contents of file ARG as additional args
  -R [--recursive]         : descend recursively, same as --depth=infinity
  --depth ARG              : limit operation by depth ARG ('empty', 'files',
                            'immediates', or 'infinity')
  -q [--quiet]             : print nothing, or only summary information
  --changelist ARG         : operate only on members of changelist ARG
                             [aliases: --cl]

      

0


source







All Articles