1.

Solve : msdos batch file to build projects using subversion svn tool?

Answer»

this is a sample that i have come up with..!

[attachment deleted by admin]another doubt:
how do you transcend through different subfolders and compare them to see whats different between the two,and to overwrite it if any difference appears?it says this but i don understand how its supposed to be checked out,its says its a file so i cant check it out


...



SVN command line executable is not available in C:\SVN\bin. To get it,
checkout and unzip as C:\SVN the following file

http://mo.syst.internal/svn/main/Tools/SVN/svn-win32.zip

You may have to manually upgrade this zip if it is not up-to-date
with your checkout tool, eg: recent Tortoise SVN

Add C:\SVN\bin to your system PATH environment variable if you want
to use SVN command line outside of ECHO project environment.



Quote from: helpcindy on July 28, 2009, 05:42:37 PM

another doubt:
how do you transcend through different subfolders and compare them to see whats different between the two,and to overwrite it if any difference appears?
Hi
I dont know! I would expect the subversion tool to be able to identify changed files; in tortoise, you can compare 2 branches (or branch and trunk) - is this possible in the command-line version ?

With respect to you next post, Im not sure what this means; in your batch, try adding the line

Path %Path%;C:\SVN\bin

NEAR the top to make the tool available anywhere while in your session

You dont need to check out this file, locate it using Tortoise and copy (or is it export ?) it to the file system, then unzip it to c:\svn\bin

Your batch file looks like a great start, where you have expressions like [PATH_ServerCopy], do you mean that this is a literal folder, or is it supposed to be a variable ? if a variable, it should be enclosed by % symbols, thus
%PATH_ServerCopy%

GrahamThank u so much for your continuous help and response! I Deeply appreciate it!

with respect to the subfolders comparison,i still havent figured out how to go about it,as you might have seen i have just included a xcopy command for the directory names without specifying any subfolders

with respect to the svn command line executable error that popped up,i cleard it.I did not have svn bin installed on my system so i downloaded that from my server.

by [PATH_ServerCopy], i give the path of the respective folder.

i do have a doubt though,im not exactly sure about the build command.Is it alright to just type build.When i use command line i just need to enter build,but im not too sure if i can just include it by itself in the batch file.

Thank you once again!According to an online guide:

Viewing the differences between files: svn diff

You can use svn diff to display local modifications in a specified file in your working copy against the one in the repository. In the command prompt, type:

svn diff (PATH of the file) (URL of the project's repository)
For EXAMPLE, to compare a locally modified file "index.html" against the one in the project's repository, type:

svn diff $SRC/...../index.html https://(projectname).(domain)/svn/(projectname)/trunk (projectname) --username [type-user-name-here]
Alternatively, you can go to the directory where the file belongs and type:

svn diff (FILENAME)

but im not sure if this is what i require.i just need the control to transcend through the same folders and if a folder is missing in the working copy to copy it there from the server copy.I dont know about your build command, I suspect it is a procedure on your system to call all the commands to build your system ... if its a batch file, you will need to do
call build
to ensure that your batch file gets returned to afterwards (if you just did build, it would go away and do the build but NEVER come back)

Xcopy has useful parameters, do xcopy /? to see them

or search this site for 'only copy newer files' - or similar - for an example of how to update a directory tree, sorry I didnt think about that earlier (it was 07:30 in the morning here, my brain doesnt work so well at that time)
OH MY GOD!
i think its working! yay!!!!

thank you so much!

i used the call function as you asked me to and i was SUCCESSFUL!
so now my batch file is running,just got to tweak it.Got to figure out the comparing of folders(i will look into the parameters of xcopy),and a few pieces here and there.
One thing,whenever i try to update a particular folder it always asks me to cleanup before it can update.I have not placed any locks as such on any of the folders.Any way to go around it?and i apologize for making you think so early in the morning!
I found this command

REPLACE %1\*.* %2 /A
REPLACE %1\*.* %2 /U

where /A : add files from source that do not exist at the destination
/U : overwrites file in destination directory with those from source directory only if source files are newerIm assuming REPLACE command can only be used for files.Im not sure if it can move through the directories.

I found this other line online,but i dont quite understand it


svn status | grep '^?' | awk '{ print $2; }' | xargs svn add

it apparently syncs the repository and the working copy.But im not sure where i am supposed to mention the paths etc.i tried using the svn merge tool,but the following statement is displayed
svn: A working copy merge source needs an explicit revision
I found this worked:

XCOPY %1 %2 /e /c /i /h /k

it copied files and subdirectories.


Discussion

No Comment Found