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 3310104
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:43:11+00:00 2026-05-17T21:43:11+00:00

We have a script to delete the svn:mergeinfo property from all folders inside a

  • 0

We have a script to delete the svn:mergeinfo property from all folders inside a Subversion working copy, but not the working copy root directory itself. It’s currently an NAnt build script invoked via a separate batch file, so I’m trying to replace it with a simpler PowerShell script. I’ve had three attempts at it, ranging from the naïve to the slightly more sophisticated. All three fail my criteria, outputting the line property 'svn:mergeinfo' deleted from '.'.

Checking the SVN properties of the working copy root indicates that the svn:mergeinfo property has indeed been removed from this folder which is not what I want. Each version is designed to be run from the working copy root.

Attempt 1:

# I understand why this one fails, it's a poor attempt.
Get-ChildItem -Recurse | svn propdel svn:mergeinfo -R $_

Attempt 2:

# This one correctly lists everything except the working copy root, but
# still removes the svn:mergeinfo property from the working copy root.
Get-ChildItem -Recurse -Exclude $pwd | svn propdel svn:mergeinfo -R $_

Attempt 3:

# Again, this one works fine until the svn propdel is added.
Get-ChildItem | ForEach-Object { ls -R $_ } | svn propdel svn:mergeinfo -R $_

Any thoughts on where the flaw in my logic is?

  • 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-17T21:43:11+00:00Added an answer on May 17, 2026 at 9:43 pm

    svn is an external application and you cannot use PowerShell piping technique directly with it. I am not familiar with svn syntax and can be wrong about the details but all your commands presumably should use ForEach-Object (%). That is:

    ... | %{ svn propdel svn:mergeinfo -R $_ }
    

    Then svn should “understand” the $_ correctly. Also, it is quite possible that you should use something like $_.FullName or $_.Name instead of $_ (again, because svn is an external application and it expects a string (e.g. $_.FullName/$_.Name), not an object $_). NB: $_ is often converted to strings as expected automatically but this is not always the case.

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

Sidebar

Related Questions

I have a Perl script to copy some config files from remote servers to
1.I have a script, that executes some update/delete operations 2.All sql operations are executed
I have names of all files in output.txt but I do not have folderpath
Possible Duplicate: Delete all but the most recent X files in bash I have
I have the following script, which should be producing errors, but it does not:
I have a script that retrieves objects from a remote server through an Ajax
I have a script that checks responses from HTTP servers using the PEAR HTTP
I have a script that renders graphs in gnuplot. The graphs all end up
I'm trying to delete old SVN files from directory tree. shutil.rmtree and os.unlink raise
I have this script that loads in content, and should then bind the delete

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.