简体   繁体   中英

Run replace command on svn:externals (python)

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM