Great! I'm glad that the suggestion helped. On Wed, Dec 7, 2022 at 7:31 PM Aman Qureshi via TortoiseSVN < tortoisesvn@googlegroups.com> wrote:
> Thank you so much I was just missing the add command, other than that it's > working for me. > Thanks once again for your help, really appreciate it! > > On Wednesday, 7 December 2022 at 15:37:28 UTC+1 Pavel Lyalyakin wrote: > >> You should see some output when running the commands. Sample code: >> [[[ >> import subprocess >> >> subprocess.call(["svnadmin", "create", "mytestrepo"]) >> subprocess.call(["svn", "checkout", "file:///users/bahrep/mytestrepo", >> "myworkingcopy"]) >> >> with open("/users/bahrep/myworkingcopy/mytextfile.txt", "w") as myfile: >> myfile.write('File content') >> >> subprocess.call(["svn", "add", >> "/users/bahrep/myworkingcopy/mytextfile.txt"]) >> subprocess.call(["svn", "commit", "-m", "My test log message", >> "/users/bahrep/myworkingcopy/"]) >> ]]] >> >> Creates a new local repository, >> Checks out a working copy, >> Creates a new file into the working copy and adds it to Subversion, >> Commits this change. >> >> Output: >> [[[ >> Checked out revision 0. >> A /users/bahrep/myworkingcopy/mytextfile.txt >> Adding users/bahrep/myworkingcopy/mytextfile.txt >> Transmitting file data .done >> Committing transaction... >> Committed revision 1. >> ]]] >> >> PS I'm not a Python expert. >> >> On Wed, Dec 7, 2022 at 5:10 PM Aman Qureshi via TortoiseSVN < >> torto...@googlegroups.com> wrote: >> >>> Hi, I tried both adding new files and making changes in the same already >>> committed file (working copy local modification). The commit command with >>> subprocess isn't showing any error, it just does not execute anything, call >>> you to guide me through the command to add files with the same subprocess >>> call. >>> So, I'll then just try to add all uncommitted files with the add command >>> and the commit command >>> >>> Kind Regards, >>> Aman Qureshi >>> >>> On Tuesday, 6 December 2022 at 14:32:46 UTC+1 Pavel Lyalyakin wrote: >>> >>>> On Tue, Dec 6, 2022 at 4:25 PM Aman Qureshi via TortoiseSVN < >>>> torto...@googlegroups.com> wrote: >>>> >>>>> Hi, >>>>> I wanted to know how can we automate commit and update the files with >>>>> python script for svn. >>>>> >>>> >>>> Wrong mailing list. This mailing list is intended for topics related to >>>> the TortoiseSVN client. However, your question is about automating the >>>> `svn` command-line client. The users@ Apache Subversion >>>> <https://subversion.apache.org/mailing-lists.html> is an appropriate >>>> place for your request. >>>> >>>> >>>>> currently, >>>>> subprocess.call(["svn","checkout", url, local dir]) ---> this is >>>>> working by fetching the repo and creatinfg a local copy >>>>> subprocess.call(["svn", "commit", "-m", "Updating the files", "local >>>>> dir"]) ---> this is not working >>>>> >>>> >>>> Do you receive any errors when you call `svn commit` from this Python >>>> script? I'm afraid that right now it's unclear what exactly is not working. >>>> >>>> Note that the commit will only happen if the working copy has local >>>> modifications. The commit won't happen if there is nothing to commit (no >>>> local modifications in the working copy, so there is nothing to commit into >>>> the repository). Note that if you create new files in the working copy, you >>>> need to run `svn add` to make Subversion track them. >>>> >>>> >>>>> is there separate comand to add files then commit or I bascially want >>>>> to commit all the files in the directory that are not in subversion. >>>>> >>>>> Tried using pysvn and svn 1.0.1 noone of them are working for me >>>>> >>>>> Thanks in Advance. >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "TortoiseSVN" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to tortoisesvn...@googlegroups.com. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/tortoisesvn/2223010f-1038-4485-91b9-64c93ebf21a3n%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/tortoisesvn/2223010f-1038-4485-91b9-64c93ebf21a3n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> >>>> >>>> -- >>>> With best regards, >>>> Pavel Lyalyakin >>>> VisualSVN Team >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "TortoiseSVN" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to tortoisesvn...@googlegroups.com. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/tortoisesvn/68372be8-225d-4294-a915-45d86fa84c63n%40googlegroups.com >>> <https://groups.google.com/d/msgid/tortoisesvn/68372be8-225d-4294-a915-45d86fa84c63n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> With best regards, >> Pavel Lyalyakin >> VisualSVN Team >> > -- > You received this message because you are subscribed to the Google Groups > "TortoiseSVN" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to tortoisesvn+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tortoisesvn/74ded08f-afae-4df8-b830-fd871673bac8n%40googlegroups.com > <https://groups.google.com/d/msgid/tortoisesvn/74ded08f-afae-4df8-b830-fd871673bac8n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- With best regards, Pavel Lyalyakin VisualSVN Team -- You received this message because you are subscribed to the Google Groups "TortoiseSVN" group. To unsubscribe from this group and stop receiving emails from it, send an email to tortoisesvn+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn/CAEyhmwYRWDhLq1qUCL01H9O8hk_U2mQ1_pw-%3DwZ2sVhR%3DOeQYQ%40mail.gmail.com.