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

  • SEARCH
  • Home
  • 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 325503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:13:22+00:00 2026-05-12T09:13:22+00:00

Is there any command line trick to get SVN to add in all the

  • 0

Is there any command line trick to get SVN to add in all the missing files from svn stat interactively?

For example, something like:

svn add --interactive 
$ new file:     file1.tmp (Add / Ignore) ?
$ missing file: file.tmp (Remove / Ignore) ?

EDIT:

A script that could achieve this would also work.

  • 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-05-12T09:13:22+00:00Added an answer on May 12, 2026 at 9:13 am

    I wrote a little Ruby script to do this:

    require 'fileutils'
    buffer = ""
    
    CACHE_DIR = File.join(ENV['HOME'], '.svn_interactive_temp')
    FileUtils.mkdir_p(CACHE_DIR)
    
    data = IO.popen 'svn stat' do |process|
      while process.read(512, buffer)
      end
    end
    
    def handle_file(file)
      system("stty raw")
      print "new file: #{file} [a]dd/[i]gnore/[s]kip? "
      c = STDIN.getc
      system("stty cooked")
      exit if c == 3
      c = c.chr
      success = true
      puts
      case c
      when 'a'
        puts "adding the file: #{file}"
        system "svn add #{file}"
      when 'i'
        puts "adding svn:ignore for #{file}"
        cache_filename = File.join(CACHE_DIR, (1..10).map{(rand * 10).to_i}.to_s)
        p file
        parent = File.dirname(file)
    
        system("svn propget svn:ignore #{parent} >> #{cache_filename}")
        File.open(cache_filename, 'a') do |f|
          f.puts(File.basename(file))
        end
        system("svn propset svn:ignore -F #{cache_filename} #{parent}")
        system("rm #{cache_filename}")
      when 's'
        puts "skipping: #{file}"
      else
        success = false
      end
      success
    end
    
    buffer.scan(/\?\s*(.*)$/).each do |file|
      while !(handle_file(file.to_s))
        sleep(0.01)
      end
    end
    

    For example,

    sam@sam-ubuntu:~/Source/stuff$ ruby ../scripts/svn_interactive.rb
    new file: test.txt [a]dd/[i]gnore/[s]kip? i
    adding svn:ignore for test.txt
    "test.txt"
    property 'svn:ignore' set on '.'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any command available for generating all missing spec files for existing models
Is there any API or command-line able to generate a VSTemplate file from a
Are there any howtos for using the PHP command line interactively? I found a
Simple question. Are there any tools for generating Xcode projects from the command line?
There is any command line or .NET method that runs a process in the
For Postgres is there any sort of command line utilities that allow a database
Is there any way to pass command line parameters to a Flash projector in
Is there any way to access the command line arguments, without using the argument
Is there a chance to get rid of command line window when starting IISExpress
Are there any command line interpreters or any other set of programs around for

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.