Announcement

Collapse
No announcement yet.

Handling change in same file.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Handling change in same file.

    Hi,

    Am new to SVN,

    Am having an scenario, say like there is a branch A and branch B
    branch A is having a file which was modified by someone.Branch B is having the same file which was modified by other person.

    and now i want to identify such files that is having modified in different branches now and also in future.I want to automate it using unix script.

    Am not getting a break here.. Any pointers would be helpful.

  • #2
    svn diff branchA branchB will tell you what differs between the two branches.

    Comment


    • #3
      Hi Andyl,

      thanks for the reply .

      I agree that svn diff will do..... but that is ok for one branch ... but my requirement for automating is... there are more number of branches... say like minimum 1000 branches... it is not an easy way to go through all the branches and see with svn diff.. thats why i want some sort of script to do this.

      And also this SVN diff will give the difference of the file name alone... and i would want it to take it next level that is want to know about the differences it makes inside the file also...

      please help.
      Last edited by scott_cog; 07-13-2012, 07:50 AM.

      Comment


      • #4
        Originally posted by scott_cog View Post
        I agree that svn diff will do..... but that is ok for one branch ... but my requirement for automating is... there are more number of branches... say like minimum 1000 branches... it is not an easy way to go through all the branches and see with svn diff.. thats why i want some sort of script to do this.
        OK, so you write a script to iterate through all branches and perform the diff operation. I don't understand what you're asking for here - you already know that a script is the proper way to automate repetitive tasks. Are you asking for someone to write your whole script for you?

        Originally posted by scott_cog View Post
        And also this SVN diff will give the difference of the file name alone... and i would want it to take it next level that is want to know about the differences it makes inside the file also...
        OK, so for each file that you identify as being different, you can run svn diff <fileA> <fileB> and get the differences in unified diff format. Capture that output, and do with it whatever you need to do.

        Comment


        • #5
          Originally posted by andyl View Post
          OK, so you write a script to iterate through all branches and perform the diff operation. I don't understand what you're asking for here - you already know that a script is the proper way to automate repetitive tasks. Are you asking for someone to write your whole script for you?
          Hi Andyl,

          No am not asking for the whole script am asking for ideas... like how can we do that ... ?..... and some path to find my goal...that is fair enough for me... from that i will proceed.

          OK, so for each file that you identify as being different, you can run svn diff <fileA> <fileB> and get the differences in unified diff format. Capture that output, and do with it whatever you need to do.
          yes i tried the unified diff there is one catch here.... if you run the unified diff between trunk and a branch it will not do what you want to ... so i want some idea for making a generic one... which can identify changes in the common file irrespective of the branches.

          Comment

          Working...
          X