What do #backups branches/tags mean in converted svn2git git repository - svn2git

After converting a SVN repository from SVN to git, I see tags with names like:
backups/PM_4_2_11#204843
This tag was not in the original SVN repository. Does anyone know what it means?

It means you had that tag in SVN revision 204843, but it was deleted in SVN after that.

Related

Git lfs version https://git-lfs.github.com/spec/v1 oid error

I am working on creating a simple R Markdown website hosted as a GitHub website (xxx.github.io). I have a few sub-pages which are also written in R and knitted to HTML, so the path to them would be in the format xxx.github.io/subpagex.html
However, one of my subpages when knitted to HTML exceeded 100mb and required lfs tracking. So I installed git lfs, tracked the file at (docs/subpagex.html), committed and pushed.
However when I try xxx.github.io/subpagex.html it gives me the following error version https://git-lfs.github.com/spec/v1 oid sha256:e4024c70f19f3dfsgsgsfgfgsfgfgsfgsfda4e537afc9fbab7037633651b08 size 140010078
How can I fix this?
This file is a pointer file that's used by Git LFS to store in the repository. When Git LFS is enabled, this file is replaced by the large file in question. However, when it's not enabled, you see a pointer file like this one instead.
In your case, GitHub Pages doesn't support Git LFS, so that's why you're seeing the pointer file. Your only option is to make your document smaller so it fits in the repository without Git LFS. Note that 100 MB for any HTML file is really excessive and you cannot expect anyone to want to download that much data for a web page.
When Git LFS is used to store in the repository then your repository supports LFS, if so then you have to use Git LFS command for cloning your projects i.e. for cloning
$ git lfs clone git#bitbucket.org:tpettersen/Atlasteroids.git
for further visit https://www.atlassian.com/git/tutorials/git-lfs#clone-respository

SVN Getting The Count Of Revisions Of A Repository

I am curently working on a Qt c++ project that is basically printing all the commit log messages between a specific SVN Repository's 2 specific revision's (User enters the repo and the revisions).
I need to get the count of revisions in a repo URL.
I want to do this on Windows 10 so I guess a batch command could be pretty useful.
I am using Visual SVN Server and Tortoise SVN.
(My Qt version is 5.11.1 if it would be necessary)
I have a batch script that does print all the logs between 2 specific revisions to a .txt file.
It is like this:
#ECHO OFF
REM This Script Takes all the logs between a given repository's 2 specific revision.
REM Below, we store the first parameter which is the URL of the Repository that is wanted.
SET urlOfRepository=%1
REM Below, we store the second parameter which is the first revision that is wanted.
SET firstRevision=%2
REM Below, we store the third parameter which is the second revision that is wanted.
SET secondRevision=%3
REM Below is the command for getting all the log messages between the first and the second revision that is wanted in the wanted repository and printing to a .txt file.
svn log -r %firstRevision%:%secondRevision% --limit %secondRevision% %urlOfRepository% > svnLog.txt
EXIT /B 0
I would be glad if someone can help me.
I can clarify the question more if it is needed so please do not hesitate to contact me via comments.
Thanks in advance.
Thanks to Kostix the answer is:
svn info -r HEAD --show-item revision %URL%
And I have written a script to solve my problem. Here it is:
#ECHO OFF
REM This Script writes the revision count of a specific SVN repository
REM Below, we store the first parameter which is the URL of the Repository that is wanted.
SET urlOfRepository=%1
REM Below, is the command that returns the count of revisions in the specifically given SVN repository and writes to a .txt file
svn info -r HEAD --show-item revision %urlOfRepository% > svnCountOfRepoRevisions.txt
EXIT /B 0
There's no need to do it that complicated—a mere
svn log -r HEAD:1 %URL%
should work.
The special HEAD revision is automatically the last one in the repository, and the revision 1 is the first one (obviously).
Subversion is smart enough to skip revisions in which the URL does not
exist, so, say, if it was added in revision 42, svn log won't complain there is no URL in the revision range [41…1].
You can obtain more info by running
svn help log
in your console window.

Git merge results in 400 rename/rename conflicts, how do I resolve them quickly?

So, I have a number of Wordpress sites managed with a Git repository, all of which are branches off of a central upstream Git repository. I recently applied a bunch of updates to the parent repo, but one of the child website repos had a plugin updated to a different version and now throws up about 400 rename/rename conflicts. All of these conflicts are in an upstream plugin directory that would be safe to just resolve in favor of the upstream branch.
I want to do the following:
Ensure the upstream version of the files 'wins' the merge conflict (e.g. what the --theirs flag does with checkout)
Produce a mergeable history (If it's not safe for a coworker to type "git pull origin master" with an old repo, it's not an option. I'm religiously opposed to rebasing.)
Not restructure my Git repository (My hosting provider, Pantheon, will not install Composer dependencies at deploy time. Upstream plugins have to be part of the repo.)
Not get a repetitive stress injury (Has to be a reasonably small number of commands because I have to resolve these kinds of messes once a month or so.)
If I just type "git checkout wp-content/plugins/** --theirs", I get hit in the face with about 400 errors, and Git refuses to checkout the files. They look like this:
....400 or so errors omitted...
error: path 'wp-content/plugins/wordpress-seo/js/dist/wp-seo-quick-edit-handler-710.min.js' does not have their version
error: path 'wp-content/plugins/wordpress-seo/js/dist/wp-seo-quick-edit-handler-720.min.js' does not have their version
error: path 'wp-content/plugins/wordpress-seo/js/dist/wp-seo-recalculate-710.min.js' does not have their version
error: path 'wp-content/plugins/wordpress-seo/js/dist/wp-seo-recalculate-720.min.js' does not have their version
I categorically refuse to type 400 git rm/git add commands with each individual path included. git checkout --force is not an option, as --theirs and --force are mutually incompatible (for some reason). My current solution is to open Git GUI and manually right-click -> Use Remote Version and then click Yes... 400 times. I don't have to type the path at least but this is still time consuming.
How do I efficiently resolve a large number of rename/rename conflicts in favor of the remote repository?
Do you want to just resolve the conflicted files in favour of the remote, or just take a whole tree as it is in the remote?
For the latter, you could do this:
Just accept the files as-is with conflicts. git add . or similar
Commit the merge.
rm -Rf path/in/question
git checkout origin/branch -- path/in/question
git commit --amend -a
For the former, it's probably something pretty similar
Just accept the files as-is with conflicts. git add . or similar
Commit the merge.
Find files with conflicts. e.g. grep -r -l '>>>>' path/in/question > /tmp/conflicts.txt
Delete the files with conflicts, check out the desired versions, and amend the commit in a similar means to the above.
(If there are files/paths with spaces in them, small adjustments to the above commands may be necessary. I've given the simpler versions for clarity.)

Preserve files/directories for rpm upgrade in .spec file(rpmbuild)

I wrote a .spec file on RHEL and I am building RPM using rpmbuild. I need ideas on how to handle the situation below.
My RPM creates an empty logs directory when it installs first time within the installation folder like below
/opt/MyInstallation-1.0.0-1/some executables
/opt/MyInstallation-1.0.0-1/lib/carries shared objects(.so files)
/opt/MyInstallation-1.0.0-1/config/carries some XML and custom configuration files(.xml, etc)
/opt/MyInstallation-1.0.0-1/log--->This is where application writes logs
When my RPM upgrades MyInstallation-1.0.0-1, to MyInstallation-1.0.0-2 for example, I get everything right as I wanted.
But, my question is how to preserve log files written in MyInstallation-1.0.0-1? Or to precisely copy the log directory to MyInstallation-1.0.0-2.
I believe if you tag the directory as %config, it is expected that the user will have files in there, so it will leave it alone.
I found a solution or workaround to this by hit and trial method :)
I am using rpmbuild version 4.8.0 on RHEL 6.3 x86_64. I believe it will work on other distros as well.
If you install with one name only like "MyInstallation" rather than "MyInstallation-version number-RPM Build Number" and create "logs directory as a standard directory(no additional flags on it)[See Original Question for scenario] Whenever you upgrade, you normally don't touch logs directory. RPM will leave its contents as it is. All you have to do is to ensure that you keep the line below in the install section.
%install
install --directory $RPM_BUILD_ROOT%{_prefix}/%{name}/log
Here, prefix and name are macros. That has to do nothing with underlying concept.
Regarding config files, the following is a very precise table that will help you guarding your config files. Again, this rule can't be applied on logs our applications create.
http://www-uxsup.csx.cam.ac.uk/~jw35/docs/rpm_config.html
Thanks & Regards.

Recover a version controlled file from CVS

My company has stopped using CVS. I have an archived file name.cpp,v.
How can I recover the latest name.cpp ?
NOTE : I dont have cvs repository in place now.
Install RCS (it's small, go for it) if you haven't already.
Then run co name.cpp in the same directory as name.cpp,v.
It should "check out" the latest version.

Resources