RCS using multiple files for checkin or checkout - rcs

I would like to know if there is any way to commit multiple files together in RCS. When i say together, it means that I have done my changes to multiple files but they are to be included in the same commit. I know that the checkin command is:
ci -u filename
Also, I know that for using a log message:
ci -u -m 'message' filename.ext
If someone could help me out, it will be great!
THNX

Pass Multiple Files as Arguments
RCS is file-based, so you can't really commit groups of files as a group. However, you can certainly pass multiple files to the ci command, and it will process each one in turn. You can even use the same commit message for all files checked in this way. For example, given both /tmp/foo and /tmp/bar are already in RCS:
$ $ ci -l -m'Interesting commit.' /tmp/foo /tmp/bar
/tmp/foo,v <-- /tmp/foo
new revision: 1.2; previous revision: 1.1
done
/tmp/bar,v <-- /tmp/bar
new revision: 1.2; previous revision: 1.1
done

Can you also apply a multi-line log message to multiple files by reading it from a file on the command line.
Let's say your multi-line log message is in a file named commit.msg.
ci -l -m"$(cat commit.msg)" /tmp/foo /tmp/bar
Note, the quotes on either side of the parens are required.

Related

scp fails with "protocol error: filename does not match request"

I have a script that uses SCP to pull a file from a remote Linux host on AWS. After running the same code nightly for about 6 months without issue, it started failing today with protocol error: filename does not match request. I reproduced the issue on some simpler filenames below:
$ scp -i $IDENT $HOST_AND_DIR/"foobar" .
# the file is copied successfully
$ scp -i $IDENT $HOST_AND_DIR/"'foobar'" .
protocol error: filename does not match request
# used to work, i swear...
$ scp -i $IDENT $HOST_AND_DIR/"'foobarbaz'" .
scp: /home/user_redacted/foobarbaz: No such file or directory
# less surprising...
The reason for my single quotes was that I was grabbing a file with spaces in the name originally. To deal with the spaces, I had done $HOST_AND_DIR/"'foo bar'" for many months, but starting today, it would only accept $HOST_AND_DIR/"foo\ bar". So, my issue is fixed, but I'm still curious about what's going on.
I Googled the error message, but I don't see any real mentions of it, which surprises me.
Both hosts involved have OpenSSL 1.0.2g in the output of ssh -v localhost, and bash --version says GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
Any ideas?
I ended up having a look through the source code and found the commit where this error is thrown:
GitHub Commit
remote->local directory copies satisfy the wildcard specified by the
user.
This checking provides some protection against a malicious server
sending unexpected filenames, but it comes at a risk of rejecting
wanted files due to differences between client and server wildcard
expansion rules.
For this reason, this also adds a new -T flag to disable the check.
They have added a new flag -T that will ignore this new check they've added so it is backwards compatible. However, I suppose we should look and find out why the filenames we're using are flagged as restricted.
In my case, I had [] characters in the filename that needed to be escaped using one of the options listed here. for example:
scp USERNAME#IP_ADDR:"/tmp/foo\[bar\].txt" /tmp

tar: Error opening archive: Can't initialize filter; unable to run program "bzip2 -d"

I'm trying to run this code from : https://github.com/pnnl/safekit ,using cmd on windows 10, I already installed python.
when I type the command:
tar -xjvf data_examples.tar.bz2
I keep getting the error:
tar: Error opening archive: Can't initialize filter; unable to run
program "bzip2 -d"
I have tried to download bzip2 through easy-7 zip and GnuWin32 , but it didn't work.
Can any one help me?
P.S.: I did search for the same problem before posting mine.
If you run the command in git bash instead of cmd it should work.
I've run into the same problem! My non-elegant solution so far has been to force Windows's tar.exe to use the bzip2.exe provided with my Windows Git installation. The trick is to add to your user PATH the directory where bzip2.exe is located, in my case:
C:\Program Files\Git\mingw64\bin
So, right now my PATH looks like:
Path=%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Git\mingw64\bin
Notice that I've only touched the user environment PATH, not the system PATH, and I've appended the new directory. As always, touching your PATH can be a little bit dangerous, proceed with care. If someone has a better solution, I'd be glad to hear it.
Note: I tried copying the bzip2.exe to a separate directory, but this didn't work (I presume because bzip2.exe couldn't find some dependencies).

mapnik configure fails during rpmbuild, but succeeds manually

I've posted this issue on the google groups area for mapnik already, so I'm just going to c/p from there:
I've been troubleshooting this issue for a couple days, now. Bear with me for context:
Starting from a freshly-untarred source of mapnik 2.2.0 on RHEL 6.5:
First off, running "./configure" (which just calls scons/scons.py) works great. Finishes correctly, then I run make + make install and I get exactly what I want built and installed.
My goal has been to create a mapnik 2.2.0 RPM for internal use. Please do not suggest using an "official" mapnik RPM instead (or any other already-built mapnik RPM), as my entire purpose here is to build mapnik from source and create my own RPM.
That being said, when my RPM gets to its %build phase and runs ./configure, it freezes while scons checks for freetype-config. I've let it sit for hours, and nothing happens.
After I looked at the generated config.log file, it would appear that configure is failing on an "awk" command that goes something like this:
awk '{print $\(NF-1\)}'
The command is performed on the string that results from the command:
/usr/bin/freetype-config --libs --cflags
I'm wondering, first of all, how to fix this, but second of all why this would work manually, but fail when the rpmbuild process gets to the ./configure command. I've made sure that the same user (myself) is running both ./configure commands on the exact same files.
My third question would be: why does the configure step freeze on this issue, instead of throwing some sort of error and stopping?
Note that the problem with the "awk" command is the backslashes--the error is:
awk: {print $\(NF-1\)}
^ backslash not last character on line
When I remove the backslashes, the command succeeds. Whether or not removing the backslashes is the correct thing to do in the long run, I do not know.
It would seem this is some sort of python string-parsing / encoding issue, but I'm unsure. What really confuses me is why this works manually and fails when the rpmbuild tries to do it.
My only thought is that there's some difference between the rpmbuild environment and my shell that I configured on. What it is, I do not know.
Thank you for any assistance you can provide. If I can provide any more context, please let me know.
UPDATE: an svn command runs after the awk failure, but is missing whatever number gets passed after the -r option. I'm wondering if this could be causing the hang...thoughts?

How to use iTunes Connect Transporter

Is there anyone that can explain to someone that doesn't know how to use Terminal what are the commands to use Transporter for iTunes Connect?
I tryed to follow the guide but with no results....
These are my steps till now:
I put this command in terminal:
export TRANSPORTER_HOME=`xcode-select --print-path`/../
Applications/Application\ Loader.app/Contents/MacOS/itms/bin
and my terminal change like this:
~ myname$ Applications/Application\ Loader.app/Contents/MacOS/itms/bin
so I guess with this now I am in the transporter folder...
Now I want to etrieve my app’s current metadata Using Lookup Mode, and I tryed with this command:
$ iTMSTransporter -m lookupMetadata -u [myname#gmail.com] -p [mypassword] -vendor_id [id999999999] -
destination [Applications/Application\ Loader.app/Contents/MacOS/itms/bin]
but I get this:
$ iTMSTransporter -m lookupMetadata -u [myname#gmail.com] -p [mypassword] -vendor_id [id999999999] -
-bash: Applications/Application Loader.app/Contents/MacOS/itms/bin$: No such file or directory
I assume I'm writing the destination in a wrong way....
So how should I write that command?
And also... when I will have to upload my edited file... what shoud I put?
Thanks a lot for any help with this issue
Start by putting the export command into a single line.
export TRANSPORTER_HOME=`xcode-select --print-path`/../Applications/Application\ Loader.app/Contents/MacOS/itms/bin
Then you have to use the full path to the iTMSTransporter Binary. You can use the variable you just defined for this.
"$TRANSPORTER_HOME/iTMSTransporter" -m lookupMetadata -u ... -vendor_id ... -destination ~/myapp
The destination is the directory where the app data will be put. ~ means your user directory. So if your username is blue ~/myapp means /Users/blue/myapp.
Don't use Xcodes directory for this.
I would recommend to NOT specify your password with the -p parameter. You don't want your password to appear in bash_history. If you don't specify the passwort you will be asked for it.
Again. Make sure that this is in one line. You must not spread the command over more than one line. Unfortunately if you copy and paste from the pdf document you get a multi line command that won't work.
I suggest to open a text editor, paste the command from the pdf into the text editor and format the command so it is on a single line.
Then go to https://bugreport.apple.com and file a bug about the crappy documentation of iTMSTransporter

Multiple Job (j3)

I am trying to run a GNU make file with multiple jobs.
When I try executing ' make.exe -r -j3', the receive the following to errors:
make.exe: Do not specify -j or --jobs if sh.exe is not available.
make.exe: Resetting make for single job mode.
Do I have to add ' $(SH) -c' somewhere in the makefile? If so, where?
The error message suggests that make cannot find sh.exe. The file names indicate you are probably on CygWin. I would investigate setting the PATH to include the location of sh.exe, or defining the value of SHELL to the name (or, even, full path) of your shell.
Are you running this on Windows (more specifically, in the "windows" shell?). If you are, you might want to read this:
http://www.gnu.org/software/make/manual/make.html#Parallel
more specifically:
On MS-DOS, the ‘-j’ option has no effect, since that system doesn't support multi-processing.
Once again, assuming you're running on windows, you should get MinGW or CygWin