D6268: copies: move check for experimental.copytrace== earlier

2019-05-01 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd8ca7b99fc51: copies: move check for 
experimental.copytrace==falsy earlier (authored by martinvonz, 
committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6268?vs=14967=14979

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

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -410,7 +410,10 @@
 return _dirstatecopies(repo, narrowmatch), {}, {}, {}, {}
 
 copytracing = repo.ui.config('experimental', 'copytrace')
-boolctrace = stringutil.parsebool(copytracing)
+if stringutil.parsebool(copytracing) is False:
+# stringutil.parsebool() returns None when it is unable to parse the
+# value, so we should rely on making sure copytracing is on such cases
+return {}, {}, {}, {}, {}
 
 # Copy trace disabling is explicitly below the node == p1 logic above
 # because the logic above is required for a simple copy to be kept across a
@@ -422,10 +425,6 @@
 if _isfullcopytraceable(repo, c1, base):
 return _fullcopytracing(repo, c1, c2, base)
 return _heuristicscopytracing(repo, c1, c2, base)
-elif boolctrace is False:
-# stringutil.parsebool() returns None when it is unable to parse the
-# value, so we should rely on making sure copytracing is on such cases
-return {}, {}, {}, {}, {}
 else:
 return _fullcopytracing(repo, c1, c2, base)
 



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6268: copies: move check for experimental.copytrace== earlier

2019-04-29 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 14967.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6268?vs=14946=14967

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

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -410,7 +410,10 @@
 return _dirstatecopies(repo, narrowmatch), {}, {}, {}, {}
 
 copytracing = repo.ui.config('experimental', 'copytrace')
-boolctrace = stringutil.parsebool(copytracing)
+if stringutil.parsebool(copytracing) is False:
+# stringutil.parsebool() returns None when it is unable to parse the
+# value, so we should rely on making sure copytracing is on such cases
+return {}, {}, {}, {}, {}
 
 # Copy trace disabling is explicitly below the node == p1 logic above
 # because the logic above is required for a simple copy to be kept across a
@@ -422,10 +425,6 @@
 if _isfullcopytraceable(repo, c1, base):
 return _fullcopytracing(repo, c1, c2, base)
 return _heuristicscopytracing(repo, c1, c2, base)
-elif boolctrace is False:
-# stringutil.parsebool() returns None when it is unable to parse the
-# value, so we should rely on making sure copytracing is on such cases
-return {}, {}, {}, {}, {}
 else:
 return _fullcopytracing(repo, c1, c2, base)
 



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6268: copies: move check for experimental.copytrace== earlier

2019-04-28 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 14946.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6268?vs=14812=14946

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

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -410,7 +410,10 @@
 return _dirstatecopies(repo, narrowmatch), {}, {}, {}, {}
 
 copytracing = repo.ui.config('experimental', 'copytrace')
-boolctrace = stringutil.parsebool(copytracing)
+if stringutil.parsebool(copytracing) is False:
+# stringutil.parsebool() returns None when it is unable to parse the
+# value, so we should rely on making sure copytracing is on such cases
+return {}, {}, {}, {}, {}
 
 # Copy trace disabling is explicitly below the node == p1 logic above
 # because the logic above is required for a simple copy to be kept across a
@@ -422,10 +425,6 @@
 if _isfullcopytraceable(repo, c1, base):
 return _fullcopytracing(repo, c1, c2, base)
 return _heuristicscopytracing(repo, c1, c2, base)
-elif boolctrace is False:
-# stringutil.parsebool() returns None when it is unable to parse the
-# value, so we should rely on making sure copytracing is on such cases
-return {}, {}, {}, {}, {}
 else:
 return _fullcopytracing(repo, c1, c2, base)
 



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6268: copies: move check for experimental.copytrace== earlier

2019-04-17 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I'm going to ignore experimental.copytrace when changeset-centric
  algorithms are required. This little refactoring makes that easier to
  add.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -410,7 +410,10 @@
 return _dirstatecopies(repo, narrowmatch), {}, {}, {}, {}
 
 copytracing = repo.ui.config('experimental', 'copytrace')
-boolctrace = stringutil.parsebool(copytracing)
+if stringutil.parsebool(copytracing) is False:
+# stringutil.parsebool() returns None when it is unable to parse the
+# value, so we should rely on making sure copytracing is on such cases
+return {}, {}, {}, {}, {}
 
 # Copy trace disabling is explicitly below the node == p1 logic above
 # because the logic above is required for a simple copy to be kept across a
@@ -422,10 +425,6 @@
 if _isfullcopytraceable(repo, c1, base):
 return _fullcopytracing(repo, c1, c2, base)
 return _heuristicscopytracing(repo, c1, c2, base)
-elif boolctrace is False:
-# stringutil.parsebool() returns None when it is unable to parse the
-# value, so we should rely on making sure copytracing is on such cases
-return {}, {}, {}, {}, {}
 else:
 return _fullcopytracing(repo, c1, c2, base)
 



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel