On Fri, Jan 15, 2016 at 4:06 PM, Bram Moolenaar <[email protected]> wrote:
>
> I think most users will be in this situation:
>
> - Initially check out Vim from github:
>
> git clone https://github.com/vim/vim.git
>
> - Change a makefile to set some options, or change bigvim.bat to match
> your Python version, etc.
>
> - Build Vim.
>
> So far so good. Now the Vim version on Github gets patches, the user
> will want to simply sync to the latest version and keep his local
> changes (assuming there are no merge conflicts). Now what is the git
> command for that?
>
> A simple "git pull" results in the error "Your local changes to the
> following files would be overwritten".
> "git merge" does the same thing, so it doesn't actually merge.
>
> Git is difficult... Searches show me all kinds of different options
> with branches and complex arguments. There must be a simple way...
>
> --
> ARTHUR: Now stand aside worthy adversary.
> BLACK KNIGHT: (Glancing at his shoulder) 'Tis but a scratch.
> ARTHUR: A scratch? Your arm's off.
> "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
>
> /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
> /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\ an exciting new programming language -- http://www.Zimbu.org ///
> \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
>
I still use Mercurial (with the mirror at
https://bitbucket.org/vim-mirror/vim nowadays).
I haven't changed the Makefile (instead, I set my config parameters as
environment variables by "sourcing" a bash script) but I have a few
"user changes" in src/feature.h (to compile with -tag_old_static
+xterm_save, neither of which can by set through configure AFAICT) and
in .hgignore (for runtime/doc/tags, which is rebuilt by "make install"
anyway, and for any src/shadow* directories. These "local changes" are
committed but of course I never push.
I use the following commands (with ui.verbose set in ~/.hgrc):
First usecase: for permanent changes (the few mentioned above):
- Check if there are new changes on the remote:
hg in || echo 'exit status' $? ; date
If there aren't, hg exits with status 1 and there is of course nothing
more to do.
- (Not necessary with the version of hg I used to have with openSUSE
13.2, but nedded with hg 3.5.1 as distributed with openSUSE 42.1):
Preliminary step if there are changes to an "ignored" file (in my
case: runtime/doc/tags):
rm -v runtime/doc/tags
- Get the changes and merge them (requires the "fetch" standard
extension to hg):
hg fetch --switch-parent || echo 'exit status' $? ; date
-- If the (ignored) tagfile was changed on the remote, Mercurial
asks if I want to "use (c)hanged version or leave (d)eleted?": answer
d
-- hg fetch consist of two steps: a pull to get the metadata; and
then an update, followed if necessary (on my system it is) by a merge,
to bring the working directory up-to-date. IIUC, "hg pull" corresponds
to "git fetch" and vice-versa, which is no help when switching between
both systems.
At that point my clone is up-to-date and my working directory has the
latest "official" sources merged with my few local changes. I'm ready
to compile ("make" followed by "make install", in both cases with
logging via tee -a), which will rebuild the tagfile.
Second usecase: for temporary changes (a patch to be tested):
In this case I use the (deprecated, but not to be scrapped) Mercurial
"mq" extension, which (via a set of subcommands, all of which begin
wih q: hg qnew, hg qrefresh, hg qpop, hg qpush, etc.) allows me to
push a patch, or a set of patches, on top of my working directory,
compile with them on order to test them, and pop them off when
interacting with the remote repository. With the "hg qqueue" command,
which is part of mq, it is possible to manage several independent sets
of patches in parallel.
N.B. The command-line "hg help" command is almost as good as the Vim
help, which coming from me is high praise. Just like Vim help, it can
be used alone for general help, or with a subject name, for help on a
particular subject, in general an hg command or subcommand, but not
only that. I recommend that it be used together with the "pager"
standard extension to Mercurial. (The default pager is "less" but
"view -" is another possibility.)
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 [email protected].
For more options, visit https://groups.google.com/d/optout.