Will the parameter --non-interactive work for import? Example:
svn import -m "SVN Project created" --username $NAME --password $PASS "$tempProjectPath" "$SVN"
Result line:
svn import -m "SVN Project created" --username $NAME --password $PASS --non-interactive "$tempProjectPath" "$SVN"
I use this line in a Perl script to automatically import a folder into a repository. That's why the comment and password dialogs are inappropriate for me.
I use FreeBSD OS.
I tried to check it manually by importing an empty dir to repository. Example:
svn import -m "Manual import Test 1" --username Maxus --password 1111 --non-interactive "/tmp/reti" "svn://192.168.0.57"
But nothing happened.
Maybe, you have another idea - how to execute shell command svn import in Perl without dialogs for commit comments or passwords? Or how I can ignore/complete those dialogs from a shell command?
The URL for a repo served with svnserve has three parts:
svn://
server/
path/to/repo
As Lazy Badger pointed out in the comments (and as you yourself discovered by running on the command line), you are missing the path/to/repo part. svnserve will not know which repo you are trying to access unless you give it a path.
If you used the --root=dir option when you started svnserve, the path you give in the URL will be interpreted relative to dir.
Now, based on your last comment, you already know that the command works on the command line when you put a path in the URL. Use that URL in your Perl command and it should work.
Related
How to extract .csv file from Coverity server in command line.
please Explain Command cov-manage-im with example.
Is there any need to install Coverity in Windows, though I have access to the website and can manually download the .csv file
For those who came here looking to export CSV using the web interface to the Coverity server, if you open the menu sidebar, then in the "Issues by ..." and "File" sections, each subsection has a drop-down option "Export CSV" which does the job !
This is clearly explained in Documentation:
Show all defects in 'proj' project
You basically need to use --mode defects to query defects and
--show to output in csv format
cov-manage-im --host <host> --port <port> --user id --password pwd --mode defects --show --project proj
You can add fields as
cov-manage-im --host <host> --port <port> --user id --password pwd --mode defects --show --project proj --fields cid,severity, classification ..
And add filters as
cov-manage-im --host <host> --port <port> --user id --password pwd --mode defects --show --project proj --fields cid,severity, classification .. --status Fixed --class Bug --severity Major ...
and so on and so forth. Just look at detailed documentation on your Coverity Connect instance
As I also needed to download Coverity report as CSV, using the web-ui, I attach here a screenshot, to better explain how this is done.
At the view panel, select the view you want to export (here it is High Impact Outstanding)
now click on the down-arrow and select 'Export CSV'
DC: This is not for command line, this can help when you want to download from server.
I think you can refere this link click
so the basic idea behind this is that first you save a copy of all the issues without any filter( if you want all) then download it.
Solution:-
For any unsaved view (in this case, the view by double clicking on one specific snapshot), if we want to export the result, we need to save this view with a valid name.
click on the gear mark, and check "Save as a Copy".
Provide a name you want, and save the view with OK button.
After that, this view can be accessed via the view list, and can be
exported via "Export to CSV" as other views.
I am trying to refresh a tableau extract remotely from a linux box using the command :
./tableau_script.bash refreshextracts --server servername --username username --Password password --project <project name with spaces> --workbook <workbook with spaces>
tableau_script.bash is a bash script with the java call to tabcmd class.
The issue I face is with the spaces in the workbook or project ,could not find any way to escape this ,tried \,%20,%%20 but none seems to work.
Any suggestions.
Enclose project name with this "\"
You simply need to escape the spaces.
./tableau_script.bash refreshextracts --server servername --username username --Password password --project project\ name\ with\ spaces --workbook workbook\ with\ spaces
I am writing a simple Perl script that is attempting to automate checking in files via SVN. I am not using any given SVN clients within Perl and for the sake of simplicity am just using command line arguments.
Whenever I run the svn checkout command seen below, I am getting this error:
sh[2]: svn+ssh://my/repo/url/project/trunk: not found.
Here is the command and the variable declarations.
$svn_root = "svn+ssh://my/repo/url/project/trunk";
$user = `whoami`;
`svn checkout -q --username $user $svn_root workingCopyName`;
I should note that I am connecting to the repository via SSH and have edited my config file (and included -q just in case). I will also note that running this command outside of the script works perfectly fine, for the same exact URL, and without the -q argument.
Thanks for your help. Please let me know if I need to clear anything up.
Note that the error is coming from the shell, not svn.
You are executing
svn checkout -q --username user
svn+ssh://my/repo/url/project/trunk workingCopyName
when you mean to execute
svn checkout -q --username user svn+ssh://my/repo/url/project/trunk workingCopyName
because $user contains a newline. Replace
my $user = `whoami`;
with
chomp( my $user = `whoami` );
after much messing around I have followed this tutorial on using a cmd prompt to push up to git hub
http://readwrite.com/2013/10/02/github-for-beginners-part-2
However I have had to do a few things differently. Generating and adding the public key in GitHub went fine, however, adding the private key on my local machine has been a real pain.
I finally added it by opening a cmd prompt as administrator. then going to the directory where github was installed I then rand the following cmds to install the private key
bash
eval $(ssh-agent)
cd to-directory-where-private-.ssh-file-was-located
ssh-add .ssh
Identity added: .ssh (.ssh)
Prior to that I had numerous errors. However, when I run this from a batch file
cd c:/LocalDevelopment/PhoneGap/PfpMetrol
git init
git status
git add PhonegapData.js
git commit -m "Add PhonegapData.js"
git remote -v
git push
pause
it is still asking me for a username and password.
I'm trying to setup subversion, so everytime someone commits a change, it updates a working directory that we'll use on a dev box as the 'test' site.
I've setup post-commit, and added the line:
#!/usr/bin/perl /usr/bin/svn update /home/administrator/sites/checkmyid --username root --password xxx
Can anyone tell me why this doesn't work when run automatically, but when I run it at the command prompt:
sudo ./post-commit
/home/administrator/sites/svn
It works fine?
I've tried chaning the owner of the working directory to www-data but it doesn't seem to want to work?
FIXED IT MYSELF
Basically, it was a permissions problem. I used the command
sudo chown -R www-data /home/administrator/sites/checkmyid
And now it works perfectly!
Your post-commit script contains bash code, but the shebang is saying to use Perl to run it.
Plus, shebang lines should be on their own line; put the actual commands to run on another line.
sudo chown -R www-data /home/administrator/sites/checkmyid