跳至主要内容

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.

 

评论

此博客中的热门博文

Emacs 26.2 windows Hunspell setup

 Hunspell failed with default setup With my shining new emacs26.2 setup, I am happy until trying to `M-$’ on a word. I got following error message, it used to be work by just set ispell program to hunspell. Starting new Ispell process hunspell with default dictionary... split-string: Wrong type argument: stringp, nil After some check in my customization setting. nothing found. install a copy of hunspell dictionary At first I think it was caused by no hunspell dictionary. I downloaded en US and en CA hunspell dictionary from wordlist.sf.net project. After put the .aff and .dic files into C:directory I’ve also made a symbolic link from en US ones by running the `mklink’ tool: mklink default.aff en_US.aff mklink default.dic en_US.dic Err… hunspell does not work, still. Time to read code Dig into ispell.el I suprisingly find there’re lots of hunspell specific logic. Originally I was thinking hunspell support involves no elisp work. Acturally ispell did many work to de...

Use MobaDiff with git difftool

Recently there's an activity in IT that forces the deletion of all unauthorized softwares from all work machines. Unfortunately, kdiff3 is one in the list. As it is generally okay to use vimdiff as an alternative for kdiff3, A gui tool is better suited for desktop workflows. Known that MobaXterm is shipping a gui diff tool named MobaDiff. But it only appears in the windows right click context menu. Find the real application name takes me some time to search in the windows registry. "MobaRTE.exe", which is the one invoked by HKCR\*\shell\MobaDiff. And it was invoked with "-contextdiff" switch to show MobaDiff UI, while when the switch is "-contextedit" it shows MobaTextEditor. Too bad that the "-contextdiff" switch do not support pre-image post-image as other diff tool did, which effectively made it unable to be used as a command line diff utility. Also MobaTech did not mention anything in their document of this Mob...

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.