Patchwork D8134: remotefilelog: add 'changelog' arg to shallowcg1packer.generate (issue6269)

login
register
mail settings
Submitter phabricator
Date Feb. 19, 2020, 8:26 a.m.
Message ID <differential-rev-PHID-DREV-34ibsckbqwgyr3hfo2xf-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/45273/
State Superseded
Headers show

Comments

phabricator - Feb. 19, 2020, 8:26 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This cause traceback on widening using narrow extension when remotefilelog
  is enabled.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

AFFECTED FILES
  hgext/remotefilelog/shallowbundle.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel
phabricator - Feb. 24, 2020, 3:40 p.m.
This revision now requires changes to proceed.
marmoute added inline comments.
marmoute requested changes to this revision.

INLINE COMMENTS

> shallowbundle.py:63
>          return super(shallowcg1packer, self).generate(
> -            commonrevs, clnodes, fastpathlinkrev, source
> +            commonrevs, clnodes, fastpathlinkrev, source, changelog
>          )

Since this is a keyword argument, this seems safer to pass it to the superclass as a keyword argument too. This will avoid sneaky issue if more argument are added.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8134/new/

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

To: pulkit, #hg-reviewers, marmoute
Cc: marmoute, mercurial-devel
phabricator - Feb. 25, 2020, 9:52 a.m.
marmoute added a comment.
marmoute accepted this revision.


  I just mean to use `changelog=changelog` in the super call... but this actually looks more robust.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8134/new/

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

To: pulkit, #hg-reviewers, marmoute
Cc: marmoute, mercurial-devel
phabricator - March 1, 2020, 11:11 a.m.
pulkit added a comment.
pulkit added a subscriber: durin42.


  This was meant for stable branch, can we graft it to stable before the upcoming minor release? (cc: @durin42)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8134/new/

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

To: pulkit, #hg-reviewers, marmoute
Cc: durin42, marmoute, mercurial-devel
phabricator - March 10, 2020, 8:55 a.m.
sluongng added a comment.


  Is there a chance to get this fix in an upcoming minor release?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8134/new/

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

To: pulkit, #hg-reviewers, marmoute
Cc: sluongng, durin42, marmoute, mercurial-devel
phabricator - March 10, 2020, 9:07 a.m.
marmoute added a comment.


  This is released as part of 5.3.1

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8134/new/

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

To: pulkit, #hg-reviewers, marmoute
Cc: sluongng, durin42, marmoute, mercurial-devel

Patch

diff --git a/hgext/remotefilelog/shallowbundle.py b/hgext/remotefilelog/shallowbundle.py
--- a/hgext/remotefilelog/shallowbundle.py
+++ b/hgext/remotefilelog/shallowbundle.py
@@ -54,12 +54,13 @@ 
 
 
 class shallowcg1packer(changegroup.cgpacker):
-    def generate(self, commonrevs, clnodes, fastpathlinkrev, source):
+    def generate(self, commonrevs, clnodes, fastpathlinkrev, source,
+            changelog=True):
         if shallowutil.isenabled(self._repo):
             fastpathlinkrev = False
 
         return super(shallowcg1packer, self).generate(
-            commonrevs, clnodes, fastpathlinkrev, source
+            commonrevs, clnodes, fastpathlinkrev, source, changelog
         )
 
     def group(self, nodelist, rlog, lookup, units=None, reorder=None):