D1222: merge: add a config option to disable path conflict checking

2017-10-30 Thread sid0 (Siddharth Agarwal)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG37450a122128: merge: add a config option to disable path 
conflict checking (authored by sid0, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1222?vs=3081&id=3160

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

AFFECTED FILES
  mercurial/configitems.py
  mercurial/merge.py

CHANGE DETAILS

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -693,6 +693,7 @@
 abortconflicts = set()
 unknownconfig = _getcheckunknownconfig(repo, 'merge', 'checkunknown')
 ignoredconfig = _getcheckunknownconfig(repo, 'merge', 'checkignored')
+pathconfig = repo.ui.configbool('experimental', 'merge.checkpathconflicts')
 if not force:
 def collectconflicts(conflicts, config):
 if config == 'abort':
@@ -704,7 +705,7 @@
 if m in ('c', 'dc'):
 if _checkunknownfile(repo, wctx, mctx, f):
 fileconflicts.add(f)
-elif f not in wctx:
+elif pathconfig and f not in wctx:
 path = _checkunknowndirs(repo, f)
 if path is not None:
 pathconflicts.add(path)
@@ -1139,8 +1140,9 @@
 actions[f] = ('dc', (None, f, f, False, pa.node()),
   "prompt deleted/changed")
 
-# If we are merging, look for path conflicts.
-checkpathconflicts(repo, wctx, p2, actions)
+if repo.ui.configbool('experimental', 'merge.checkpathconflicts'):
+# If we are merging, look for path conflicts.
+checkpathconflicts(repo, wctx, p2, actions)
 
 return actions, diverge, renamedelete
 
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -578,6 +578,9 @@
 coreconfigitem('merge', 'checkignored',
 default='abort',
 )
+coreconfigitem('experimental', 'merge.checkpathconflicts',
+default=True,
+)
 coreconfigitem('merge', 'followcopies',
 default=True,
 )



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


D1222: merge: add a config option to disable path conflict checking

2017-10-24 Thread sid0 (Siddharth Agarwal)
sid0 added a comment.


  > The debug section doesn't seem to exists, could we use 'experimental' 
instead while we fix the performance regression?
  
  Good idea! Done, thanks!

REPOSITORY
  rHG Mercurial

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

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


D1222: merge: add a config option to disable path conflict checking

2017-10-24 Thread sid0 (Siddharth Agarwal)
sid0 updated this revision to Diff 3081.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1222?vs=3073&id=3081

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

AFFECTED FILES
  mercurial/configitems.py
  mercurial/merge.py

CHANGE DETAILS

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -693,6 +693,7 @@
 abortconflicts = set()
 unknownconfig = _getcheckunknownconfig(repo, 'merge', 'checkunknown')
 ignoredconfig = _getcheckunknownconfig(repo, 'merge', 'checkignored')
+pathconfig = repo.ui.configbool('experimental', 'merge.checkpathconflicts')
 if not force:
 def collectconflicts(conflicts, config):
 if config == 'abort':
@@ -704,7 +705,7 @@
 if m in ('c', 'dc'):
 if _checkunknownfile(repo, wctx, mctx, f):
 fileconflicts.add(f)
-elif f not in wctx:
+elif pathconfig and f not in wctx:
 path = _checkunknowndirs(repo, f)
 if path is not None:
 pathconflicts.add(path)
@@ -1139,8 +1140,9 @@
 actions[f] = ('dc', (None, f, f, False, pa.node()),
   "prompt deleted/changed")
 
-# If we are merging, look for path conflicts.
-checkpathconflicts(repo, wctx, p2, actions)
+if repo.ui.configbool('experimental', 'merge.checkpathconflicts'):
+# If we are merging, look for path conflicts.
+checkpathconflicts(repo, wctx, p2, actions)
 
 return actions, diverge, renamedelete
 
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -575,6 +575,9 @@
 coreconfigitem('merge', 'checkignored',
 default='abort',
 )
+coreconfigitem('experimental', 'merge.checkpathconflicts',
+default=True,
+)
 coreconfigitem('merge', 'followcopies',
 default=True,
 )



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


D1222: merge: add a config option to disable path conflict checking

2017-10-24 Thread lothiraldan (Boris Feld)
lothiraldan added a comment.


  The `debug` section doesn't seem to exists, could we use 'experimental' 
instead while we fix the performance regression?

REPOSITORY
  rHG Mercurial

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

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


D1222: merge: add a config option to disable path conflict checking

2017-10-23 Thread sid0 (Siddharth Agarwal)
sid0 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We've found a severe perf regression in `hg update` caused by the path 
conflict
  checking code. The next patch will disable this by default.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/configitems.py
  mercurial/merge.py

CHANGE DETAILS

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -693,6 +693,7 @@
 abortconflicts = set()
 unknownconfig = _getcheckunknownconfig(repo, 'merge', 'checkunknown')
 ignoredconfig = _getcheckunknownconfig(repo, 'merge', 'checkignored')
+pathconfig = repo.ui.configbool('debug', 'merge.checkpathconflicts')
 if not force:
 def collectconflicts(conflicts, config):
 if config == 'abort':
@@ -704,7 +705,7 @@
 if m in ('c', 'dc'):
 if _checkunknownfile(repo, wctx, mctx, f):
 fileconflicts.add(f)
-elif f not in wctx:
+elif pathconfig and f not in wctx:
 path = _checkunknowndirs(repo, f)
 if path is not None:
 pathconflicts.add(path)
@@ -1139,8 +1140,9 @@
 actions[f] = ('dc', (None, f, f, False, pa.node()),
   "prompt deleted/changed")
 
-# If we are merging, look for path conflicts.
-checkpathconflicts(repo, wctx, p2, actions)
+if repo.ui.configbool('debug', 'merge.checkpathconflicts'):
+# If we are merging, look for path conflicts.
+checkpathconflicts(repo, wctx, p2, actions)
 
 return actions, diverge, renamedelete
 
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -575,6 +575,9 @@
 coreconfigitem('merge', 'checkignored',
 default='abort',
 )
+coreconfigitem('debug', 'merge.checkpathconflicts',
+default=True,
+)
 coreconfigitem('merge', 'followcopies',
 default=True,
 )



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