Quantcast
Channel: Active questions tagged feedback+php - Stack Overflow
Viewing all articles
Browse latest Browse all 34

CMD from PHP script - get feedback

$
0
0

I have a LOT ( almost 300 ) old SVN repositories to migrate to git using git2svn.

After considering GOLANG and PYTHON, I finally decided that the easiest way is to use PHP . Might be a bad questionable decision, but it's seemed easy.

So, after 15 minutes , I did have a script that is more or less running ok in tests . Ugly script , but it is a one-timer.

The problem is that the process takes a lot of time , even for simple almost empty repos is can take 30sec. and even a minute. On big ones - even 10min - so before taking it into production, I would like to have some feedback mechanism - so I can actually see what is going on .

..as of now ,the script does output the command feedback like so :

$cmd = "cd ".$GITrepoPath." && svn2git svn://127.0.0.1/". $repoName . " --username " .$SVNusername ." --authors authors.txt --notags --nobranches --notrunk";
            $output = shell_exec($cmd);
            echo "<pre>$output</pre>";

..but this is only after each repo was finished processing .. not like the real cmd execution where I can see the steps .

The only question I found that might be close to what I need was here - but honestly - I did not understood much from the answer ...

I know it is just a one-timer script - but the use case had me interested in how to actually achieve that ( and if it is possible ).

I am on a win7 local machine , but would like to know also for *nix if possible .


Viewing all articles
Browse latest Browse all 34

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>