跳至主要内容

Manage local gits with repo

Would like to use repo because of Uh… Vim 8.0

There are at least two copy of VIMs lives in my laptop. One was manually installed gvim 8.1, the other is bundled vim by msysgit.

As of vim 8.x there’s a new package management system released. One may manage all vim plugin package without any third part plugin manager. As described in this famous blog post.

git submodule add https://github.com/vim-airline/vim-airline.git pack/shapeshed/start/vim-airline # 
git add .gitmodules pack/shapeshed/start/vim-airline

Anyway, I have no confidence in the git submodule command. Also, the solution try to initial one git repo group for each dot vim. I don’t like to iterate over all dot vim directories one by one when doing plugin updates.

Alternative way is to make use of git-repo tool to handle all the git repositories (vim plugins) as a whole…

Repo init

Error executing repo init… Because of msys path and win32 native path conflict. As my python interpreter comes with emacs, which is compiled to work as native program. And its os.path.expanduser api will return windows native path.

$ repo init -m workspace/xml/manifest.xml
gpg: keyblock resource '/c/opt/root/C:\opt\root/.repoconfig/gnupg/pubring.kbx': No such file or directory
gpg: no writable keyring found: Not found
gpg: error reading '[stdin]': General error
gpg: import from '[stdin]' failed: General error
gpg: Total number processed: 0
fatal: registering repo maintainer keys failed

Repo manifest file and local manifest

Manifest file is the configuration(repository information database) for git-repo tool. It is in XML format, DTD can be found in its official document.

Refer to Learn about the repo tool , manifests and local manifests and 5 important tips ! by Red Devil

Also, the official git-repo document

The XML and DTD and nxml

Lesson learn from DTD to rng converting:

  1. The `<!DOCTYPE foobar [’ tag is for inline DTD, for external DTDs this tag along with its conterpart `]>’ should be removed for validity.
  2. XSD to RNG, RNC, DTD converting is almost impossible, as XSD is too strict comparing with other XML validating format.

Convert DTD to RNG with jing-trang

cd ~/workspace
mkdir xml
cat > repo-manifest.dtd
# comment out first and last line in repo-manifest.dtd
# to form a valid external dtd file

To-Be-Continued

The repo tool is not officially supported on windows. And I find the issue of my environment is also in esrlabs clone.

I don’t have too much time working on repo tool, leave it there.

Would like to see if depottools gclient can help.

 

评论

此博客中的热门博文

XEmacs 21.5 beta 35 "kohlrabi" has been released.

If you are an old XEmacs user, you may feel happy to see this from https://www.xemacs.org/.    After ten years, XEmacs released a new version 21.5. So there's still many people cares about XEmacs. The XEmacs' source repo have been moved from altassian Bitbucket to https://heptapod.net/. As Bitbucket have been dropped Mercurial support many years ago.

Fido-mode

Today, I've just discovered the Fido mode, a modified `icomplete` minor mode. `icomplete` used to be one of my favorite mode days back to my XEmacs days. Pros: It is way fast. It is much more smart in terms of find the complete candidate that you want mostly.  Cons: It does not integrate well enough with tramp yet.    `fido-mode` is a core package of Emacs 27+, and there's a vertical version available after Emacs 28+ named `fido-vertical-mode`. UPDATE: I am back with ido now