跳至主要内容

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.

 

评论

此博客中的热门博文

Eglot and before/after-save-hook and use-package

In Emacs, when you try to automate some actions during every save action, you will surely get to the before-save-hook and the after-save-hook. Simply adding something like gofmt-before-save to before-save-hook will save you tons of time to do the go-fmt. And then, I meet eglot, and gopls will also save me tons of time doing googling and api documentation navigation. But eglot-ensure is not very friendly to the good old ways of how after-save-hooks were designed to work. It makes the before/after-save-hook a buffer local variable and it does not inherit the variable's global value. So, to make before/after-save-hook work again, experts start to adding hooks to major mode specific hooks like this: emacs.md - Go (opensource.google) """ ;; Optional: install eglot-format-buffer as a save hook. ;; The depth of -10 places this before eglot's willSave notification, ;; so that that notification reports the actual contents that will be saved. (defu...

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.