Patchwork D4810: repository: introduce an ellipses repo requirement

login
register
mail settings
Submitter phabricator
Date Sept. 30, 2018, 12:04 a.m.
Message ID <differential-rev-PHID-DREV-edtzenlpqwkv74bzal5x-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/35205/
State New
Headers show

Comments

phabricator - Sept. 30, 2018, 12:04 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Right now there is no good way to check whether a repo is ellipses enabled or
  not. This patch introduces a ellipses repo requirement which will be used in
  upcoming patches.
  
  I have purposefully not included narrow in the requirement name because now they
  are looking different concepts to me.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4810

AFFECTED FILES
  mercurial/repository.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel
phabricator - Oct. 1, 2018, 12:01 a.m.
martinvonz added inline comments.

INLINE COMMENTS

> repository.py:22-24
> +# When ellipses and shallowing is finalized and the UI is done, there are no
> +# more edge cases where things don't work. This should be generalised to shallow
> +# or ellipses

I'm not sure I understand what this says.

The first sentence sounds too obvious to mention (kind of like "when it's done, it should be working well"), but I suspect you mean something else. Do you mean that that's the criteria for dropping the "exp-" prefix (much like the comment for narrow says above)?

I don't know what the second sentence says either. Isn't it already generalized to shallow and ellipses?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4810

To: pulkit, #hg-reviewers
Cc: martinvonz, mercurial-devel
phabricator - Oct. 1, 2018, 12:09 a.m.
pulkit added inline comments.

INLINE COMMENTS

> martinvonz wrote in repository.py:22-24
> I'm not sure I understand what this says.
> 
> The first sentence sounds too obvious to mention (kind of like "when it's done, it should be working well"), but I suspect you mean something else. Do you mean that that's the criteria for dropping the "exp-" prefix (much like the comment for narrow says above)?
> 
> I don't know what the second sentence says either. Isn't it already generalized to shallow and ellipses?

Yeah, the intent was to say the same thing as the comment about NARROW_REQUIREMENT says but re-reading myself, looks like I messed up. I will update this.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4810

To: pulkit, #hg-reviewers
Cc: martinvonz, mercurial-devel
phabricator - Oct. 1, 2018, 4:02 p.m.
pulkit planned changes to this revision.
pulkit added a comment.


  Let's do this step by step and get the wireprotocol command reviewed first. Once that is done, I will resend this one.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4810

To: pulkit, #hg-reviewers
Cc: martinvonz, mercurial-devel
phabricator - Oct. 1, 2018, 4:56 p.m.
indygreg added a comment.


  New requirements should be documented in `help/internals/requirements.txt`.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4810

To: pulkit, #hg-reviewers
Cc: indygreg, martinvonz, mercurial-devel
phabricator - Oct. 17, 2018, 10:40 p.m.
martinvonz added a comment.


  I think this patch (and later patches that start using it, of course) would be a good idea. I suppose it won't make it into 4.8, but we don't have a freeze, so please send an updated version whenever you have time

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4810

To: pulkit, #hg-reviewers
Cc: indygreg, martinvonz, mercurial-devel

Patch

diff --git a/mercurial/repository.py b/mercurial/repository.py
--- a/mercurial/repository.py
+++ b/mercurial/repository.py
@@ -19,6 +19,11 @@ 
 # we should move this to just "narrow" or similar.
 NARROW_REQUIREMENT = 'narrowhg-experimental'
 
+# When ellipses and shallowing is finalized and the UI is done, there are no
+# more edge cases where things don't work. This should be generalised to shallow
+# or ellipses
+ELLIPSES_REQUIREMENT = 'exp-ellipses'
+
 # Local repository feature string.
 
 # Revlogs are being used for file storage.