svn2git error PROPFIND request failed - github

I have Ruby, RubyGems, and svn2git installed under 32 bit windows 7.
svn2git https://code.google.com/p/skyrim-plugin-decoding-project/ --rootistrunk --revision 1:1693 --authors ~/authors.txt --verbose
The above line returns the following error:
Running command: git svn init --prefix=svn/ --no-metadata --trunk=https://code.g
oogle.com/p/skyrim-plugin-decoding-project/
Initialized empty Git repository in e:/tes5edit/.git/
RA layer request failed: PROPFIND request failed on '/p/skyrim-plugin-decoding-p
roject': PROPFIND of '/p/skyrim-plugin-decoding-project': 405 Method Not Allowed
(https://code.google.com) at /usr/lib/perl5/site_perl/Git/SVN.pm line 310
command failed:
git svn init --prefix=svn/ --no-metadata --trunk=https://code.google.com/p/skyri
m-plugin-decoding-project/
I read something about svnadmin so I tried the following
svnadmin: E205000: Repository argument required
I don't know what the argument would be.
I have never used GitBash or any of these programs. I have no idea what the proper commands would be to resolve the issue. I am also new to Git and have very little experience with it.
git svn clone http://my-project.googlecode.com/svn/ \
--authors-file=users.txt --no-metadata -s my_project
The standard commands also give errors
E:\TES5Edit_Git> git svn init https://code.google.com/p/skyrim-plugin-decoding-p
roject/
Initialized empty Git repository in E:/TES5Edit_Git/.git/
E:\TES5Edit_Git [master]> git config svn.authorsfile ./authors.txt
E:\TES5Edit_Git [master +1 ~0 -0 !]> git svn fetch
RA layer request failed: PROPFIND request failed on '/p/skyrim-plugin-decoding-p
roject': PROPFIND of '/p/skyrim-plugin-decoding-project': 405 Method Not Allowed
(https://code.google.com) at /usr/lib/perl5/site_perl/Git/SVN.pm line 148
E:\TES5Edit_Git [master +1 ~0 -0 !]>
As long as it makes a repo I can push I don't care how I do it. However, I did not start with a standard setup in the beginning and no idea what I was doing. So I want the clone to start at commit 1 and consider root as master, and all commits that make any kind of folder, rename folders, move folders, delete folders, all of everything created as branches.

After asking some friends I realized I had been using the wrong URL.
svn2git http://skyrim-plugin-decoding-project.googlecode.com/svn/ --rootistrunk --revision 1:1693 --authors ~/authors.txt --verbose
That would have been the correct init statment

Related

How to patch remote source code locally in yocto project?

Sometimes, We meet a situation that remote source code fetched by a recipe need to be modified so that suit a specific machine.
How do we create a patch for remote source code locally? After that everytime we build the recipe (even clean it all) we can patch the remote source code automatically.
For example, I have a special machine with architecture A which is not common, so the remote source code need to be modified so that support architecture A.
Suppose there was a file called utils.h (which is code that we fetched by example.bb from remote git repository)
#if defined(__x86_64__) || \
defined(__mips__) || \
defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) \
#define SOME_FUNCTIONALITY 1
Apparently I need to add archtecture A support in the file.
#if defined(__x86_64__) || \
defined(__mips__) || \
defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
defined(__A__) \
#define SOME_FUNCTIONALITY 1
But if we just modified like that, next time we execute
bitbake -c cleanall example
bitbake example
then we get a unchanged copies again(which means we have to modify it again).
How do we create a Add-architecture-A-support.patch locally so that we can patch the remote source code automatically?
This is a simple one from answers.
(Note: If there was no git in the source code directory, before modifying the source code, you need to create a git repository and commit all in the top directory of the source code.)
git init # create a git repository
git add .
git commit -m "First commit" # first commit
After change the utils.h as above, we can check the git status. It usually looks like that.
$ git status
HEAD detached from 87b933c420
Changes not staged for commit:
(use "git add <file>..." to update what will be comitted)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: ../../utils.h
...
no changes added to commit (use "git add" and/or "git commit -a")
Then we add and commit the change locally (usually we don't have the permission to push to upper stream).
$ git add utils.h
$ git commit -m "Patch test"
After that we can use git to create a patch for the recent commit.
$ git show >Add-architecture-A-support.patch
It will creat a patch in the current directory with contents looks like that
commit a79e523...
Author: 杨...
Date: ...
Patch test
diff --git a/somedir/utils.h b/somedir/utils.h
index 20bfd36c84..
--- a/somedir/utils.h
+++ b/somedir/utils.h
...
+ defined(__A__) \
...
Then we can move the patch to the local layer where the recipe stayed.
recipe-example
|-- example
| |-- Add-architecture-A-support.patch
|-- example.bb
And add the patch in example.bb with this.
SRC_URI += "\
file://Add-architecture-A-support.patch \
"
Work finished. (Also, if want to undo the local commit after creating the patch, you can use git reset HEAD^ utils.h. emmm, I think so, maybe there are some faults, just google it)

unable to delete git branch due to "renamed branch"

I've scoured several different posts but there doesn't appear to be any that match with this exact issue of an "apparent" branch renaming occurring but nothing seeming to line up.
Essentially, I've been trying to delete a remote branch off of an enterprise git version but I've been getting rejected and I was wondering if there was any additional steps I can try out?
here is the following CLI information:
| => git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/releases/v1.7.2_log4j2
(base)
| ~/Documents/<repo> # (user)
| => git push origin -d releases/v1.7.2_log4j2
To https://github.<company>.com/<org>/<repo>.git
! [remote rejected] releases/v1.7.2_log4j2 (branch releases/v1.7.2_log4j2 is being renamed)
error: failed to push some refs to 'https://github.<company>.com/<org>/<repo>.git'
My git version: 2.24.3 (Apple Git-128).
EDIT: there are no branch protection rules that apply to this branch and I have tried the command in the suggestions of git push -d origin releases<1.7.2_log4j2 with the same result
This looks like a github issue. There is a github-community thread where someone got the exact same message and it turned out to be a flag that was set within the github system that marked the branch as being renamed at the moment. They had to ask the github-support to clear that flag and then were able to delete the branch.
You seem to have your parameters backwards. Try
git push -d origin releases/v1.7.2_log4j2

The submit50 for cs50 is not working 2021 DEC

I am using VSC. Here is the output of the clone command, clone which is not working:
$ cd ubuntu/labs/lab8
ubuntu/labs/lab8/ $ submit50 cs50/labs/2021/x/trivia
Preparing files ...
Enter passphrase for key '/home/ubuntu/.ssh/id_rsa':
fatal: remote error:
classroom50/cs50/labs/2021/x/trivia is not a valid repository name
Visit https://support.github.com/ for help
Failed to clone "git#github.com:/classroom50/cs50/labs/2021/x/trivia".
ubuntu/labs/lab8/ $
Why the clone is failing?
A clone is for a repository, not a folder inside the repository.
Check what "submit50" does, and what is the remote URL you are using.
git remote -v
The git clone should use an URL like:
git#github.com:<UserName>/<RepoName>
^^^ (no / there)
The clone is failing because in 2021, submit50 doesn't work for Visual Studio Code. Moderates from CS50's discord server said so.

How to contribute to homebrew-cask using GitHub?

The quotation below is the instruction to contribute to brew-cask. However, I could not understand the sentence: github_user='<my-github-username>', I do not know whether should I input <>, and what is the github_user?
There is one email address, two names for one single GitHub account. What is more, when I input the last sentence: cask-repair --pull origin --push $github_user $outdated_cask. There is 2 errors: the requested upstream branch 'Andy1984' does not exist, and
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"
and the result is There was an error submitting the pull request. Have you forked the repo and made sure the pull and push remotes exist? I am quite sure I followed the instructions. What is wrong?
# install and setup script - only needed once
brew install vitorgalvao/tiny-scripts/cask-repair
cask-repair --help
# fork homebrew-cask to your account - only needed once
cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"
hub fork
# use to update <outdated_cask>
outdated_cask='<the-cask-i-want-to-update>'
github_user='<my-github-username>'
cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"
cask-repair --pull origin --push $github_user $outdated_cask
According to the documentation you can also use a script to push new version of an existing cask.
Check: https://github.com/caskroom/homebrew-cask/blob/master/CONTRIBUTING.md#updating-a-cask
# install and setup script - only needed once
brew install vitorgalvao/tiny-scripts/cask-repair
cask-repair --help
# use to update <outdated_cask>
cask-repair <outdated_cask>

git svn interrupted, then i lost all the tags, how to fix it?

i am about to clone code from svn repo (on centos) using git svn clone -s svn://xxx, then it is interrupted for strange problems, the error message is as follows:
Following parent with do_switch
Successfully followed parent
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/SVN/Core.pm line 584.
Network connection closed unexpectedly: at /usr/libexec/git-core/git-svn line 2693
then i continue this clone process using
time git svn fetch -r HEAD
all the things seems goes well, and succeed to clone that svn repo at last:
W: -empty_dir: trunk/src/os/win32/ngx_gui.c
W: -empty_dir: trunk/src/os/win32/ngx_gui.h
W: -empty_dir: trunk/src/os/win32/ngx_gui_resources.h
W: -empty_dir: trunk/src/os/win32/ngx_shared.h
W: -empty_dir: trunk/src/os/win32/ngx_types.h
r4817 = 7b58fc00b5b8ebb0544053ecf63e53b28935f15b (refs/remotes/trunk)
Auto packing the repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.
Counting objects: 12449, done.
Compressing objects: 100% (12177/12177), done.
Writing objects: 100% (12449/12449), done.
Total 12449 (delta 9475), reused 0 (delta 0)
Checked out HEAD:
svn://svn.nginx.org/nginx/trunk r4817
real 0m9.630s
user 0m6.015s
sys 0m1.870s
the strange issue is that there is no tags in my local git repo which is cloned from svn repo:
[root#home nginx]# git branch
* master
[root#home nginx]# git tag // no tags at all:(
[root#home nginx]# svn ls svn://svn.nginx.org/nginx/branches | wc -l
7
[root#home nginx]# svn ls svn://svn.nginx.org/nginx/tags | wc -l
388
in fact there are 388 tags in the svn repo, so how to fix my local .git repo?
should i have to restart to git clone from the remote svn server?
i have tried many times, with the same problem:(
Basically git-svn doesn't support tags as Git tags. In order to convert SVN tags to Git tags you may use:
SubGit (+maybe svnsync if you have no access to the server with SVN repository)
git-svn + command for references update:
"git update-ref refs/tags/TAGNAME refs/remotes/tags/TAGNAME"
SmartGit, if you want some UI and not writing a script
But note: only the 1st and the 3rd solutions allow you to push tags to the server to be conerted to SVN tags. With git-svn you should use additional "git svn branch" command.