https://bz.mercurial-scm.org/show_bug.cgi?id=6528

            Bug ID: 6528
           Summary: hg serve causes files to be marked as modified after
                    clone
           Product: Mercurial
           Version: 5.8
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzi...@mercurial-scm.org
          Reporter: g...@reaperworld.com
                CC: mercurial-devel@mercurial-scm.org
    Python Version: ---

There was a lot of discussion on this in #mercurial on freenode but I'll do my
best to summarize it. I don't expect this issue to be widespread as based on
the commit I bisected too, it sounds like the patch just wasn't ready for some
of the crazy stuff that has happened in the pidgin repository as it went from
cvs -> svn -> mtn -> hg with some manual patching in between some of those
steps as well.

I was bootstrapping a Google Summer of Code student today and noticed that
there were more modified files in the repository than there should have been.
26 files in fact that are very old and haven't been touched in a long time.

I had created the repo from them using `hg init
ssh://keep.imfreedom.org/prateek/pidgin` and then pushed a fresh clone of
https://keep.imfreedom.org/pidgin/pidgin into it. keep.imfreedom.org is running
my hgkeeper servering solution for mercurial. While I did all of this, keep was
running hg 5.8.

Anyways, I just did a commit by specifying the files we changed and then
started debugging where these files came from. (This is important for later).

I started trying to clone from other machines thinking it was something local
at first. Interestingly enough, our mac build agent running hg 5.3.2 with
python 2.7.17 never reproduced the issue, but a linux machine running hg 4.8.2
with python 2.7.18 did. I had a few others try with various combinations and
all of them reproduced the issue as well, 26 modified files after a clone.
However, Zash in #mercurial only saw 25 modified files.

I ended up creating a tarball of the main pidgin repo which is currently
available at https://data.imfreedom.org/pidgin/pidgin-raw.tar.xz. Using the raw
repo I did a local directory clone `hg clone pidgin-raw pidgin-local` and
verified the issue was not present. I then served the repo with `hg --cwd
pidgin-raw serve` and cloned it with `hg clone http://localhost:8000
pidgin-local` and verified the issue was present.

With that data point in hand I downgraded my local hg to 5.7.1 and performed
the same test. This time, both clone did not express the issue. I then
downgraded hg on keep to 5.7.1 and have been unable to reproduce for any
non-poisoned repo there. I say non-poisoned because the repo I created for the
GSoC student still shows the modified files on a fresh clone even with 5.7.1. 
That repo is https://keep.imfreedom.org/prateek/pidgin.

I then bisected starting with tag:5.7.1 marked as good and tag:5.8 marked as
bad. During each step, I ran `pip install -U --user .` in the hg source
directory. After installation, I served a clean repo with `hg serve` and clone
it with `hg clone http://localhost:8000 local` until bisect identified revision
https://www.mercurial-scm.org/repo/hg/rev/49fd21f32695. The description seems
like a likely candidated, but mharbison in #mercurial hasn't been able to
reproduce on that revision.

So as of right now, I have hg 5.7.1 running on keep.imfreedom.org to stop the
spread of the poison repos.  The poisoning isn't horrible, but it's not great
either.

So a remote init and push from a poisoned repo results in a poisoned repo. That
is `hg init ssh://foo; hg push ssh://foo`.  However, a local init and push does
not poison. That is `hg init ../foo; hg push ../foo`.  And as you may expect, a
local clone of a poisoned repo poisons the new repo. That is `hg clone .
../foo`.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to