Creating empty revisions by committing and invalid .hgsub file
Angel Ezquerra Moreu
angel.ezquerra at gmail.com
Tue Apr 3 07:13:54 UTC 2012
On Mon, Apr 2, 2012 at 7:43 PM, Matt Mackall <mpm at selenic.com> wrote:
> On Mon, 2012-04-02 at 10:55 +0200, Angel Ezquerra wrote:
>> On Sun, Apr 1, 2012 at 1:31 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
>> > Angel Ezquerra Moreu wrote, On 03/30/2012 08:38 AM:
>> >
>> >> Hi,
>> >>
>> >> today I managed to create several empty revisions by creating a
>> >> malformed .hgsub file.
>> >>
>> [...]
>> >
>> > The problem can not be reproduced on Linux.
>> >
>> > Here Mercurial should have said "committing subrepository include\subrepo"
>> > and .hgsubstate should contain "0000000000000000000000000000000000000000
>> > include\subrepo".
>> >
>> > Please verify that you can reproduce the problem with the latest Mercurial.
>> >
>> [...]
>> >
>> > What do these changesets contain? "hg log -v --debug"?
>> >
>>
>> Mads, thanks for your help.
>>
>> I just ran the test again. I modified my original script so that it
>> explicitly calls the hg executable located on "c:\Program
>> Files\Mercurial", and which shows that the mercurial version is 2.1.1.
>> I also changed the calls to hg log into hg log -v --debug as you
>> requested. The result is the same:
>
> This is probably:
>
> http://mercurial.selenic.com/bts/issue2403
>
> which is fixed on the default branch.
I re-ran the test using the hackable hg package, which was updated to
the latest head of the default branch.
I believe the result is the same:
Microsoft Windows [Versión 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Reservados todos los derechos.
C:\Users\aem>e:
E:\>hg_script2.bat
E:\>e:
E:\>cd e:\
E:\>mkdir test-repo
E:\>cd test-repo
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
--repository "E:\aem\Workspaces\mercurial\hg-hackable" id
21b31e9c20f3 tip
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
--repository "E:\aem\Workspaces\mercurial\hg-hackable" summary
parent: 16347:21b31e9c20f3 tip
merge with stable
branch: default
commit: 3 unknown (clean)
update: (current)
mq: 8 unapplied
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
--version
Mercurial Distributed SCM (version 2.0)
(see http://mercurial.selenic.com for more information)
Copyright (C) 2005-2012 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
init
E:\test-repo>mkdir subrepo
E:\test-repo>cd subrepo
E:\test-repo\subrepo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable
\hg.py" init
E:\test-repo\subrepo>echo test > test.txt
E:\test-repo\subrepo>type test.txt
test
E:\test-repo\subrepo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable
\hg.py" add test.txt
E:\test-repo\subrepo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable
\hg.py" commit -m "added test.txt"
E:\test-repo\subrepo>cd ..
E:\test-repo>echo include\subrepo = include\subrepo > .hgsub
E:\test-repo>type .hgsub
include\subrepo = include\subrepo
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
status
? .hgsub
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
add .hgsub
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
status
A .hgsub
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
commit -m "add subrepo"
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
log -v --debug
changeset: 0:27a976239fd3b9e1f1dac73c08a584e88f1b0239
tag: tip
phase: draft
parent: -1:0000000000000000000000000000000000000000
parent: -1:0000000000000000000000000000000000000000
manifest: 0:95de667a6dedb615cccabb595783606b248d7265
user: aem
date: Tue Apr 03 09:11:01 2012 +0200
files+: .hgsub .hgsubstate
extra: branch=default
description:
add subrepo
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
status
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
commit -m "add subrepo again"
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
commit -m "add subrepo again!"
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
log -v --debug
changeset: 2:e96cbd04fee797c07cee3d9152be0423d078b639
tag: tip
phase: draft
parent: 1:7b535eeeb07cfc4ee044bbdadd9a8cab68a17d12
parent: -1:0000000000000000000000000000000000000000
manifest: 2:734b6dc72796ece5fd8535fbb15dabce3641108e
user: aem
date: Tue Apr 03 09:11:02 2012 +0200
extra: branch=default
description:
add subrepo again!
changeset: 1:7b535eeeb07cfc4ee044bbdadd9a8cab68a17d12
phase: draft
parent: 0:27a976239fd3b9e1f1dac73c08a584e88f1b0239
parent: -1:0000000000000000000000000000000000000000
manifest: 1:77811a15fdbf02a5906e584ba00ab8f5ac74b093
user: aem
date: Tue Apr 03 09:11:02 2012 +0200
extra: branch=default
description:
add subrepo again
changeset: 0:27a976239fd3b9e1f1dac73c08a584e88f1b0239
phase: draft
parent: -1:0000000000000000000000000000000000000000
parent: -1:0000000000000000000000000000000000000000
manifest: 0:95de667a6dedb615cccabb595783606b248d7265
user: aem
date: Tue Apr 03 09:11:01 2012 +0200
files+: .hgsub .hgsubstate
extra: branch=default
description:
add subrepo
E:\test-repo>del .hgsub
E:\test-repo>echo include/subrepo = include/subrepo > .hgsub
E:\test-repo>type .hgsub
include/subrepo = include/subrepo
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
status
M .hgsub
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
commit -m "fixed .hgsub"
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
commit -m "commit again"
nothing changed
E:\test-repo>c:\python26\python "E:\aem\Workspaces\mercurial\hg-hackable\hg.py"
log -v --debug
changeset: 3:8ecc0159168072a1447130aab8b86bebff04e340
tag: tip
phase: draft
parent: 2:e96cbd04fee797c07cee3d9152be0423d078b639
parent: -1:0000000000000000000000000000000000000000
manifest: 3:33ecd98bd8309ff59af110b3d8bdcd04459f6848
user: aem
date: Tue Apr 03 09:11:03 2012 +0200
files: .hgsub
extra: branch=default
description:
fixed .hgsub
changeset: 2:e96cbd04fee797c07cee3d9152be0423d078b639
phase: draft
parent: 1:7b535eeeb07cfc4ee044bbdadd9a8cab68a17d12
parent: -1:0000000000000000000000000000000000000000
manifest: 2:734b6dc72796ece5fd8535fbb15dabce3641108e
user: aem
date: Tue Apr 03 09:11:02 2012 +0200
extra: branch=default
description:
add subrepo again!
changeset: 1:7b535eeeb07cfc4ee044bbdadd9a8cab68a17d12
phase: draft
parent: 0:27a976239fd3b9e1f1dac73c08a584e88f1b0239
parent: -1:0000000000000000000000000000000000000000
manifest: 1:77811a15fdbf02a5906e584ba00ab8f5ac74b093
user: aem
date: Tue Apr 03 09:11:02 2012 +0200
extra: branch=default
description:
add subrepo again
changeset: 0:27a976239fd3b9e1f1dac73c08a584e88f1b0239
phase: draft
parent: -1:0000000000000000000000000000000000000000
parent: -1:0000000000000000000000000000000000000000
manifest: 0:95de667a6dedb615cccabb595783606b248d7265
user: aem
date: Tue Apr 03 09:11:01 2012 +0200
files+: .hgsub .hgsubstate
extra: branch=default
description:
add subrepo
One weird thing is that hg version reports 2.0, although hg summary on
the hg-hackable repo shows that I am at
21b31e9c20f3617f47db8ebc91d1ccf60055aca5.
Cheers,
Angel
More information about the Mercurial
mailing list