Вопрос по svn – Как мне svn добавить все неверсированные файлы в SVN?

169

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded Neutrino
Error: User Rate Limit Exceeded user151841

Ваш Ответ

18   ответов
-1

Error: User Rate Limit Exceeded

svn add . --recursive

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
3

Copy&paste

svn st | grep "^\?" | awk "{print \$2}" | xargs svn add $1
Error: User Rate Limit ExceededMinGWError: User Rate Limit ExceededCygwinError: User Rate Limit Exceeded"My server is running Windows Server 2003 so a Unix solution won't work."
Error: User Rate Limit Exceeded
2

for /f "usebackq tokens=2*" %%i in (`svn status ^| findstr /r "^\?"`) do svn add "%%i %%j"

Error: User Rate Limit Exceeded

"C:\PROJECTS\BACKUP_MGs_via_SVN\TEST-MG-10\data\destinations\Sega Mega      2"
"C:\PROJECTS\BACKUP_MGs_via_SVN\TEST-MG-10\data\destinations\One space"
"C:\PROJECTS\BACKUP_MGs_via_SVN\TEST-MG-10\data\destinations\Double  space"
"C:\PROJECTS\BACKUP_MGs_via_SVN\TEST-MG-10\data\destinations\Single"

Error: User Rate Limit Exceeded

for /f "usebackq tokens=1*" %%i in (`svn status ^| findstr /r "^\?"`) do svn add "%%j"
3

Error: User Rate Limit Exceeded

svn add * --force

Error: User Rate Limit Exceeded

0

find ./ -name "*." | xargs svn add
5

Error: User Rate Limit Exceeded

svn status /home/websites/website1 | grep -Z "^?" | sed s/^?// | sed s/[[:space:]]*// | xargs -i svn add \"{}\"

Error: User Rate Limit Exceeded

  • List all changed files.
  • Limit this list to lines with '?' at the beginning - i.e. new files.
  • Remove the '?' character at the beginning of the line.
  • Remove the spaces at the beginning of the line.
  • Pipe the filenames into xargs to run the svn add multiple times.

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededMinGWError: User Rate Limit ExceededCygwinError: User Rate Limit Exceeded"My server is running Windows Server 2003 so a Unix solution won't work."
339

svn add --force * --auto-props --parents --depth infinity -q

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded--no-ignoreError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

svn commit -m 'Adding a file'
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded*Error: User Rate Limit Exceeded
Error: User Rate Limit Exceededalias magic="svn add --force * --auto-props --parents --depth infinity -q"Error: User Rate Limit Exceededsvn help add
3

Error: User Rate Limit Exceeded

svn st | grep ? | cut -d? -f2 | xargs svn add
Error: User Rate Limit Exceededsvn status | cut -d ? -f 2 -s | xargs svn add
Error: User Rate Limit ExceededMinGWError: User Rate Limit ExceededCygwinError: User Rate Limit Exceeded"My server is running Windows Server 2003 so a Unix solution won't work."
3

I wanted to add any files or folders which are not added in my repository when I begin the commit process.

The problem with many of the answers is they will list unversioned files which should be ignored as per my ignore list in .

Tortoise Hook Script:

"start_commit_hook".
(where I checkout) working copy path = C:\Projects
command line: C:\windows\system32\cmd.exe /c C:\Tools\SVN\svnadd.bat
(X) Wait for the script to finish
(X) (Optional) Hide script while running
(X) Always execute the script

svnadd.bat

@echo off

rem Iterates each line result from the command which lists files/folders
rem     not added to source control while respecting the ignore list.
FOR /F "delims==" %%G IN ('svn status ^| findstr "^?"') DO call :DoSVNAdd "%%G"
goto end

:DoSVNAdd
set addPath=%1
rem Remove line prefix formatting from svn status command output as well as
rem    quotes from the G call (as required for long folder names). Then
rem    place quotes back around the path for the SVN add call.
set addPath="%addPath:~9,-1%"
svn add %addPath%

:end
0

for /f "tokens=1*" %e in ('svn status^|findstr "^\?"') do svn add "%f"

for /f "tokens=1*" %%e in ('svn status^|findstr "^\?"') do svn add "%%f"
1

Error: User Rate Limit Exceeded

FOR /F %F IN ('dir /s /b /a:d') DO svn add --depth=empty "%F"
FOR /F %F IN ('dir /s /b /a *.cs *.csproj *.rpt *.xsd *.resx *.ico *.sql') DO svn add "%F"

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

  • FOR: you know, the loop control.
  • /F: means take the files and directories (not sure exactly).
  • %F: its a variable; it will assume the value of each of the listed files at a time; it could have another one-character-name.
  • IN: no need to explain, right?
  • ('dir /s /b /a:d'): the DOS command that will list the directories; in my case /s is recursive, /b is to take only the full path, /a:d means only the directory; change it as you wish keeping the parenthesis and apostrophes.
  • DO: means that what comes next in the command is what will be executed for each directory
  • svn add --depth=empty: it is the desired SVN commando to be run; the depth definition means to add only the directory and not the files inside them.
  • "%F": that's how you use the variable defined earlier.

Error: User Rate Limit Exceeded

4

Error: User Rate Limit ExceededError: User Rate Limit ExceededAdd...

Error: User Rate Limit Exceeded
0

Error: User Rate Limit Exceeded

svn add * force--

Error: User Rate Limit Exceeded

svn add <directory/file name>

If your files/directories are not adding recursively. Then check this.

Recursive adding is default propertyError: User Rate Limit ExceededError: User Rate Limit Exceeded.

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededError: User Rate Limit Exceeded

Check global properties for ignoring star(*)

  • Right click in your repo in window. Select TortoiseSVN > Properties.
  • See if you don't have a property svn:global-ignores with a value of *
  • If you have property with star(*) then it will ignore recursive adding. So remove this property.

Check global ignore pattern for ignoring star(*)

  • Right click in your repo in window. Select TortoiseSVN > Settings > General.
  • See in Global Ignore Pattern, if you don't have set star(*) there.
  • If you found star(*), remove this property.

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

You can check the log to see who committed that property change, find out what they were actually trying to do, and ask them to be more careful in future. :)

36

Error: User Rate Limit Exceeded

c:\work\repo1>svn add . --force

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceededstuff\svn_rootError: User Rate Limit Exceededstuff\svn_root\already_in_svn\not_in_svn.txtError: User Rate Limit Exceeded
Error: User Rate Limit Exceeded.\*Error: User Rate Limit Exceededstuff\svn_root\*.
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
31

Error: User Rate Limit Exceeded

svn add `svn status . | grep "^?" | awk '{print $2}'`

(Error: User Rate Limit Exceeded)

Error: User Rate Limit Exceeded

NoteError: User Rate Limit Exceeded

 svn add `svn status . | awk '/^[?]/{print $2}'`
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceededawk '/^[?]/{print $2}'Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
2

Error: User Rate Limit Exceeded

svn status| grep ^? | while read line ; do  svn add "`echo $line|cut --complement -c 1,2`" ;done
Error: User Rate Limit ExceededMinGWError: User Rate Limit ExceededCygwinError: User Rate Limit Exceeded"My server is running Windows Server 2003 so a Unix solution won't work."
Error: User Rate Limit Exceeded
3

svn add --force .

67

svn status | grep '?' | sed 's/^.* /svn add /' | bash
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceededmeta.stackexchange.com/questions/1775/…
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded

Похожие вопросы