Re: [PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
On Thu, 7 Dec 2017 11:54:00 -0600, Kevin Bullock wrote: > > I think "make hg recurse subrepos by default" is a noticeable BC since > > we'll have to specify --no-subrepo to get files in the root repository, for > > example. > > We wouldn't need to grow a flag for that, a fileset could do it: `hg status > -X 'set:insubrepo()'` Yes, that's nicer than a flag. But my points is you'll be surprised if "hg files" suddenly starts showing all files including subrepos if you are accustomed to the current subrepo behavior. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
> On Dec 7, 2017, at 07:43, Yuya Nishiharawrote: > > On Wed, 6 Dec 2017 11:26:13 -0600, Kevin Bullock wrote: >>> On Dec 4, 2017, at 08:47, Yuya Nishihara wrote: >>> >>> On Sun, 03 Dec 2017 12:55:36 -0500, Matt Harbison wrote: >>> This is as good a place as any to ask- when do we follow through on the Subrepo Grand Plan? [1] It seems that the long term plan was to always recurse by default, and this -S stuff was a bandaid for issues resolved long ago. I wouldn't do it this cycle, given that we are have way through. There are probably a few things that might need fixing first. (I'm thinking `hg serve --web-conf` doesn't know how to recurse, and I'm sure there are a couple of other odd cases.) Maybe we will want an experimental flag to ease into it. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2011-October/034816.html >>> >>> The grand plan sounds like a big BC since we have 6-year history of the >>> current >>> subrepo behavior. >> >> I don't immediately see anything in that grand plan that breaks >> compatibility in any way that matters. It would be awfully nice to finally >> finish integrating subrepos into the UI. > > I think "make hg recurse subrepos by default" is a noticeable BC since > we'll have to specify --no-subrepo to get files in the root repository, for > example. We wouldn't need to grow a flag for that, a fileset could do it: `hg status -X 'set:insubrepo()'` pacem in terris / мир / शान्ति / سَلاَم / 平和 Kevin R. Bullock ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
On Wed, 6 Dec 2017 11:26:13 -0600, Kevin Bullock wrote: > > On Dec 4, 2017, at 08:47, Yuya Nishiharawrote: > > > > On Sun, 03 Dec 2017 12:55:36 -0500, Matt Harbison wrote: > > > >> This is as good a place as any to ask- when do we follow through on the > >> Subrepo Grand Plan? [1] It seems that the long term plan was to always > >> recurse by default, and this -S stuff was a bandaid for issues resolved > >> long ago. I wouldn't do it this cycle, given that we are have way > >> through. There are probably a few things that might need fixing first. > >> (I'm thinking `hg serve --web-conf` doesn't know how to recurse, and I'm > >> sure there are a couple of other odd cases.) Maybe we will want an > >> experimental flag to ease into it. > >> > >> [1] > >> https://www.mercurial-scm.org/pipermail/mercurial-devel/2011-October/034816.html > > > > The grand plan sounds like a big BC since we have 6-year history of the > > current > > subrepo behavior. > > I don't immediately see anything in that grand plan that breaks compatibility > in any way that matters. It would be awfully nice to finally finish > integrating subrepos into the UI. I think "make hg recurse subrepos by default" is a noticeable BC since we'll have to specify --no-subrepo to get files in the root repository, for example. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
> On Dec 4, 2017, at 08:47, Yuya Nishiharawrote: > > On Sun, 03 Dec 2017 12:55:36 -0500, Matt Harbison wrote: > >> This is as good a place as any to ask- when do we follow through on the >> Subrepo Grand Plan? [1] It seems that the long term plan was to always >> recurse by default, and this -S stuff was a bandaid for issues resolved >> long ago. I wouldn't do it this cycle, given that we are have way >> through. There are probably a few things that might need fixing first. >> (I'm thinking `hg serve --web-conf` doesn't know how to recurse, and I'm >> sure there are a couple of other odd cases.) Maybe we will want an >> experimental flag to ease into it. >> >> [1] >> https://www.mercurial-scm.org/pipermail/mercurial-devel/2011-October/034816.html > > The grand plan sounds like a big BC since we have 6-year history of the > current > subrepo behavior. I don't immediately see anything in that grand plan that breaks compatibility in any way that matters. It would be awfully nice to finally finish integrating subrepos into the UI. pacem in terris / мир / शान्ति / سَلاَم / 平和 Kevin R. Bullock ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
On Sun, 03 Dec 2017 12:55:36 -0500, Matt Harbison wrote: > On Sun, 03 Dec 2017 05:22:51 -0500, Yuya Nishiharawrote: > > On Sun, 26 Nov 2017 19:26:24 +0900, Yuya Nishihara wrote: > >> Git subrepositories only support exact file matches. Subversion > >> subrepositories are currently ignored. > > > > Oh, subrepos. "cat" is recursive by default, but "files" and friends > > aren't. > > Is this a bug of "cat"? > > Seems like it. I fixed "files" in 97175d9bf7cf to not recurse by > default. I think the issue here is the matcher is .always(), so the > subdirmatcher is also .always(). Seems like another argument for the > single ctx.walksub() you proposed, because there are probably several ways > these cmdutil functions are trying to do the same thing. Okay, thanks. Let's add a utility function to test "m.exact(subpath) or any(submatch.files())", not "m.visitdir(subpath)". > This is as good a place as any to ask- when do we follow through on the > Subrepo Grand Plan? [1] It seems that the long term plan was to always > recurse by default, and this -S stuff was a bandaid for issues resolved > long ago. I wouldn't do it this cycle, given that we are have way > through. There are probably a few things that might need fixing first. > (I'm thinking `hg serve --web-conf` doesn't know how to recurse, and I'm > sure there are a couple of other odd cases.) Maybe we will want an > experimental flag to ease into it. > > [1] > https://www.mercurial-scm.org/pipermail/mercurial-devel/2011-October/034816.html The grand plan sounds like a big BC since we have 6-year history of the current subrepo behavior. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
On Sun, 03 Dec 2017 05:22:51 -0500, Yuya Nishiharawrote: On Sun, 26 Nov 2017 19:26:24 +0900, Yuya Nishihara wrote: On Sat, 25 Nov 2017 23:37:16 -0500, Matt Harbison wrote: > On Sat, 25 Nov 2017 02:35:03 -0500, Yuya Nishihara wrote: > > > # HG changeset patch > > # User Yuya Nishihara > > # Date 1511591374 -32400 > > # Sat Nov 25 15:29:34 2017 +0900 > > # Node ID 38e952030f0c4746257280d47f0f94b6cb9ddb41 > > # Parent 8287df8b7be545fdafa22b771012ac65f6264d12 > > cat: record the current behavior of wildcard matches in subrepos > > > > It appears that Mercurial subrepo supports any match patterns. > > > > diff --git a/mercurial/help/subrepos.txt b/mercurial/help/subrepos.txt > > --- a/mercurial/help/subrepos.txt > > +++ b/mercurial/help/subrepos.txt > > @@ -90,7 +90,7 @@ Interaction with Mercurial Commands > > :archive: archive does not recurse in subrepositories unless > > -S/--subrepos is specified. > > -:cat: cat currently only handles exact file matches in subrepos. > > +:cat: cat currently only handles exact file matches in Git subrepos. > > Should this be "cat currently only handles pattern matches in Mercurial > subrepos"? The test above this new inexact match test is for an exact hg > match. Git bails early on m.anypats(). Hmm, how about this? Git subrepositories only support exact file matches. Subversion subrepositories are currently ignored. Oh, subrepos. "cat" is recursive by default, but "files" and friends aren't. Is this a bug of "cat"? Seems like it. I fixed "files" in 97175d9bf7cf to not recurse by default. I think the issue here is the matcher is .always(), so the subdirmatcher is also .always(). Seems like another argument for the single ctx.walksub() you proposed, because there are probably several ways these cmdutil functions are trying to do the same thing. This is as good a place as any to ask- when do we follow through on the Subrepo Grand Plan? [1] It seems that the long term plan was to always recurse by default, and this -S stuff was a bandaid for issues resolved long ago. I wouldn't do it this cycle, given that we are have way through. There are probably a few things that might need fixing first. (I'm thinking `hg serve --web-conf` doesn't know how to recurse, and I'm sure there are a couple of other odd cases.) Maybe we will want an experimental flag to ease into it. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2011-October/034816.html $ hg files 'glob:**' .hgsub .hgsubstate $ hg cat -T '{path}\n' 'glob:**' .hgsub .hgsubstate sub/file ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
On Sun, 26 Nov 2017 19:26:24 +0900, Yuya Nishihara wrote: > On Sat, 25 Nov 2017 23:37:16 -0500, Matt Harbison wrote: > > On Sat, 25 Nov 2017 02:35:03 -0500, Yuya Nishiharawrote: > > > > > # HG changeset patch > > > # User Yuya Nishihara > > > # Date 1511591374 -32400 > > > # Sat Nov 25 15:29:34 2017 +0900 > > > # Node ID 38e952030f0c4746257280d47f0f94b6cb9ddb41 > > > # Parent 8287df8b7be545fdafa22b771012ac65f6264d12 > > > cat: record the current behavior of wildcard matches in subrepos > > > > > > It appears that Mercurial subrepo supports any match patterns. > > > > > > diff --git a/mercurial/help/subrepos.txt b/mercurial/help/subrepos.txt > > > --- a/mercurial/help/subrepos.txt > > > +++ b/mercurial/help/subrepos.txt > > > @@ -90,7 +90,7 @@ Interaction with Mercurial Commands > > > :archive: archive does not recurse in subrepositories unless > > > -S/--subrepos is specified. > > > -:cat: cat currently only handles exact file matches in subrepos. > > > +:cat: cat currently only handles exact file matches in Git subrepos. > > > > Should this be "cat currently only handles pattern matches in Mercurial > > subrepos"? The test above this new inexact match test is for an exact hg > > match. Git bails early on m.anypats(). > > Hmm, how about this? > > Git subrepositories only support exact file matches. Subversion > subrepositories are currently ignored. Oh, subrepos. "cat" is recursive by default, but "files" and friends aren't. Is this a bug of "cat"? $ hg files 'glob:**' .hgsub .hgsubstate $ hg cat -T '{path}\n' 'glob:**' .hgsub .hgsubstate sub/file ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
On Tue, 28 Nov 2017 14:02:28 -0500, Augie Fackler wrote: > On Sun, Nov 26, 2017 at 07:55:29PM -0500, Matt Harbison wrote: > > On Sun, 26 Nov 2017 05:26:24 -0500, Yuya Nishiharawrote: > > > > > On Sat, 25 Nov 2017 23:37:16 -0500, Matt Harbison wrote: > > > > On Sat, 25 Nov 2017 02:35:03 -0500, Yuya Nishihara > > > > wrote: > > > > > > > > > # HG changeset patch > > > > > # User Yuya Nishihara > > > > > # Date 1511591374 -32400 > > > > > # Sat Nov 25 15:29:34 2017 +0900 > > > > > # Node ID 38e952030f0c4746257280d47f0f94b6cb9ddb41 > > > > > # Parent 8287df8b7be545fdafa22b771012ac65f6264d12 > > > > > cat: record the current behavior of wildcard matches in subrepos > > > > > > > > > > It appears that Mercurial subrepo supports any match patterns. > > > > > > > > > > diff --git a/mercurial/help/subrepos.txt b/mercurial/help/subrepos.txt > > > > > --- a/mercurial/help/subrepos.txt > > > > > +++ b/mercurial/help/subrepos.txt > > > > > @@ -90,7 +90,7 @@ Interaction with Mercurial Commands > > > > > :archive: archive does not recurse in subrepositories unless > > > > > -S/--subrepos is specified. > > > > > -:cat: cat currently only handles exact file matches in subrepos. > > > > > +:cat: cat currently only handles exact file matches in Git subrepos. > > > > > > > > Should this be "cat currently only handles pattern matches in Mercurial > > > > subrepos"? The test above this new inexact match test is for an > > > > exact hg > > > > match. Git bails early on m.anypats(). > > > > > > Hmm, how about this? > > > > > > Git subrepositories only support exact file matches. Subversion > > > subrepositories are currently ignored. > > > > > > What I wanted to say is Git support is limited. > > > > That sounds good to me, thanks. > > Should I be looking for a v2 of this, or is this ready to go? I'll send V2. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
On Sun, Nov 26, 2017 at 07:55:29PM -0500, Matt Harbison wrote: > On Sun, 26 Nov 2017 05:26:24 -0500, Yuya Nishiharawrote: > > > On Sat, 25 Nov 2017 23:37:16 -0500, Matt Harbison wrote: > > > On Sat, 25 Nov 2017 02:35:03 -0500, Yuya Nishihara > > > wrote: > > > > > > > # HG changeset patch > > > > # User Yuya Nishihara > > > > # Date 1511591374 -32400 > > > > # Sat Nov 25 15:29:34 2017 +0900 > > > > # Node ID 38e952030f0c4746257280d47f0f94b6cb9ddb41 > > > > # Parent 8287df8b7be545fdafa22b771012ac65f6264d12 > > > > cat: record the current behavior of wildcard matches in subrepos > > > > > > > > It appears that Mercurial subrepo supports any match patterns. > > > > > > > > diff --git a/mercurial/help/subrepos.txt b/mercurial/help/subrepos.txt > > > > --- a/mercurial/help/subrepos.txt > > > > +++ b/mercurial/help/subrepos.txt > > > > @@ -90,7 +90,7 @@ Interaction with Mercurial Commands > > > > :archive: archive does not recurse in subrepositories unless > > > > -S/--subrepos is specified. > > > > -:cat: cat currently only handles exact file matches in subrepos. > > > > +:cat: cat currently only handles exact file matches in Git subrepos. > > > > > > Should this be "cat currently only handles pattern matches in Mercurial > > > subrepos"? The test above this new inexact match test is for an > > > exact hg > > > match. Git bails early on m.anypats(). > > > > Hmm, how about this? > > > > Git subrepositories only support exact file matches. Subversion > > subrepositories are currently ignored. > > > > What I wanted to say is Git support is limited. > > That sounds good to me, thanks. Should I be looking for a v2 of this, or is this ready to go? > ___ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
On Sun, 26 Nov 2017 05:26:24 -0500, Yuya Nishiharawrote: On Sat, 25 Nov 2017 23:37:16 -0500, Matt Harbison wrote: On Sat, 25 Nov 2017 02:35:03 -0500, Yuya Nishihara wrote: > # HG changeset patch > # User Yuya Nishihara > # Date 1511591374 -32400 > # Sat Nov 25 15:29:34 2017 +0900 > # Node ID 38e952030f0c4746257280d47f0f94b6cb9ddb41 > # Parent 8287df8b7be545fdafa22b771012ac65f6264d12 > cat: record the current behavior of wildcard matches in subrepos > > It appears that Mercurial subrepo supports any match patterns. > > diff --git a/mercurial/help/subrepos.txt b/mercurial/help/subrepos.txt > --- a/mercurial/help/subrepos.txt > +++ b/mercurial/help/subrepos.txt > @@ -90,7 +90,7 @@ Interaction with Mercurial Commands > :archive: archive does not recurse in subrepositories unless > -S/--subrepos is specified. > -:cat: cat currently only handles exact file matches in subrepos. > +:cat: cat currently only handles exact file matches in Git subrepos. Should this be "cat currently only handles pattern matches in Mercurial subrepos"? The test above this new inexact match test is for an exact hg match. Git bails early on m.anypats(). Hmm, how about this? Git subrepositories only support exact file matches. Subversion subrepositories are currently ignored. What I wanted to say is Git support is limited. That sounds good to me, thanks. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
On Sat, 25 Nov 2017 23:37:16 -0500, Matt Harbison wrote: > On Sat, 25 Nov 2017 02:35:03 -0500, Yuya Nishiharawrote: > > > # HG changeset patch > > # User Yuya Nishihara > > # Date 1511591374 -32400 > > # Sat Nov 25 15:29:34 2017 +0900 > > # Node ID 38e952030f0c4746257280d47f0f94b6cb9ddb41 > > # Parent 8287df8b7be545fdafa22b771012ac65f6264d12 > > cat: record the current behavior of wildcard matches in subrepos > > > > It appears that Mercurial subrepo supports any match patterns. > > > > diff --git a/mercurial/help/subrepos.txt b/mercurial/help/subrepos.txt > > --- a/mercurial/help/subrepos.txt > > +++ b/mercurial/help/subrepos.txt > > @@ -90,7 +90,7 @@ Interaction with Mercurial Commands > > :archive: archive does not recurse in subrepositories unless > > -S/--subrepos is specified. > > -:cat: cat currently only handles exact file matches in subrepos. > > +:cat: cat currently only handles exact file matches in Git subrepos. > > Should this be "cat currently only handles pattern matches in Mercurial > subrepos"? The test above this new inexact match test is for an exact hg > match. Git bails early on m.anypats(). Hmm, how about this? Git subrepositories only support exact file matches. Subversion subrepositories are currently ignored. What I wanted to say is Git support is limited. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
On Sat, 25 Nov 2017 02:35:03 -0500, Yuya Nishiharawrote: # HG changeset patch # User Yuya Nishihara # Date 1511591374 -32400 # Sat Nov 25 15:29:34 2017 +0900 # Node ID 38e952030f0c4746257280d47f0f94b6cb9ddb41 # Parent 8287df8b7be545fdafa22b771012ac65f6264d12 cat: record the current behavior of wildcard matches in subrepos It appears that Mercurial subrepo supports any match patterns. diff --git a/mercurial/help/subrepos.txt b/mercurial/help/subrepos.txt --- a/mercurial/help/subrepos.txt +++ b/mercurial/help/subrepos.txt @@ -90,7 +90,7 @@ Interaction with Mercurial Commands :archive: archive does not recurse in subrepositories unless -S/--subrepos is specified. -:cat: cat currently only handles exact file matches in subrepos. +:cat: cat currently only handles exact file matches in Git subrepos. Should this be "cat currently only handles pattern matches in Mercurial subrepos"? The test above this new inexact match test is for an exact hg match. Git bails early on m.anypats(). Subversion subrepositories are currently ignored. :commit: commit creates a consistent snapshot of the state of the diff --git a/tests/test-subrepo.t b/tests/test-subrepo.t --- a/tests/test-subrepo.t +++ b/tests/test-subrepo.t @@ -1071,6 +1071,18 @@ Prepare a repo with subrepo "path": "sub/repo/foo" } ] + + non-exact match: + + $ hg cat -T '{path}\n' 'glob:**' + .hgsub + .hgsubstate + sub/repo/foo (glob) + $ hg cat -T '{path}\n' 're:^sub' + sub/repo/foo (glob) + + missing subrepos in working directory: + $ mkdir -p tmp/sub/repo $ hg cat -r 0 --output tmp/%p_p sub/repo/foo $ cat tmp/sub/repo/foo_p ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 1 of 2] cat: record the current behavior of wildcard matches in subrepos
# HG changeset patch # User Yuya Nishihara# Date 1511591374 -32400 # Sat Nov 25 15:29:34 2017 +0900 # Node ID 38e952030f0c4746257280d47f0f94b6cb9ddb41 # Parent 8287df8b7be545fdafa22b771012ac65f6264d12 cat: record the current behavior of wildcard matches in subrepos It appears that Mercurial subrepo supports any match patterns. diff --git a/mercurial/help/subrepos.txt b/mercurial/help/subrepos.txt --- a/mercurial/help/subrepos.txt +++ b/mercurial/help/subrepos.txt @@ -90,7 +90,7 @@ Interaction with Mercurial Commands :archive: archive does not recurse in subrepositories unless -S/--subrepos is specified. -:cat: cat currently only handles exact file matches in subrepos. +:cat: cat currently only handles exact file matches in Git subrepos. Subversion subrepositories are currently ignored. :commit: commit creates a consistent snapshot of the state of the diff --git a/tests/test-subrepo.t b/tests/test-subrepo.t --- a/tests/test-subrepo.t +++ b/tests/test-subrepo.t @@ -1071,6 +1071,18 @@ Prepare a repo with subrepo "path": "sub/repo/foo" } ] + + non-exact match: + + $ hg cat -T '{path}\n' 'glob:**' + .hgsub + .hgsubstate + sub/repo/foo (glob) + $ hg cat -T '{path}\n' 're:^sub' + sub/repo/foo (glob) + + missing subrepos in working directory: + $ mkdir -p tmp/sub/repo $ hg cat -r 0 --output tmp/%p_p sub/repo/foo $ cat tmp/sub/repo/foo_p ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel