[issue1922] Push to clone also pushes incorrectly to parent (hgwebdir only)

Diego Bonfil Traver bugs at mercurial.selenic.com
Tue Nov 24 07:33:24 CST 2009


New submission from Diego Bonfil Traver <diego at ingesom.com>:

If you have one clone of a repository that has some changesets, then pushing
to that clone served with hgwebdir.cgi causes algo an incorrect push to the
parent repository, leaving it in a broken state (you have to do a recover on
parent repository)

Steps to reproduce:
System: Windows XP + Apache 2.2.9
Mercurial for Windows v1.4 + TortoiseHg v0.9

1) Create HG repository: testbug1

2) Configure hgwebdir.cgi to serve the repository as "bug1"
   [paths]
   bug1 = C:\HG\Test\testbug1

3) Create a clone with http:
   clone1 (http://localhost/hg/Test/hgwebdir.cgi/bug1)

4) On clone1:
   create File1.txt and commit
   try to push to "bug1" -> Error: SSL required
   goto testbug1 and set:
   --------------------------
   [web]
   push_ssl = False
   allow_push = *
   --------------------------
   try to push -> ok
   Go to hgwebdir.cgi page:
   * bug1 hg status -> changed (with previous changeset) --> OK

5) Create local clone of testbug1: testbug2 (but do not update working copy)

6) Configure hgwebdir.cgi to serve the new repository as "bug2"
   [paths]
   bug1 = C:\HG\Test\testbug1
   bug2 = C:\HG\Test\testbug2

7) On clone2:
   delete File1.txt, create File2.txt and commit
   try to push to "bug2" -> Error: SSL required
   goto testbug2 and set:
   --------------------------
   [web]
   push_ssl = False
   allow_push = *
   --------------------------
   try to push -> ok
   Go to hgwebdir.cgi page:
   * bug1 hg status -> changed (with previous changeset) --> NOT EXPECTED!
   * bug2 hg status -> changed (with previous changeset) --> OK

8) Running an hg verify --verbose of the testbug1 repository shows:

   data/File2.txt.i at 1: missing revlog!
   1: empty or missing File2.txt
   File2.txt at 1: 58931210a64d in manifests not found
   3 integrity errors encountered!
   (first damaged changeset appears to be 1)

9) testbug2 repository is ok


---------- WORKAROUND ----------

After clone2 push, inmediately do a RECOVER on testbug1 (all changes from
last "good push" are lost)

Go go clone1, and then push to testbug1 again to leave testbug1 as before

Now you can work as expected, commiting to clone2 and then pushing to
testbug2 does not "fall back incorrectly" to testbug1 repository


---------- FINAL REMARK ----------

This happens again if you create a new clone of the testbug1 repository. You
have to always apply the workaround

Attached is a ZIP file with the repositories at step 9 - without the recover
(testbug1 is broken)

(please note that paths are a little bit different, here I simplified the names)

----------
files: wrongpush.zip
messages: 11048
nosy: ismdiego
priority: urgent
status: unread
title: Push to clone also pushes incorrectly to parent (hgwebdir only)

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue1922>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrongpush.zip
Type: application/zip
Size: 14133 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20091124/1175b47b/attachment.zip>


More information about the Mercurial-devel mailing list