Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: msdos batch file to build projects using subversion svn tool  (Read 10401 times)

0 Members and 1 Guest are viewing this topic.

helpcindy

    Topic Starter


    Rookie

    Re: msdos batch file to build projects using subversion svn tool
    « Reply #15 on: July 28, 2009, 12:31:53 AM »
    this is a sample that i have come up with..!

    [attachment deleted by admin]

    helpcindy

      Topic Starter


      Rookie

      Re: msdos batch file to build projects using subversion svn tool
      « Reply #16 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?

      helpcindy

        Topic Starter


        Rookie

        Re: msdos batch file to build projects using subversion svn tool
        « Reply #17 on: July 28, 2009, 05:53:02 PM »
        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.




        gpl



          Apprentice
        • Thanked: 27
          Re: msdos batch file to build projects using subversion svn tool
          « Reply #18 on: July 28, 2009, 07:42:48 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%

          Graham

          helpcindy

            Topic Starter


            Rookie

            Re: msdos batch file to build projects using subversion svn tool
            « Reply #19 on: July 28, 2009, 08:09:01 PM »
            Thank 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!

            helpcindy

              Topic Starter


              Rookie

              Re: msdos batch file to build projects using subversion svn tool
              « Reply #20 on: July 28, 2009, 08:56:33 PM »
              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.

              gpl



                Apprentice
              • Thanked: 27
                Re: msdos batch file to build projects using subversion svn tool
                « Reply #21 on: July 29, 2009, 06:21:37 AM »
                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)

                helpcindy

                  Topic Starter


                  Rookie

                  Re: msdos batch file to build projects using subversion svn tool
                  « Reply #22 on: July 29, 2009, 10:43:39 PM »
                  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?

                  helpcindy

                    Topic Starter


                    Rookie

                    Re: msdos batch file to build projects using subversion svn tool
                    « Reply #23 on: July 29, 2009, 10:45:13 PM »
                    and i apologize for making you think so early in the morning!
                     ;D

                    helpcindy

                      Topic Starter


                      Rookie

                      Re: msdos batch file to build projects using subversion svn tool
                      « Reply #24 on: July 29, 2009, 11:22:38 PM »
                      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 newer

                      helpcindy

                        Topic Starter


                        Rookie

                        Re: msdos batch file to build projects using subversion svn tool
                        « Reply #25 on: July 29, 2009, 11:52:20 PM »
                        Im 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.

                        helpcindy

                          Topic Starter


                          Rookie

                          Re: msdos batch file to build projects using subversion svn tool
                          « Reply #26 on: July 30, 2009, 12:45:52 AM »
                          i tried using the svn merge tool,but the following statement is displayed
                          svn: A working copy merge source needs an explicit revision

                          helpcindy

                            Topic Starter


                            Rookie

                            Re: msdos batch file to build projects using subversion svn tool
                            « Reply #27 on: July 30, 2009, 03:04:03 AM »
                            I found this worked:

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

                            it copied files and subdirectories.