why is fetch unloved
Tony Mechelynck
antoine.mechelynck at gmail.com
Sat Nov 3 04:11:12 UTC 2018
On Fri, Nov 2, 2018 at 10:31 PM Augie Fackler <raf at durin42.com> wrote:
>
>
>
> > On Nov 2, 2018, at 16:20, Uwe Brauer <oub at mat.ucm.es> wrote:
> >
> >>>> "Augie" == Augie Fackler <raf at durin42.com> writes:
> >
> >>> Perhaps because it may implicitly run a "hg merge" command? And this --
> >>> at least in my book -- should only be done by people knowing what they
> >>> are doing.
> >>>
> >>> Just guessing, though.
> >
> >> Yep, that's pretty much it.
> >
> > Well, I agree in principle, but on the other hand, if you use mercurial
> > not for a software project, but for document sharing, you may find
> > users, who are either unwilling or unable to really learn mercurial. I
> > recently had several issues with my collaborators, because they pulled
> > but forgot to merge and couldn't push. For these users, I think fetch is
> > a great help, besides (no flamewar intended), but doesn't git do
> > precisely this, that is:
> >
> > Isn't «git pull» basically a «hg fetch»?
>
> Yes, and I've heard regular advice to never run `git pull` from git enthusiasts for exactly this reason, or if you insist to always use `git pull --rebase`.
I always use "hg fetch" on the Vim hg mirror even though I've been
told that that extension is now "deprecated" (but also that for
backward compatibility reasons it isn't scheduled for removal), and I
think I know what I'm doing:
* I always pull (well, fetch) and never push. I don't have push
permissions anyway. When I have a proposed patch (which I make ready
using the mq extension, another "deprecated" extension IIUC) I send
the diff by email to the maintainer. (If there were a Bugzilla I would
attach it to a bug report.)
* I have a few "home changes" which I've put out of the way of the
most frequent changes, in .hgignore, src/feature.h, and to create an
additional target in the src/Makefile
* Of the changes in .hgignore, most are for files and directories not
present on the remote and which are part of my compilation process,
but one is an added line for a file present on the remote, but which
is regenerated by "make install". Old versions of Mercurial used to
notice that and cleanly asked me (when it was changed on the remote)
if I wanted to use the remote's changes or keep the file deleted. Now
the merge part of hg fetch errors out when there are changes to that
file, unless I delete it on my local clone before fetching, and after
such an error I have to delete the file then merge manually. I
submitted a bug about that some years ago but I don't have the bug
number at hand.
Best regards,
Tony.
More information about the Mercurial
mailing list