gitimport | Import python packages directly from a git repository
kandi X-RAY | gitimport Summary
kandi X-RAY | gitimport Summary
Import python packages directly from a git repository
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Find a ModuleSpec for a given module
- Return the entry for the given key
- Execute a module
- Return the code for this entry
gitimport Key Features
gitimport Examples and Code Snippets
Community Discussions
Trending Discussions on gitimport
QUESTION
I am migrating many repositories from CVS to GIT. I used cvs gitimport first, but it didn't work properly. cvs2git works (almost) fine. Unfortunately there is one issue that worked in cvs gitimport and does not work in cvs2git (and is important for me) After migration using cvs2git, fields containing keywords (in specific files) are empty:
$Header$
$Revision$
$Author$
$Date$
"filename" Revision: 1.2
I tried different configurations of: ctx.revision_collector, ctx.revision_reader,_keyword_handling but the effect is still the same.
The main commands I used:
cvs2git --blobfile=cvs2git-tmp/${module}-tmp/git-blob.dat --dumpfile=cvs2git-tmp/${module}-tmp/git-dump.dat --username=migrationuser --encoding=ascii --encoding=utf8 --encoding=cp1250 --encoding=iso8859_2 --fallback-encoding=ascii --retain-conflicting-attic-files ${module}
git --bare init "projectname" cd "projectname" cat ../../cvs2git-tmp/git-blob.dat ../../cvs2git-tmp/git-dump.dat | git fast-import git branch -D TAG.FIXUP git gc --prune=now git repack -a -d -f
Has anyone managed to solve such a problem? Thank you in advance for your answer
...ANSWER
Answered 2020-Feb-24 at 22:15I use the cvsconvert
program from cvs-fast-export
It mostly expands keywords as a CVS user would expect them to be expanded (I'm not sure if it handles $CVSHeader$
or a custom LocalKeyword
defined in CVSROOT/config
, but I'll be testing that soon).
Once you've converted to Git, IFF you want to continue using per-file keyword expansion then you might consider using Git's $Format:$
feature which is enabled by setting the export-subst
attribute for all files needing such expansions, and generating your releases with git-archive(1). Note these are only expanded when the release is created with git archive
, but generally that's when they're most useful anyway.
For example I replace my old occurrences of $Id$
or $CVSHeader$
with something like the following (adapted where necessary for different comment or string constant syntax, and of course with the actual project name and file path):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gitimport
You can use gitimport like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page