Submitter | Pierre-Yves David |
---|---|
Date | April 14, 2015, 5:04 p.m. |
Message ID | <b36bddb86b281eb6c4ab.1429031089@marginatus.alto.octopoid.net> |
Download | mbox | patch |
Permalink | /patch/8651/ |
State | Accepted |
Headers | show |
Comments
On Tue, Apr 14, 2015 at 10:06 AM Pierre-Yves David < pierre-yves.david@ens-lyon.org> wrote: > # HG changeset patch > # User Pierre-Yves David <pierre-yves.david@fb.com> > # Date 1429026244 14400 > # Tue Apr 14 11:44:04 2015 -0400 > # Node ID b36bddb86b281eb6c4abd631c57eec47f6de5198 > # Parent c229ba58b956c7872af7ed220ad5099ea4a6ecf7 > obsolete: experimental flag to get debug about obsmarkers exchange > > The obsolescence markers exchange is still experimental. We (developer) > need > more information about what is going on. I'm adding an experimental flag > to add > display the amount of data exchanged during bundle2 exchanges. > > diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py > --- a/mercurial/bundle2.py > +++ b/mercurial/bundle2.py > @@ -1215,11 +1215,15 @@ def handlepushkeyreply(op, inpart): > > @parthandler('obsmarkers') > def handleobsmarker(op, inpart): > """add a stream of obsmarkers to the repo""" > tr = op.gettransaction() > - new = op.repo.obsstore.mergemarkers(tr, inpart.read()) > + markerdata = inpart.read() > + if op.ui.config('experimental', 'obsmarkers-exchange-debug', False): > Why a new config instead of the usual --debug flag? > + op.ui.write(('obsmarker-exchange: %i bytes received\n') > + % len(markerdata)) > + new = op.repo.obsstore.mergemarkers(tr, markerdata) > if new: > op.repo.ui.status(_('%i new obsolescence markers\n') % new) > op.records.add('obsmarkers', {'new': new}) > if op.reply is not None: > rpart = op.reply.newpart('reply:obsmarkers') > diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t > --- a/tests/test-obsolete.t > +++ b/tests/test-obsolete.t > @@ -614,10 +614,19 @@ List of both > cda648ca50f50482b7055c0b0c4c117bba6733d9 > 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob) > cdbce2fbb16313928851e97e0d85413f3f7eb77f > ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) > {'user': 'test'} > > #if serve > > +Test the debug output for exchange > +---------------------------------- > + > + $ hg pull ../tmpb --config > 'experimental.obsmarkers-exchange-debug=True' --config > 'experimental.bundle2-exp=True' > + pulling from ../tmpb > + searching for changes > + no changes found > + obsmarker-exchange: 346 bytes received > + > check hgweb does not explode > ==================================== > > $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg > adding changesets > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@selenic.com > http://selenic.com/mailman/listinfo/mercurial-devel >
On 04/14/2015 04:15 PM, Martin von Zweigbergk wrote: > > > On Tue, Apr 14, 2015 at 10:06 AM Pierre-Yves David > <pierre-yves.david@ens-lyon.org <mailto:pierre-yves.david@ens-lyon.org>> > wrote: > > # HG changeset patch > # User Pierre-Yves David <pierre-yves.david@fb.com > <mailto:pierre-yves.david@fb.com>> > # Date 1429026244 14400 > # Tue Apr 14 11:44:04 2015 -0400 > # Node ID b36bddb86b281eb6c4abd631c57eec47f6de5198 > # Parent c229ba58b956c7872af7ed220ad5099ea4a6ecf7 > obsolete: experimental flag to get debug about obsmarkers exchange > > The obsolescence markers exchange is still experimental. We > (developer) need > more information about what is going on. I'm adding an experimental > flag to add > display the amount of data exchanged during bundle2 exchanges. > > diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py > --- a/mercurial/bundle2.py > +++ b/mercurial/bundle2.py > @@ -1215,11 +1215,15 @@ def handlepushkeyreply(op, inpart): > > @parthandler('obsmarkers') > def handleobsmarker(op, inpart): > """add a stream of obsmarkers to the repo""" > tr = op.gettransaction() > - new = op.repo.obsstore.mergemarkers(tr, inpart.read()) > + markerdata = inpart.read() > + if op.ui.config('experimental', 'obsmarkers-exchange-debug', > False): > > > Why a new config instead of the usual --debug flag? I want information about that in every single push/pull operation I'll run. I'm not going run with --debug all the time. It would be in the [devel] section. But this is not a warning so I do not want it into this warning related section.
On Tue, Apr 14, 2015 at 1:24 PM Pierre-Yves David < pierre-yves.david@ens-lyon.org> wrote: > > > On 04/14/2015 04:15 PM, Martin von Zweigbergk wrote: > > > > > > On Tue, Apr 14, 2015 at 10:06 AM Pierre-Yves David > > <pierre-yves.david@ens-lyon.org <mailto:pierre-yves.david@ens-lyon.org>> > > wrote: > > > > # HG changeset patch > > # User Pierre-Yves David <pierre-yves.david@fb.com > > <mailto:pierre-yves.david@fb.com>> > > # Date 1429026244 14400 > > # Tue Apr 14 11:44:04 2015 -0400 > > # Node ID b36bddb86b281eb6c4abd631c57eec47f6de5198 > > # Parent c229ba58b956c7872af7ed220ad5099ea4a6ecf7 > > obsolete: experimental flag to get debug about obsmarkers exchange > > > > The obsolescence markers exchange is still experimental. We > > (developer) need > > more information about what is going on. I'm adding an experimental > > flag to add > > display the amount of data exchanged during bundle2 exchanges. > > > > diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py > > --- a/mercurial/bundle2.py > > +++ b/mercurial/bundle2.py > > @@ -1215,11 +1215,15 @@ def handlepushkeyreply(op, inpart): > > > > @parthandler('obsmarkers') > > def handleobsmarker(op, inpart): > > """add a stream of obsmarkers to the repo""" > > tr = op.gettransaction() > > - new = op.repo.obsstore.mergemarkers(tr, inpart.read()) > > + markerdata = inpart.read() > > + if op.ui.config('experimental', 'obsmarkers-exchange-debug', > > False): > > > > > > Why a new config instead of the usual --debug flag? > > I want information about that in every single push/pull operation I'll > run. I'm not going run with --debug all the time. It would be in the > [devel] section. But this is not a warning so I do not want it into this > warning related section. > Who else than you would enable it? If it's the same set of people who would enable [devel], then maybe it's worth expanding the meaning of that section to include non-warning messages for developers? > > -- > Pierre-Yves David >
On 04/15/2015 02:02 PM, Martin von Zweigbergk wrote: > > > On Tue, Apr 14, 2015 at 1:24 PM Pierre-Yves David > <pierre-yves.david@ens-lyon.org <mailto:pierre-yves.david@ens-lyon.org>> > wrote: > > > > On 04/14/2015 04:15 PM, Martin von Zweigbergk wrote: > > > > > > On Tue, Apr 14, 2015 at 10:06 AM Pierre-Yves David > > <pierre-yves.david@ens-lyon.org > <mailto:pierre-yves.david@ens-lyon.org> > <mailto:pierre-yves.david@ens-lyon.org > <mailto:pierre-yves.david@ens-lyon.org>>> > > wrote: > > > > # HG changeset patch > > # User Pierre-Yves David <pierre-yves.david@fb.com > <mailto:pierre-yves.david@fb.com> > > <mailto:pierre-yves.david@fb.com > <mailto:pierre-yves.david@fb.com>>> > > # Date 1429026244 14400 > > # Tue Apr 14 11:44:04 2015 -0400 > > # Node ID b36bddb86b281eb6c4abd631c57eec47f6de5198 > > # Parent c229ba58b956c7872af7ed220ad5099ea4a6ecf7 > > obsolete: experimental flag to get debug about obsmarkers > exchange > > > > The obsolescence markers exchange is still experimental. We > > (developer) need > > more information about what is going on. I'm adding an > experimental > > flag to add > > display the amount of data exchanged during bundle2 exchanges. > > > > diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py > > --- a/mercurial/bundle2.py > > +++ b/mercurial/bundle2.py > > @@ -1215,11 +1215,15 @@ def handlepushkeyreply(op, inpart): > > > > @parthandler('obsmarkers') > > def handleobsmarker(op, inpart): > > """add a stream of obsmarkers to the repo""" > > tr = op.gettransaction() > > - new = op.repo.obsstore.mergemarkers(tr, inpart.read()) > > + markerdata = inpart.read() > > + if op.ui.config('experimental', 'obsmarkers-exchange-debug', > > False): > > > > > > Why a new config instead of the usual --debug flag? > > I want information about that in every single push/pull operation I'll > run. I'm not going run with --debug all the time. It would be in the > [devel] section. But this is not a warning so I do not want it into this > warning related section. > > > Who else than you would enable it? If it's the same set of people who > would enable [devel], then maybe it's worth expanding the meaning of > that section to include non-warning messages for developers? People beta testing evolve (like logilab) who do not want to have the devel warning on.
On Wed, Apr 15, 2015 at 11:32 AM Pierre-Yves David < pierre-yves.david@ens-lyon.org> wrote: > > > On 04/15/2015 02:02 PM, Martin von Zweigbergk wrote: > > > > > > On Tue, Apr 14, 2015 at 1:24 PM Pierre-Yves David > > <pierre-yves.david@ens-lyon.org <mailto:pierre-yves.david@ens-lyon.org>> > > wrote: > > > > > > > > On 04/14/2015 04:15 PM, Martin von Zweigbergk wrote: > > > > > > > > > On Tue, Apr 14, 2015 at 10:06 AM Pierre-Yves David > > > <pierre-yves.david@ens-lyon.org > > <mailto:pierre-yves.david@ens-lyon.org> > > <mailto:pierre-yves.david@ens-lyon.org > > <mailto:pierre-yves.david@ens-lyon.org>>> > > > wrote: > > > > > > # HG changeset patch > > > # User Pierre-Yves David <pierre-yves.david@fb.com > > <mailto:pierre-yves.david@fb.com> > > > <mailto:pierre-yves.david@fb.com > > <mailto:pierre-yves.david@fb.com>>> > > > # Date 1429026244 14400 > > > # Tue Apr 14 11:44:04 2015 -0400 > > > # Node ID b36bddb86b281eb6c4abd631c57eec47f6de5198 > > > # Parent c229ba58b956c7872af7ed220ad5099ea4a6ecf7 > > > obsolete: experimental flag to get debug about obsmarkers > > exchange > > > > > > The obsolescence markers exchange is still experimental. We > > > (developer) need > > > more information about what is going on. I'm adding an > > experimental > > > flag to add > > > display the amount of data exchanged during bundle2 exchanges. > > > > > > diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py > > > --- a/mercurial/bundle2.py > > > +++ b/mercurial/bundle2.py > > > @@ -1215,11 +1215,15 @@ def handlepushkeyreply(op, inpart): > > > > > > @parthandler('obsmarkers') > > > def handleobsmarker(op, inpart): > > > """add a stream of obsmarkers to the repo""" > > > tr = op.gettransaction() > > > - new = op.repo.obsstore.mergemarkers(tr, inpart.read()) > > > + markerdata = inpart.read() > > > + if op.ui.config('experimental', > 'obsmarkers-exchange-debug', > > > False): > > > > > > > > > Why a new config instead of the usual --debug flag? > > > > I want information about that in every single push/pull operation > I'll > > run. I'm not going run with --debug all the time. It would be in the > > [devel] section. But this is not a warning so I do not want it into > this > > warning related section. > > > > > > Who else than you would enable it? If it's the same set of people who > > would enable [devel], then maybe it's worth expanding the meaning of > > that section to include non-warning messages for developers? > > People beta testing evolve (like logilab) who do not want to have the > devel warning on. > Okay. Pushed to the clowncopter. > > > -- > Pierre-Yves David >
Patch
diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -1215,11 +1215,15 @@ def handlepushkeyreply(op, inpart): @parthandler('obsmarkers') def handleobsmarker(op, inpart): """add a stream of obsmarkers to the repo""" tr = op.gettransaction() - new = op.repo.obsstore.mergemarkers(tr, inpart.read()) + markerdata = inpart.read() + if op.ui.config('experimental', 'obsmarkers-exchange-debug', False): + op.ui.write(('obsmarker-exchange: %i bytes received\n') + % len(markerdata)) + new = op.repo.obsstore.mergemarkers(tr, markerdata) if new: op.repo.ui.status(_('%i new obsolescence markers\n') % new) op.records.add('obsmarkers', {'new': new}) if op.reply is not None: rpart = op.reply.newpart('reply:obsmarkers') diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t --- a/tests/test-obsolete.t +++ b/tests/test-obsolete.t @@ -614,10 +614,19 @@ List of both cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob) cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} #if serve +Test the debug output for exchange +---------------------------------- + + $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' --config 'experimental.bundle2-exp=True' + pulling from ../tmpb + searching for changes + no changes found + obsmarker-exchange: 346 bytes received + check hgweb does not explode ==================================== $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg adding changesets