Patchwork lfs: don't add extension to hgrc after conversion (BC)

login
register
mail settings
Submitter Matt Harbison
Date Oct. 19, 2018, 2:02 a.m.
Message ID <5efdab0bd5b25112f44d.1539914547@Envy>
Download mbox | patch
Permalink /patch/36162/
State Accepted
Headers show

Comments

Matt Harbison - Oct. 19, 2018, 2:02 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1539914147 14400
#      Thu Oct 18 21:55:47 2018 -0400
# Node ID 5efdab0bd5b25112f44dc22813d0fb78a77a0009
# Parent  824b687ff6af49622a18dfea760cf41a7abe5aa7
lfs: don't add extension to hgrc after conversion (BC)

This is in the spirit of bcf72d7b1524.
Yuya Nishihara - Oct. 19, 2018, 12:34 p.m.
On Thu, 18 Oct 2018 22:02:27 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1539914147 14400
> #      Thu Oct 18 21:55:47 2018 -0400
> # Node ID 5efdab0bd5b25112f44dc22813d0fb78a77a0009
> # Parent  824b687ff6af49622a18dfea760cf41a7abe5aa7
> lfs: don't add extension to hgrc after conversion (BC)

Queued, thanks.
Yuya Nishihara - Oct. 19, 2018, 1:03 p.m.
On Thu, 18 Oct 2018 22:02:27 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1539914147 14400
> #      Thu Oct 18 21:55:47 2018 -0400
> # Node ID 5efdab0bd5b25112f44dc22813d0fb78a77a0009
> # Parent  824b687ff6af49622a18dfea760cf41a7abe5aa7
> lfs: don't add extension to hgrc after conversion (BC)

> --- a/tests/test-lfs-largefiles.t
> +++ b/tests/test-lfs-largefiles.t
> @@ -286,8 +286,7 @@ parameters are available, but not --auth
>    0 remove large_by_size.bin
>    $ cd nolargefiles
>  
> -The requirement is added to the destination repo, and the extension is enabled
> -locally.
> +The requirement is added to the destination repo.
>  
>    $ cat .hg/requires
>    dotencode
> @@ -296,8 +295,6 @@ locally.
>    lfs
>    revlogv1
>    store
> -  $ hg config --debug extensions | grep lfs
> -  $TESTTMP/nolargefiles/.hg/hgrc:*: extensions.lfs= (glob)

Removed one more copy in test-lfs.t

Patch

diff --git a/hgext/lfs/wrapper.py b/hgext/lfs/wrapper.py
--- a/hgext/lfs/wrapper.py
+++ b/hgext/lfs/wrapper.py
@@ -213,10 +213,6 @@  def convertsink(orig, sink):
                         self.repo.requirements.add('lfs')
                         self.repo._writerequirements()
 
-                        # Permanently enable lfs locally
-                        self.repo.vfs.append(
-                            'hgrc', util.tonativeeol('\n[extensions]\nlfs=\n'))
-
                 return node
 
         sink.__class__ = lfssink
diff --git a/tests/test-lfs-largefiles.t b/tests/test-lfs-largefiles.t
--- a/tests/test-lfs-largefiles.t
+++ b/tests/test-lfs-largefiles.t
@@ -286,8 +286,7 @@  parameters are available, but not --auth
   0 remove large_by_size.bin
   $ cd nolargefiles
 
-The requirement is added to the destination repo, and the extension is enabled
-locally.
+The requirement is added to the destination repo.
 
   $ cat .hg/requires
   dotencode
@@ -296,8 +295,6 @@  locally.
   lfs
   revlogv1
   store
-  $ hg config --debug extensions | grep lfs
-  $TESTTMP/nolargefiles/.hg/hgrc:*: extensions.lfs= (glob)
 
   $ hg log -r 'all()' -G -T '{rev} {join(lfs_files, ", ")} ({desc})\n'
   o  8 large_by_size.bin (remove large_by_size.bin)