D247: obsutil: rename allprecursors into allpredecessors

2017-08-09 Thread lothiraldan (Boris Feld)
lothiraldan updated this revision to Diff 709.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D247?vs=703=709

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

AFFECTED FILES
  contrib/phabricator.py
  mercurial/obsolete.py
  mercurial/obsutil.py

CHANGE DETAILS

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -102,7 +102,16 @@
 else:
 stack.append(precnodeid)
 
-def allprecursors(obsstore, nodes, ignoreflags=0):
+def allprecursors(*args, **kwargs):
+""" (DEPRECATED)
+"""
+msg = ("'obsutil.allprecursors' is deprecated, "
+   "use 'obsutil.allpredecessors'")
+util.nouideprecwarn(msg, '4.4')
+
+return allpredecessors(*args, **kwargs)
+
+def allpredecessors(obsstore, nodes, ignoreflags=0):
 """Yield node for every precursors of .
 
 Some precursors may be unknown locally.
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -949,7 +949,7 @@
 # We only evaluate mutable, non-obsolete revision
 node = ctx.node()
 # (future) A cache of predecessors may worth if split is very common
-for pnode in obsutil.allprecursors(repo.obsstore, [node],
+for pnode in obsutil.allpredecessors(repo.obsstore, [node],
ignoreflags=bumpedfix):
 prev = torev(pnode) # unfiltered! but so is phasecache
 if (prev is not None) and (phase(repo, prev) <= public):
diff --git a/contrib/phabricator.py b/contrib/phabricator.py
--- a/contrib/phabricator.py
+++ b/contrib/phabricator.py
@@ -41,7 +41,7 @@
 encoding,
 error,
 mdiff,
-obsolete,
+obsutil,
 patch,
 registrar,
 scmutil,
@@ -167,7 +167,7 @@
 for node in nodelist:
 ctx = unfi[node]
 # For tags like "D123", put them into "toconfirm" to verify later
-precnodes = list(obsolete.allprecursors(unfi.obsstore, [node]))
+precnodes = list(obsutil.allpredecessors(unfi.obsstore, [node]))
 for n in precnodes:
 if n in nodemap:
 for tag in unfi.nodetags(n):



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


D247: obsutil: rename allprecursors into allpredecessors

2017-08-09 Thread lothiraldan (Boris Feld)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe6d8ee3c9ec3: obsutil: rename allprecursors into 
allpredecessors (authored by lothiraldan).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D247?vs=592=703

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

AFFECTED FILES
  contrib/phabricator.py
  mercurial/obsolete.py
  mercurial/obsutil.py

CHANGE DETAILS

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -102,7 +102,16 @@
 else:
 stack.append(precnodeid)
 
-def allprecursors(obsstore, nodes, ignoreflags=0):
+def allprecursors(*args, **kwargs):
+""" (DEPRECATED)
+"""
+msg = ("'obsutil.allprecursors' is deprecated, "
+   "use 'obsutil.allpredecessors'")
+util.nouideprecwarn(msg, '4.4')
+
+return allpredecessors(*args, **kwargs)
+
+def allpredecessors(obsstore, nodes, ignoreflags=0):
 """Yield node for every precursors of .
 
 Some precursors may be unknown locally.
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -949,7 +949,7 @@
 # We only evaluate mutable, non-obsolete revision
 node = ctx.node()
 # (future) A cache of predecessors may worth if split is very common
-for pnode in obsutil.allprecursors(repo.obsstore, [node],
+for pnode in obsutil.allpredecessors(repo.obsstore, [node],
ignoreflags=bumpedfix):
 prev = torev(pnode) # unfiltered! but so is phasecache
 if (prev is not None) and (phase(repo, prev) <= public):
diff --git a/contrib/phabricator.py b/contrib/phabricator.py
--- a/contrib/phabricator.py
+++ b/contrib/phabricator.py
@@ -41,7 +41,7 @@
 encoding,
 error,
 mdiff,
-obsolete,
+obsutil,
 patch,
 registrar,
 scmutil,
@@ -167,7 +167,7 @@
 for node in nodelist:
 ctx = unfi[node]
 # For tags like "D123", put them into "toconfirm" to verify later
-precnodes = list(obsolete.allprecursors(unfi.obsstore, [node]))
+precnodes = list(obsutil.allpredecessors(unfi.obsstore, [node]))
 for n in precnodes:
 if n in nodemap:
 for tag in unfi.nodetags(n):



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


D247: obsutil: rename allprecursors into allpredecessors

2017-08-07 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Use util.nouideprecwarn because obsstore doesn't have easy access to an ui
  object.
  
  The renaming is done according to
  https://www.mercurial-scm.org/wiki/CEDVocabulary.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  contrib/phabricator.py
  mercurial/obsolete.py
  mercurial/obsutil.py

CHANGE DETAILS

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -102,7 +102,16 @@
 else:
 stack.append(precnodeid)
 
-def allprecursors(obsstore, nodes, ignoreflags=0):
+def allprecursors(*args, **kwargs):
+""" (DEPRECATED)
+"""
+msg = ("'obsutil.allprecursors' is deprecated, "
+   "use 'obsutil.allpredecessors'")
+util.nouideprecwarn(msg, '4.4')
+
+return allpredecessors(*args, **kwargs)
+
+def allpredecessors(obsstore, nodes, ignoreflags=0):
 """Yield node for every precursors of .
 
 Some precursors may be unknown locally.
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -949,7 +949,7 @@
 # We only evaluate mutable, non-obsolete revision
 node = ctx.node()
 # (future) A cache of predecessors may worth if split is very common
-for pnode in obsutil.allprecursors(repo.obsstore, [node],
+for pnode in obsutil.allpredecessors(repo.obsstore, [node],
ignoreflags=bumpedfix):
 prev = torev(pnode) # unfiltered! but so is phasecache
 if (prev is not None) and (phase(repo, prev) <= public):
diff --git a/contrib/phabricator.py b/contrib/phabricator.py
--- a/contrib/phabricator.py
+++ b/contrib/phabricator.py
@@ -41,7 +41,7 @@
 encoding,
 error,
 mdiff,
-obsolete,
+obsutil,
 patch,
 registrar,
 scmutil,
@@ -167,7 +167,7 @@
 for node in nodelist:
 ctx = unfi[node]
 # For tags like "D123", put them into "toconfirm" to verify later
-precnodes = list(obsolete.allprecursors(unfi.obsstore, [node]))
+precnodes = list(obsutil.allpredecessors(unfi.obsstore, [node]))
 for n in precnodes:
 if n in nodemap:
 for tag in unfi.nodetags(n):



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