<div dir="ltr"><br><br><div class="gmail_quote">On Mon, May 4, 2015 at 12:27 PM Adrian Buehlmann <<a href="mailto:adrian@cadifra.com">adrian@cadifra.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2015-05-04 20:27, Drew Gottlieb wrote:<br>
> # HG changeset patch<br>
> # User Drew Gottlieb <<a href="mailto:drgott@google.com" target="_blank">drgott@google.com</a>><br>
> # Date 1429641493 25200<br>
> #      Tue Apr 21 11:38:13 2015 -0700<br>
> # Node ID 85c369520dd97bad369a0c4b924597f9e720077b<br>
> # Parent  3f86e3b2548def52732e1f782e89297db8075e8b<br>
> requires: write requires file on commit<br>
><br>
> Writing the requires file on commit makes it possible for changes to a<br>
> repo's config to enable features that affect the repo's requirements. An<br>
> example of this would be enabling manifestv2 in the future, which would then<br>
> have future commits be written with the new manifest format, making it<br>
> necessary for the requires file to indicate this.<br>
><br>
> This change also modifies test-inherit-mode to expect the requires file's<br>
> mode to inherit from the store's mode after a commit. Previously, it only<br>
> inherited from the store's mode on repo init, and the test assumed it would<br>
> never be touched after this point.<br>
><br>
> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py<br>
> --- a/mercurial/localrepo.py<br>
> +++ b/mercurial/localrepo.py<br>
> @@ -1602,6 +1602,7 @@<br>
>                  #<br>
>                  # if minimal phase was 0 we don't need to retract anything<br>
>                  phases.retractboundary(self, tr, targetphase, [n])<br>
> +            self._writerequirements()<br>
>              tr.close()<br>
>              branchmap.updatecache(self.filtered('served'))<br>
>              return n<br>
> diff --git a/tests/test-inherit-mode.t b/tests/test-inherit-mode.t<br>
> --- a/tests/test-inherit-mode.t<br>
> +++ b/tests/test-inherit-mode.t<br>
> @@ -70,7 +70,7 @@<br>
>    00660 ./.hg/cache/rbc-revs-v1<br>
>    00660 ./.hg/dirstate<br>
>    00660 ./.hg/last-message.txt<br>
> -  00600 ./.hg/requires<br>
> +  00660 ./.hg/requires<br>
>    00770 ./.hg/store/<br>
>    00660 ./.hg/store/00changelog.i<br>
>    00660 ./.hg/store/00manifest.i<br>
<br>
This sounds pretty scary...<br>
<br>
I think repository readers today can safely assume that the requires<br>
file is not changed any more after they have first seen it. Somebody<br>
might be actually doing that already and indeed depend on that assumption.<br>
<br>
At least, this might be quite a big surprise.<br></blockquote><div><br></div><div>What kind of repository readers are you thinking of? A command server? Tortoise? Or even something the user doesn't know is running? One alternative is of course to not allow upgrades. Any other alternatives?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
Mercurial-devel mailing list<br>
<a href="mailto:Mercurial-devel@selenic.com" target="_blank">Mercurial-devel@selenic.com</a><br>
<a href="http://selenic.com/mailman/listinfo/mercurial-devel" target="_blank">http://selenic.com/mailman/listinfo/mercurial-devel</a><br>
</blockquote></div></div>