D5985: bundle2: don't send "shared" requirement when cloning from a share

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

D5985: bundle2: don't send "shared" requirement when cloning from a share

pulkit (Pulkit Goyal)
mplamann created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/bundle2.py
  tests/test-share.t

CHANGE DETAILS

diff --git a/tests/test-share.t b/tests/test-share.t
--- a/tests/test-share.t
+++ b/tests/test-share.t
@@ -124,15 +124,14 @@
   -rw-r--r-- 2 b
   
   
-Cloning a shared repo via bundle2 wrongly adds "shared" to the clone's requirements
+Cloning a shared repo via bundle2 results in a non-shared clone
 
   $ cd ..
   $ hg clone -q --stream --config ui.ssh="$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/repo2 cloned-via-bundle2
   $ cat ./cloned-via-bundle2/.hg/requires | grep "shared"
-  shared
+  [1]
   $ hg id --cwd cloned-via-bundle2 -r tip
-  abort: $ENOENT$: '$TESTTMP/cloned-via-bundle2/.hg/sharedpath'
-  [255]
+  c2e0ac586386 tip
   $ cd repo2
 
 test unshare command
diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -1664,6 +1664,7 @@
                     mandatory=False)
 
 def _formatrequirementsspec(requirements):
+    requirements = [req for req in requirements if req != "shared"]
     return urlreq.quote(','.join(sorted(requirements)))
 
 def _formatrequirementsparams(requirements):



To: mplamann, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D5985: bundle2: don't send "shared" requirement when cloning from a share

pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2d835c42ab41: bundle2: don't send "shared" requirement when cloning from a share (authored by mplamann, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5985?vs=14155&id=14237

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

AFFECTED FILES
  mercurial/bundle2.py
  tests/test-share.t

CHANGE DETAILS

diff --git a/tests/test-share.t b/tests/test-share.t
--- a/tests/test-share.t
+++ b/tests/test-share.t
@@ -124,15 +124,14 @@
   -rw-r--r-- 2 b
   
   
-Cloning a shared repo via bundle2 wrongly adds "shared" to the clone's requirements
+Cloning a shared repo via bundle2 results in a non-shared clone
 
   $ cd ..
   $ hg clone -q --stream --config ui.ssh="$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/repo2 cloned-via-bundle2
   $ cat ./cloned-via-bundle2/.hg/requires | grep "shared"
-  shared
+  [1]
   $ hg id --cwd cloned-via-bundle2 -r tip
-  abort: $ENOENT$: '$TESTTMP/cloned-via-bundle2/.hg/sharedpath'
-  [255]
+  c2e0ac586386 tip
   $ cd repo2
 
 test unshare command
diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -1664,6 +1664,7 @@
                     mandatory=False)
 
 def _formatrequirementsspec(requirements):
+    requirements = [req for req in requirements if req != "shared"]
     return urlreq.quote(','.join(sorted(requirements)))
 
 def _formatrequirementsparams(requirements):



To: mplamann, #hg-reviewers, pulkit
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel