Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7942993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:08:30+00:00 2026-06-04T00:08:30+00:00

I typically work on large chunks of code on a project, and from time

  • 0

I typically work on large chunks of code on a project, and from time to time have to back up my data to patches:

svn diff > /backups/assignment-XX_diff-YY.patch

I then revert-and-update my local working copy:

svn revert -R . && svn up

I then go to work on my other assignment, and when it is committed, I clean up and revert locally, then re-apply my patch from the work I was doing earlier:

svn revert -R .
svn up
patch -p0 < /backups/assignment-XX_diff-YY.patch

One thing I have noticed is that when I have created a new file, then add the file, e.g.:

touch newFile.cpp
svn add newFile.cpp

Newly added files and their contents are in the patch I create, and the files are recreated when I apply the patch, but the “added” status is not automatically set when I apply the patch. This has resulted in my applying a patch that is ready to commit, but only the “modified” files get committed, not the “added” files. Also, the “new” files, if they were already present, now have the entire patch appended to the EOF, breaking them.

So, in summary: Is it possible to have patch automatically issue the svn add command on new/added files when it applies a patch to my local working copy?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T00:08:31+00:00Added an answer on June 4, 2026 at 12:08 am

    Yes, it is possible with svn 1.7 new command svn patch.

    Run svn patch /backups/assignment-XX_diff-YY.patch instead of patch -p0 < /backups/assignment-XX_diff-YY.patch. From Apache Subversion 1.7 Release Notes:

    svn patch will apply unidiff changes to existing files just like third
    party patch tools. It will also add newly created files to version
    control, and delete files and directories which are left empty after
    patching.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been playing at work with some very very large sets of data,
I am looking for an efficient indexed persistent data structure. I typically work in
I work on a large C# application (approximately 450,000 lines of code), we constantly
We get a large amount of data from our clients in pdf files in
I have a large collection of data in an excel file (and csv files).
Suppose I am processing a large amount of incoming data from multiple threads. I
I typically work on small-sized projects that involve only 2-3 people working on the
Typically when you run any program, during execution time what are different storages available
I'm writing a game where a large number of objects will have area effects
I need to pre-compress some very large html/xml/json files (large data dumps) using either

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.