• Visit Rebornbuddy
  • SVN Update/batch help

    Discussion in 'Honorbuddy Forum' started by cn., Jun 21, 2013.

    1. cn.

      cn. New Member

      Joined:
      Aug 15, 2011
      Messages:
      71
      Likes Received:
      0
      Trophy Points:
      0
      FOR %%A IN (
      "1"
      "2"
      "3"
      ) DO START TortoiseProc.exe /path:%%A

      executes as
      TortoiseProc.exe /path:"1"
      TortoiseProc.exe /path:"2"
      TortoiseProc.exe /path:"3"

      I need it to execute all folders at once so that only one svn window opens rather than one for each folder
       
      Last edited: Jun 21, 2013
    2. Nab

      Nab Member

      Joined:
      May 31, 2010
      Messages:
      381
      Likes Received:
      2
      Trophy Points:
      18
      Try this:
      The reasoning behind this is that instead of launching a single instance of the updater for each folder, like this
      You actually group up all the folders you want to update into one single reference, and then run a single instance of the updater, for that reference. Like this:
      The only thing you would have to replace are the file locations, obviously.
      The difference is the :CONCAT command which assembles are your update windows into one.

      http://planetozh.com/blog/?p=1032&cp=1#comment-199653

      Let us know if it works :)

      Greets,
      Nab
       
    3. cn.

      cn. New Member

      Joined:
      Aug 15, 2011
      Messages:
      71
      Likes Received:
      0
      Trophy Points:
      0
      I tried running with concat before but I always end up with
      Code:
      %project was unexpected at this time.
       
    4. Rayz

      Rayz New Member

      Joined:
      Nov 30, 2012
      Messages:
      167
      Likes Received:
      1
      Trophy Points:
      0
      Just tried it and I got "%project was unexpected at this time." as well
       
    5. woofie

      woofie Member

      Joined:
      Jun 4, 2011
      Messages:
      263
      Likes Received:
      3
      Trophy Points:
      18
      this worked

      @echo off
      SET A=""
      FOR %%A IN (
      "E:\HB Releases\HB - Bots\AutoAngler2"
      "E:\HB Releases\HB - Bots\BgBot"
      "E:\HB Releases\HB - Bots\Professionbuddy"
      "E:\HB Releases\HB - Bots\Tyrael"
      "E:\HB Releases\HB - CC\Demonic"
      "E:\HB Releases\HB - CC\Fury Unleashed"
      "E:\HB Releases\HB - CC\king-wow"
      "E:\HB Releases\HB - CC\PureRotation"
      "E:\HB Releases\HB - CC\TuanHADK"
      "E:\HB Releases\HB - CC\TuanHAHunter"
      "E:\HB Releases\HB - CC\TuanHAMonk"
      "E:\HB Releases\HB - CC\TuanHAPaladin"
      "E:\HB Releases\HB - CC\TuanHARogue"
      "E:\HB Releases\HB - CC\TuanHAShadowPriest"
      "E:\HB Releases\HB - CC\TuanHAShaman"
      "E:\HB Releases\HB - Profiles\HB - Kick's Profiles"
      "E:\HB Releases\HB - Plugins\AeonaxxCatcher"
      "E:\HB Releases\HB - Plugins\AlwaysHere"
      "E:\HB Releases\HB - Plugins\Jumpy"
      "E:\HB Releases\HB - Plugins\Gatherbro"
      "E:\HB Releases\HB - Plugins\IWantMovement"
      "E:\HB Releases\HB - Plugins\LogMeOut"
      "E:\HB Releases\HB - Plugins\MrItemRemover2"
      "E:\HB Releases\HB - Plugins\Rarekiller"
      "E:\HB Releases\HB - Plugins\TidyBags"
      "E:\HB Releases\HB - Plugins\Ultimate PVP"
      ) DO CALL :CONCAT %%A
      TortoiseProc.exe /command:update /path:"%A:"=%" /closeonend:1;
      goto :eof

      :CONCAT
      set A=%A%%1*
      goto :eof
       

      Attached Files:

    6. GIVEMEANAME

      GIVEMEANAME Active Member

      Joined:
      Dec 17, 2010
      Messages:
      1,533
      Likes Received:
      14
      Trophy Points:
      38
      ^^ thats mine
       
    7. woofie

      woofie Member

      Joined:
      Jun 4, 2011
      Messages:
      263
      Likes Received:
      3
      Trophy Points:
      18
      yea, but the CONCAT version only opens one update screen.
       
    8. GIVEMEANAME

      GIVEMEANAME Active Member

      Joined:
      Dec 17, 2010
      Messages:
      1,533
      Likes Received:
      14
      Trophy Points:
      38
      it opens them all for me -.^
       
    9. toliman

      toliman Member

      Joined:
      Jun 20, 2012
      Messages:
      625
      Likes Received:
      10
      Trophy Points:
      18
      i think there may be a 255 char limit in the concatenated version. (8192 characters apparently) , it is a lot neater, but for me it's terribly slow, even with 4 folders or 40 folders.

      also for people who have a ton of SVN's, and don't have an idea of how to make a list,
      here's a short way to get a list of folders

      Code:
      for /d /r %%f in (*) do (
      if exist %%f\.svn (
      echo "%%f" >>%userprofile%\Desktop\SVNfolders.txt
      )
      )
      
      save this as a batch file,
      run it from the folder you store your bots in, be it Documents or Downloads, Bots, C:\ or G:\,
      drag the batch file into the main folder, and it will save a list to the desktop.

      it will just look for the folders, and put them in a text file on your desktop you can paste into the above batch files.

      2nd part, if you want to add a bit of a pause, you can modify the above to do this ...

      in windows 7 or 8, you can use

      timeout /T 10 /NOBREAK

      for everyone else, there's Ping.

      Code:
      @echo off
      echo Updating Honorbuddy SVN folders
      echo ========================
      echo
      echo . Profiles
      rem
      FOR %%Profiles IN (
      ""
      "folders go here"
      ) DO START TortoiseProc.exe /command:update /path:%%Profiles /closeonend:2
      rem Adding a 7 second break to let those windows close. more than likely, you can extend this to 10 or 15 or 20, just to minimise the BLAM.
      rem
      rem you can change this if you want them to move along faster, use a number higher than 2, or just remove the ping command.
      rem
      ping -n 8 localhost >nul 2>&1
      rem
      echo .. Bots
      FOR %%Bots IN (
               " put all the bots folders with SVN in here"
      ) DO START TortoiseProc.exe /command:update /path:%%Bots /closeonend:2
      rem
      ping -n 8 localhost >nul 2>&1
      echo ... Combat Routines
      FOR %%CR IN (
               " put the list of folders with combat routines here"
      ) DO START TortoiseProc.exe /command:update /path:%%CR /closeonend:1
      rem
      ping -n 8 localhost >nul 2>&1
      echo .... Plugins
      FOR %%PLUG IN (
               " put folders for each plugin SVN here"
      ) DO START TortoiseProc.exe /command:update /path:%%PLUG /closeonend:1
      rem
      echo Done.
      exit
      
       
    10. Turnip

      Turnip New Member

      Joined:
      Feb 16, 2015
      Messages:
      195
      Likes Received:
      2
      Trophy Points:
      0
      One of the most useful batch scripts ever made. Thank you.
       
    11. Atramors

      Atramors New Member

      Joined:
      Jul 16, 2015
      Messages:
      15
      Likes Received:
      0
      Trophy Points:
      1
      Is there a way to have these print a log file? I haven't been able to get these to work.
       
    12. air

      air Member

      Joined:
      Feb 24, 2015
      Messages:
      146
      Likes Received:
      4
      Trophy Points:
      18
      lol, 2 years necro :D
       
    13. BotOperator

      BotOperator Well-Known Member

      Joined:
      Jan 17, 2012
      Messages:
      5,649
      Likes Received:
      74
      Trophy Points:
      48
    14. Turnip

      Turnip New Member

      Joined:
      Feb 16, 2015
      Messages:
      195
      Likes Received:
      2
      Trophy Points:
      0
    15. Atramors

      Atramors New Member

      Joined:
      Jul 16, 2015
      Messages:
      15
      Likes Received:
      0
      Trophy Points:
      1
      Oops. >.< My bad! XD

      Thank you, I'll take a look at this!
       
    16. Fuzzied

      Fuzzied Member

      Joined:
      Jun 5, 2013
      Messages:
      299
      Likes Received:
      0
      Trophy Points:
      16
      Hey,

      I know this is an old thread but I found it very useful as this was exactly what I was looking for!
      Something to update all my SVN folders automatically.
       

    Share This Page