How to create svn diff for a new file

Help
MS
2010-08-12
2013-06-03
  • MS
    MS
    2010-08-12

    Hi,

    We use SVN for source control. I have a bunch of newly written code in
    new java files that are not yet committed in subversion. I want to
    review the code in these files , but I'm wondering
    how to create diff  for these files since they do not have a prior
    version (these are brand new files).
    SVN won't let me create a diff for these files since there is no
    version of these files in SVN. Any ideas on how I can review these newly created uncommitted files using CodeStriker?

    Thanks,
    MS

     
  • for generating diff of all new files you can use following way.
    create empty files with same name and run unix diff command between the dummy and newly added files it should show all lines of the file as added lines with + at the beginning of each line.

    hope this helps.

    thanks,
    Madhava

     
  • David Sitsky
    David Sitsky
    2010-08-12

    I could be wrong, but I thought more recent versions of subversion would include new files which have been added, but not yet committed when you run the svn diff command.

     
  • Did you do svn add for all the newly created files ? i heard from SVN expert that if svn add is done then svn diff will include these files to show diffs, you may want to try this.

    Thanks,
    Madhava