D243: obsmarker: rename precnode into prednode

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

D243: obsmarker: rename precnode into prednode

dsp (David Soria Parra)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Rename prednode (predecessors node) into precnode (precursors node) in markers
  class. Use util.nouideprecwarn because markers 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/D243

AFFECTED FILES
  mercurial/cmdutil.py
  mercurial/obsutil.py

CHANGE DETAILS

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -9,6 +9,7 @@
 
 from . import (
     phases,
+    util
 )
 
 class marker(object):
@@ -29,15 +30,21 @@
         return self._data == other._data
 
     def precnode(self):
-        """Precursor changeset node identifier"""
+        msg = ("'marker.precnode' is deprecated, "
+               "use 'marker.precnode'")
+        util.nouideprecwarn(msg, '4.4')
+        return self.prednode()
+
+    def prednode(self):
+        """Predecessor changeset node identifier"""
         return self._data[0]
 
     def succnodes(self):
         """List of successor changesets node identifiers"""
         return self._data[1]
 
     def parentnodes(self):
-        """Parents of the precursors (None if not recorded)"""
+        """Parents of the predecessors (None if not recorded)"""
         return self._data[5]
 
     def metadata(self):
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1913,7 +1913,7 @@
     To be used by debug function."""
     if index is not None:
         fm.write('index', '%i ', index)
-    fm.write('precnode', '%s ', hex(marker.precnode()))
+    fm.write('precnode', '%s ', hex(marker.prednode()))
     succs = marker.succnodes()
     fm.condwrite(succs, 'succnodes', '%s ',
                  fm.formatlist(map(hex, succs), name='node'))



To: lothiraldan, #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
|  
Report Content as Inappropriate

D243: obsmarker: rename precnode into prednode

dsp (David Soria Parra)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2cb442bc1a76: obsmarker: rename precnode into prednode (authored by lothiraldan).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D243?vs=588&id=699

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

AFFECTED FILES
  mercurial/cmdutil.py
  mercurial/obsutil.py

CHANGE DETAILS

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -9,6 +9,7 @@
 
 from . import (
     phases,
+    util
 )
 
 class marker(object):
@@ -29,15 +30,21 @@
         return self._data == other._data
 
     def precnode(self):
-        """Precursor changeset node identifier"""
+        msg = ("'marker.precnode' is deprecated, "
+               "use 'marker.precnode'")
+        util.nouideprecwarn(msg, '4.4')
+        return self.prednode()
+
+    def prednode(self):
+        """Predecessor changeset node identifier"""
         return self._data[0]
 
     def succnodes(self):
         """List of successor changesets node identifiers"""
         return self._data[1]
 
     def parentnodes(self):
-        """Parents of the precursors (None if not recorded)"""
+        """Parents of the predecessors (None if not recorded)"""
         return self._data[5]
 
     def metadata(self):
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1913,7 +1913,7 @@
     To be used by debug function."""
     if index is not None:
         fm.write('index', '%i ', index)
-    fm.write('precnode', '%s ', hex(marker.precnode()))
+    fm.write('precnode', '%s ', hex(marker.prednode()))
     succs = marker.succnodes()
     fm.condwrite(succs, 'succnodes', '%s ',
                  fm.formatlist(map(hex, succs), name='node'))



To: lothiraldan, #hg-reviewers, dsp
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
|  
Report Content as Inappropriate

D243: obsmarker: rename precnode into prednode

dsp (David Soria Parra)
In reply to this post by dsp (David Soria Parra)
lothiraldan updated this revision to Diff 705.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D243?vs=699&id=705

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

AFFECTED FILES
  mercurial/cmdutil.py
  mercurial/obsutil.py

CHANGE DETAILS

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -9,6 +9,7 @@
 
 from . import (
     phases,
+    util
 )
 
 class marker(object):
@@ -29,15 +30,21 @@
         return self._data == other._data
 
     def precnode(self):
-        """Precursor changeset node identifier"""
+        msg = ("'marker.precnode' is deprecated, "
+               "use 'marker.precnode'")
+        util.nouideprecwarn(msg, '4.4')
+        return self.prednode()
+
+    def prednode(self):
+        """Predecessor changeset node identifier"""
         return self._data[0]
 
     def succnodes(self):
         """List of successor changesets node identifiers"""
         return self._data[1]
 
     def parentnodes(self):
-        """Parents of the precursors (None if not recorded)"""
+        """Parents of the predecessors (None if not recorded)"""
         return self._data[5]
 
     def metadata(self):
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1913,7 +1913,7 @@
     To be used by debug function."""
     if index is not None:
         fm.write('index', '%i ', index)
-    fm.write('precnode', '%s ', hex(marker.precnode()))
+    fm.write('precnode', '%s ', hex(marker.prednode()))
     succs = marker.succnodes()
     fm.condwrite(succs, 'succnodes', '%s ',
                  fm.formatlist(map(hex, succs), name='node'))



To: lothiraldan, #hg-reviewers, dsp
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
|  
Report Content as Inappropriate

D243: obsmarker: rename precnode into prednode

dsp (David Soria Parra)
In reply to this post by dsp (David Soria Parra)
yuja added inline comments.

INLINE COMMENTS

> cmdutil.py:1916
>          fm.write('index', '%i ', index)
> -    fm.write('precnode', '%s ', hex(marker.precnode()))
> +    fm.write('precnode', '%s ', hex(marker.prednode()))
>      succs = marker.succnodes()

The template keyword should be updated as well. Please send a follow-up.

REPOSITORY
  rHG Mercurial

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

To: lothiraldan, #hg-reviewers, dsp
Cc: yuja, 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
|  
Report Content as Inappropriate

D243: obsmarker: rename precnode into prednode

dsp (David Soria Parra)
In reply to this post by dsp (David Soria Parra)
lothiraldan added inline comments.

INLINE COMMENTS

> yuja wrote in cmdutil.py:1916
> The template keyword should be updated as well. Please send a follow-up.

I'm not sure to see which template keyword you are talking about.

REPOSITORY
  rHG Mercurial

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

To: lothiraldan, #hg-reviewers, dsp
Cc: yuja, 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
|  
Report Content as Inappropriate

RE: D243: obsmarker: rename precnode into prednode

Gábor Stefanik
In reply to this post by dsp (David Soria Parra)


> -----Original Message-----
> From: Mercurial-devel [mailto:[hidden email]]
> On Behalf Of lothiraldan (Boris Feld)
> Sent: Wednesday, August 9, 2017 7:20 PM
> To: [hidden email]
> Subject: D243: obsmarker: rename precnode into prednode
>
> lothiraldan updated this revision to Diff 705.
>
> REPOSITORY
>   rHG Mercurial
>
> CHANGES SINCE LAST UPDATE
>   https://phab.mercurial-scm.org/D243?vs=699&id=705
>
> REVISION DETAIL
>   https://phab.mercurial-scm.org/D243
>
> AFFECTED FILES
>   mercurial/cmdutil.py
>   mercurial/obsutil.py
>
> CHANGE DETAILS
>
> diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
> --- a/mercurial/obsutil.py
> +++ b/mercurial/obsutil.py
> @@ -9,6 +9,7 @@
>
>  from . import (
>      phases,
> +    util
>  )
>
>  class marker(object):
> @@ -29,15 +30,21 @@
>          return self._data == other._data
>
>      def precnode(self):
> -        """Precursor changeset node identifier"""
> +        msg = ("'marker.precnode' is deprecated, "
> +               "use 'marker.precnode'")

precnode is deprecated, use precnode instead? is that a typo?

> +        util.nouideprecwarn(msg, '4.4')
> +        return self.prednode()
> +
> +    def prednode(self):
> +        """Predecessor changeset node identifier"""
>          return self._data[0]
>
>      def succnodes(self):
>          """List of successor changesets node identifiers"""
>          return self._data[1]
>
>      def parentnodes(self):
> -        """Parents of the precursors (None if not recorded)"""
> +        """Parents of the predecessors (None if not recorded)"""
>          return self._data[5]
>
>      def metadata(self):
> diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
> --- a/mercurial/cmdutil.py
> +++ b/mercurial/cmdutil.py
> @@ -1913,7 +1913,7 @@
>      To be used by debug function."""
>      if index is not None:
>          fm.write('index', '%i ', index)
> -    fm.write('precnode', '%s ', hex(marker.precnode()))
> +    fm.write('precnode', '%s ', hex(marker.prednode()))
>      succs = marker.succnodes()
>      fm.condwrite(succs, 'succnodes', '%s ',
>                   fm.formatlist(map(hex, succs), name='node'))
>
>
>
> To: lothiraldan, #hg-reviewers, dsp
> Cc: mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> [hidden email]
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
________________________________
 This message, including its attachments, is confidential and the property of NNG Llc. For more information please read NNG's email policy here:
http://www.nng.com/emailpolicy/
By responding to this email you accept the email policy.
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

D243: obsmarker: rename precnode into prednode

dsp (David Soria Parra)
In reply to this post by dsp (David Soria Parra)
yuja added inline comments.

INLINE COMMENTS

> lothiraldan wrote in cmdutil.py:1916
> I'm not sure to see which template keyword you are talking about.

`fm.write('prednode', ...)`

REPOSITORY
  rHG Mercurial

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

To: lothiraldan, #hg-reviewers, dsp
Cc: yuja, 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
|  
Report Content as Inappropriate

Re: D243: obsmarker: rename precnode into prednode

Boris Feld
In reply to this post by Gábor Stefanik
On Mon, 2017-08-14 at 11:50 +0000, Gábor STEFANIK wrote:

> > -----Original Message-----
> > From: Mercurial-devel [mailto:mercurial-devel-bounces@mercurial-scm
> > .org]
> > On Behalf Of lothiraldan (Boris Feld)
> > Sent: Wednesday, August 9, 2017 7:20 PM
> > To: [hidden email]
> > Subject: D243: obsmarker: rename precnode into prednode
> >
> > lothiraldan updated this revision to Diff 705.
> >
> > REPOSITORY
> >   rHG Mercurial
> >
> > CHANGES SINCE LAST UPDATE
> >   https://phab.mercurial-scm.org/D243?vs=699&id=705
> >
> > REVISION DETAIL
> >   https://phab.mercurial-scm.org/D243
> >
> > AFFECTED FILES
> >   mercurial/cmdutil.py
> >   mercurial/obsutil.py
> >
> > CHANGE DETAILS
> >
> > diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
> > --- a/mercurial/obsutil.py
> > +++ b/mercurial/obsutil.py
> > @@ -9,6 +9,7 @@
> >
> >  from . import (
> >      phases,
> > +    util
> >  )
> >
> >  class marker(object):
> > @@ -29,15 +30,21 @@
> >          return self._data == other._data
> >
> >      def precnode(self):
> > -        """Precursor changeset node identifier"""
> > +        msg = ("'marker.precnode' is deprecated, "
> > +               "use 'marker.precnode'")
>
> precnode is deprecated, use precnode instead? is that a typo?

Good catch! I will send a follow-up.

>
> > +        util.nouideprecwarn(msg, '4.4')
> > +        return self.prednode()
> > +
> > +    def prednode(self):
> > +        """Predecessor changeset node identifier"""
> >          return self._data[0]
> >
> >      def succnodes(self):
> >          """List of successor changesets node identifiers"""
> >          return self._data[1]
> >
> >      def parentnodes(self):
> > -        """Parents of the precursors (None if not recorded)"""
> > +        """Parents of the predecessors (None if not recorded)"""
> >          return self._data[5]
> >
> >      def metadata(self):
> > diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
> > --- a/mercurial/cmdutil.py
> > +++ b/mercurial/cmdutil.py
> > @@ -1913,7 +1913,7 @@
> >      To be used by debug function."""
> >      if index is not None:
> >          fm.write('index', '%i ', index)
> > -    fm.write('precnode', '%s ', hex(marker.precnode()))
> > +    fm.write('precnode', '%s ', hex(marker.prednode()))
> >      succs = marker.succnodes()
> >      fm.condwrite(succs, 'succnodes', '%s ',
> >                   fm.formatlist(map(hex, succs), name='node'))
> >
> >
> >
> > To: lothiraldan, #hg-reviewers, dsp
> > Cc: mercurial-devel
> > _______________________________________________
> > Mercurial-devel mailing list
> > [hidden email]
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
> ________________________________
>  This message, including its attachments, is confidential and the
> property of NNG Llc. For more information please read NNG's email
> policy here:
> http://www.nng.com/emailpolicy/
> By responding to this email you accept the email policy.
> _______________________________________________
> Mercurial-devel mailing list
> [hidden email]
> https://www.mercurial-scm.org/mailman/listinfo/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
|  
Report Content as Inappropriate

D243: obsmarker: rename precnode into prednode

dsp (David Soria Parra)
In reply to this post by dsp (David Soria Parra)
lothiraldan marked 3 inline comments as done.
lothiraldan added inline comments.

INLINE COMMENTS

> yuja wrote in cmdutil.py:1916
> `fm.write('prednode', ...)`

I've send a follow-up: https://phab.mercurial-scm.org/D414

REPOSITORY
  rHG Mercurial

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

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