0

I am currently writing a python script which needs to run a sed command to replace stuff from the svn:externals data. I tried to run sed on "svn propedit svn:externals ." but the outcome is not the one expected.

Does anyone know how to do this ?

Scipion
  • 11,449
  • 19
  • 74
  • 139
  • You should post the non-working sed/svn command to get better answers. Otherwise, all answers are just guesswork. – vog Jan 29 '15 at 13:19

1 Answers1

2

First of all, don't use sed. Use Python's string methods or the re module.

Second, I recommend to run svn propget ... first, to fetch the old value. Then, you manipulate it (within Python, no need to run sed). Finally, you run svn propset.

Alternatively, you could run a second Python script as editor for svn propedit. Here, too, you don't need sed if you already have Python.

vog
  • 23,517
  • 11
  • 59
  • 75