[PATCH] subrepo: avoids empty commit when .hgsubstate is dirty (issue2403)
Erik Zielke
ez at aragost.com
Fri Dec 17 02:48:11 CST 2010
fre, 17 12 2010 kl. 03:38 +0100, skrev Mads Kiilerich:
> Erik Zielke wrote, On 11/29/2010 09:38 AM:
> > # HG changeset patch
> > # User Erik Zielke<ez at aragost.com>
> > # Date 1291019843 -3600
> > # Node ID b1bcf90cb59e3c92708acd5d894ed65d8a3cd30b
> > # Parent da69a1597285fe25eeedab1a45869487773b715b
> > subrepo: avoids empty commit when .hgsubstate is dirty (issue2403)
>
> Combining an (otherwise) ignored dirty .hgsubstate still gives some
> strange results:
>
> diff --git a/tests/test-subrepo-empty-commit.t
> b/tests/test-subrepo-empty-commit.t
> --- a/tests/test-subrepo-empty-commit.t
> +++ b/tests/test-subrepo-empty-commit.t
> @@ -28,6 +28,34 @@
> nothing changed
> [1]
>
> +but this looks suspicious:
> +
> + $ hg id sub
> + 5bbc614a5b06 tip
> + $ echo c1b > f1
> + $ hg commit -m1
> + committing subrepository sub
> + $ hg log -p -r tip
> + changeset: 1:c377c139cf3c
> + tag: tip
> + user: test
> + date: Thu Jan 01 00:00:00 1970 +0000
> + summary: 1
> +
> + diff -r 853ea21970bb -r c377c139cf3c .hgsubstate
> + --- a/.hgsubstate Thu Jan 01 00:00:00 1970 +0000
> + +++ b/.hgsubstate Thu Jan 01 00:00:00 1970 +0000
> + @@ -1,1 +1,1 @@
> + -5bbc614a5b06ad7f3bf7c2463d74b005324f34c1 sub
> + +0000000000000000000000000000000000000000 sub
> + diff -r 853ea21970bb -r c377c139cf3c f1
> + --- a/f1 Thu Jan 01 00:00:00 1970 +0000
> + +++ b/f1 Thu Jan 01 00:00:00 1970 +0000
> + @@ -1,1 +1,1 @@
> + -c1
> + +c1b
> +
> +
> an okay update of .hgsubstate
> $ cd sub
> $ echo c3 > f2
> @@ -49,7 +77,7 @@
> committing subrepository sub
> $ echo '0000000000000000000000000000000000000000 sub' > .hgsubstate
> $ hg diff --nodates
> - diff -r 41e1dee3d5d9 .hgsubstate
> + diff -r b52e776d6fc4 .hgsubstate
> --- a/.hgsubstate
> +++ b/.hgsubstate
> @@ -1,1 +1,1 @@
>
>
> Is that correct and intended?
>
No, its not, should I just resend the patch with fixes or is the
procedure different when a patch is queued?
> /Mads
More information about the Mercurial-devel
mailing list