On Thu, Nov 21, 2024 at 3:33 PM Marvin Renich <m...@renich.org> wrote: > > * Tony Mechelynck <antoine.mechely...@gmail.com> [241121 00:10]: > > On Wed, Nov 20, 2024 at 7:48 PM Marvin Renich <m...@renich.org> wrote: > > > I have, in the past, used the hggit extension > > > (https://hg-git.github.io/), rather than the git extension. It is > > > packaged in Debian as mercurial-git. To use it, simply add > > > «[extensions] hggit = » to your .hgrc, then use git URLs to clone the > > > repo, e.g. «hg clone git+https://github.com/vim/vim.git». Other than > > > that, you simply use hg as you normally would. And, it has help. > > > > > > Note that the instructions on the website say to also add > > > hgext.bookmarks= to your .hgrc, but if you read more carefully, it says > > > this is only needed for hg versions prior to 1.7, which is _very_ old. > > > I didn't add this and it seems to work fine. > > > > > > I just tried the above clone in a fresh VM. It works fine, but it takes > > > a while to clone, as there are more than 20,000 commits. There is a > > > progress bar during the download, but when all the commits are > > > downloaded, there is a long pause without any feedback while the > > > extension converts the git commits to mercurial. > > > > Since I posted the above, I found that my Linux distro includes an > > hggit package ; so I installed it but didn't yet enable it. Strangely > > as it may seem, Mercurial regards it as "external" but doesn't need to > > be told where it is : > > > > linux-tuxedo:~/.build/vim/vim-hg # hg --config extensions.hggit= version -v > > By default, Mercurial looks for extensions in the Python path. If you > hadn't specified --config... it would not have found the extension. You > only need to specify paths for extensions that are not in your Python > module path, but the extension name must be mentioned in your .hgrc file > to be found. > > > The part I don't understand in the hggit help is the need to download > > a separate git clone on my hard drive outside my Mercurial repository > > of Vim, even though the latter includes the .gitignore and other files > > needed by git but not by Mercurial. (It also includes, of course, the > > .hgignore and other files needed by Mercurial but not by git.) I would > > have thought that, let's say, after having set the "default" remote > > source to the proper git: URL for the Vim server on github, I could > > use "hg in" and "hg fetch --switch-parent" on my existing Mercurial > > repository as usual and that it would list or pull (respectively) any > > new changesets available on github, converting them to proper > > Mercurial changesets as it went and committing them as descendants > > from the existing ones (downloaded from Christian's Mercurial server > > and before that from Bram's), without the need to rebuild the whole > > stuff from scratch. > > It puts the Git clone in the directory .hg/git in your repo. When > pulling from a Git repo, it must be able to match Mercurial commits with > corresponding Git commits. Because the Git hashes are different from > the Mercurial hashes, it does this by comparing the contents of the > commits, so it must have all of the Git commits. Once you have pulled > from (or cloned) a Git repo, subsequent pulls will only have to download > new commits. This is the same as with a remote Mercurial repo, but the > code used to download and compare Git commits with the existing > Mercurial commits is much slower than either a "git pull" or "hg pull" > from a native repo. > > You will find a file .hg/git-mapfile with a table of hg<->git commit > hashes. Also, Git and Mercurial have some different philosophies, > especially regarding tags. Mercurial tags are stored as commits, while > Git tags are metadata in the .git directory, so the correspondence > between commits is not one-to-one. > > > I have a hint that the authors of the hggit help are interested mostly > > in "pushing" to git while I am interested only and exclusively in > > "pulling" from git in order to "make" from the source thus downloaded > > successively better Vim executables configured to my will and wish. > > I don't think this is true. I think it is just the initial use of clone > or pull that is taking so long that is giving you this impression. > > > If > > I ever feel the need to contribute changes to the source and the > > runtime files, I will, like in the past, write them as local mq > > patches and send them to the list in "unified git diff" format as > > produced by Mercurial even without the hggit extension. > > > > Best regards, > > Tony. > > ...Marvin
Hm. Today I investigated another possibility using "hg --config extensions.convert= help convert". What it says is more similar to what I see in the changesets pulled from Christian's Mercurial server but it is seems not to be identical. I guess that for the time being I'll keep my own-compiled Vim "frozen" at 9.1.873 (which is higher than the 9.1.836 currently available from my Linux distro anyway) and "wait and see" how circumstances evolve with time. Best regards, Tony. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/CAJkCKXtrTAoUWG0-2zcuizrj%3DLF%3Dd%2BZQCFEbiDrZbhgmGdutYQ%40mail.gmail.com.