Patchwork D216: evolution: rename bumped to phase-divergent

login
register
mail settings
Submitter phabricator
Date Aug. 2, 2017, 8:24 a.m.
Message ID <differential-rev-PHID-DREV-tnrev3ragzhry7zzxaro-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/22633/
State Superseded
Headers show

Comments

phabricator - Aug. 2, 2017, 8:24 a.m.
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Rename bumped to phase-divergent in all external user-facing output. Only
  update user-facing output for the moment, variables names, templates keyword
  and potentially configuration would be done in later series.
  
  The renaming is done according to
  https://www.mercurial-scm.org/wiki/CEDVocabulary.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/context.py
  mercurial/exchange.py
  tests/test-obsolete.t

CHANGE DETAILS




To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
phabricator - Aug. 2, 2017, 3:21 p.m.
durin42 added a comment.


  I'd like to hear others chime in on this and https://phab.mercurial-scm.org/D215. Do we /know/ that something that's phase-divergent is only divergent by phase? or could the content also be different? Is it possible to have a case in the tests that's both content-divergent and phase-divergent?

REPOSITORY
  rHG Mercurial

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

To: lothiraldan, #hg-reviewers
Cc: durin42, mercurial-devel
phabricator - Aug. 2, 2017, 4:08 p.m.
quark added a comment.


  In https://phab.mercurial-scm.org/D216#3478, @durin42 wrote:
  
  > I'd like to hear others chime in on this and https://phab.mercurial-scm.org/D215. Do we /know/ that something that's phase-divergent is only divergent by phase? or could the content also be different? Is it possible to have a case in the tests that's both content-divergent and phase-divergent?
  
  
  Good question. I think conceptually phase-divergent could also be seen as content-divergent. I guess most users use source control without even being aware of the "phase" concept so it might be nice to hide that word from UI.
  
  Maybe we can merge those two into `divergent()` to simplify the concept a user may face. If something has to distinguish between those details, we can add keyword arguments to the `divergent()` revset. But I'd prefer the default user-facing words to just be `divergent`. Or we can think about alternative ways to display instability in the default log template.

REPOSITORY
  rHG Mercurial

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

To: lothiraldan, #hg-reviewers
Cc: quark, durin42, mercurial-devel
phabricator - Aug. 2, 2017, 4:31 p.m.
martinvonz added a comment.


  In https://phab.mercurial-scm.org/D216#3478, @durin42 wrote:
  
  > I'd like to hear others chime in on this and https://phab.mercurial-scm.org/D215. Do we /know/ that something that's phase-divergent is only divergent by phase? or could the content also be different? Is it possible to have a case in the tests that's both content-divergent and phase-divergent?
  
  
  I know I'm really late to the party and sorry about that, but...
  
  How about instead of "phase-divergent" calling it "overdue"? That seems to capture it pretty well to me -- the only problem with the commit was that it arrived too late. "Tardy" might also be good, but that's probably less familiar to non-native speakers.

REPOSITORY
  rHG Mercurial

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

To: lothiraldan, #hg-reviewers
Cc: martinvonz, quark, durin42, mercurial-devel
phabricator - Aug. 2, 2017, 6:16 p.m.
lothiraldan added a comment.


  According to my understanding of `context.troubles`, a changeset could be both content-divergent and phase-divergent, it should be easy to add a test for that.
  
  About phase-divergent name, I like it, it's both explicit and coherent with the other terms. Maybe this discussion already happened in one medium listed here: https://www.mercurial-scm.org/wiki/CEDVocabulary#See_Also
  
  I think phases are more or less visible depending on your workflow, hiding it would not be possible for everyone I'm afraid.

REPOSITORY
  rHG Mercurial

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

To: lothiraldan, #hg-reviewers
Cc: martinvonz, quark, durin42, mercurial-devel
phabricator - Aug. 3, 2017, 11:45 p.m.
quark added a subscriber: ryanmce.
quark added a comment.


  In https://phab.mercurial-scm.org/D216#3504, @martinvonz wrote:
  
  > In https://phab.mercurial-scm.org/D216#3478, @durin42 wrote:
  >
  > > I'd like to hear others chime in on this and https://phab.mercurial-scm.org/D215. Do we /know/ that something that's phase-divergent is only divergent by phase? or could the content also be different? Is it possible to have a case in the tests that's both content-divergent and phase-divergent?
  >
  >
  > I know I'm really late to the party and sorry about that, but...
  >
  > How about instead of "phase-divergent" calling it "overdue"? That seems to capture it pretty well to me -- the only problem with the commit was that it arrived too late. "Tardy" might also be good, but that's probably less familiar to non-native speakers.
  
  
  I think "overdue" is more friendly to new users than "phase-divergent". cc @ryanmce who participated in the original rename discussion.

REPOSITORY
  rHG Mercurial

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

To: lothiraldan, #hg-reviewers
Cc: ryanmce, martinvonz, quark, durin42, mercurial-devel
phabricator - Aug. 4, 2017, 9:09 a.m.
ryanmce accepted this revision.
ryanmce added a comment.


  A Dead Horse in Need of Kicking
  ===============================
  
  I have no strong desire to drag this dead horse out of its grave to continue kicking it. However, since we are here, I will state for the record that I disagree that "overdue" is more clear.
  
  Imagine I'm a `git` user trying out `hg` due to hearing about some of its cool features. I'm hacking on some stuff with a friend and now I see that I have "1 overdue changeset". I have no idea what that means, to be honest. Is it out-of-date somehow? Will it expire soon? Will I be fined by the library?
  
  However, if I see that a changeset is "phase-divergent" I may also be confused, but I pretty quickly know two things: (1) I should understand what "phase" means, and that this changeset disagrees with another changeset somehow. So, I look up phases and (1) I've learned something important about hg and (2) now phase-divergence makes a lot more sense just by me knowing about phases and the meaning of "divergent": my changeset is draft, but a different version of it is public, so mine is phase-divergent. It's clear from then on because it builds on top of the terminology we already use elsewhere in hg.
  
  Moving on and responding to other comments here
  ===============================================
  
  > Do we /know/ that something that's phase-divergent is only divergent by phase? or could the content also be different? Is it possible to have a case in the tests that's both content-divergent and phase-divergent?
  
  I think that it's possible to be both at the same time. I'll spend some time coming up with the situation to explain it, but most of the time it's not the case as I recall.
  
  > I guess most users use source control are even aware of the "phase" concept so it might be nice to hide that word from UI.
  
  I disagree. `hg amend` --> `abort: cannot amend public changesets`
  
  We already expose phases in the UI and I argue that it's a good thing. Making users more aware of it and reusing the terminology I think is a good thing.
  
  > Maybe we can merge those two into divergent() to simplify the concept a user may face.
  
  This is kind of the direction we went. Instead of two separate concepts, "bumped" and "divergent", we now have two related concepts "content-divergent" and "phase-divergent". Both are "divergent", which means they need some similar kind of attention. The way it would be introduced in the docs is to explain the concept of divergence and then to explain the two types. However, I disagree with lumping all such types without exposing differences. I believe that will be more confusing since the way to arrive in the situation and the remedies are different.
  
  > We can think about alternative ways to display instability in the default log template.
  
  I'd love to hear what suggestions you have here (I lean towards "phase-divergent with f3967dc12" in the log so it's easy to figure out what the "other" version of you is).
  
  Conclusion
  ==========
  
  I feel that these decisions were made a long time ago. They were recorded on the wiki. We sent out emails about it for comments. We met up at the tail end of the last sprint both at the sprint venue and in a follow-up for anyone who cared enough at the time, up at the Atlassian office. No naming scheme will be perfect -- language is always a compromise -- but I think the names currently on the CEDVocabulary page are quite good, significant improvements over what we currently have, and have been discussed for hours by experts who care, and I think we should stick with them. Unless someone proposes a new name that pretty much everyone agrees is better -- and that hasn't happened here -- I think we should stick with the current naming on the Wiki.

REPOSITORY
  rHG Mercurial

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

To: lothiraldan, #hg-reviewers, ryanmce
Cc: ryanmce, martinvonz, quark, durin42, mercurial-devel
phabricator - Aug. 4, 2017, 9:25 a.m.
ryanmce added a comment.


  In fact, right at the top of that CED page is an introduction that I think is pretty clear for such a powerful topic:
  
  Introduction to Instability
  ---------------------------
  
  Rewriting changesets may introduce **instability**.
  
  There are two main kinds of **unstable** changesets: **orphaned** changesets and **divergent** changesets.
  
  **Orphans** are changesets left behind when their ancestors are rewritten.
  
  **Divergence** has two variants:
  
  - **Content-divergence** occurs when independent rewrites of the same changeset lead to different results.
  - **Phase-divergence** occurs when the old (obsolete) version of a changeset becomes public.
  
  ---
  
  I'm probably biased because I helped write this (and I just cleaned it up and added emphasis), but I think it's pretty clear.

REPOSITORY
  rHG Mercurial

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

To: lothiraldan, #hg-reviewers, ryanmce
Cc: ryanmce, martinvonz, quark, durin42, mercurial-devel
phabricator - Aug. 4, 2017, 6:04 p.m.
quark added a comment.


  In https://phab.mercurial-scm.org/D216#3674, @ryanmce wrote:
  
  > I disagree. `hg amend` --> `abort: cannot amend public changesets`
  
  
  The word "public" does not get associated with "phase" automatically. I think users can understand what "public" and "draft" without knowing what "phase" is. "divergent" also seems understandable without Googling. I'm not sure about "phase".
  
  Anyway, since we can always customize these (ex. `dialect.py`). From an internal UX point of view, I'm fine with whatever chosen.

REPOSITORY
  rHG Mercurial

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

To: lothiraldan, #hg-reviewers, ryanmce
Cc: ryanmce, martinvonz, quark, durin42, mercurial-devel
phabricator - Aug. 4, 2017, 8:33 p.m.
durin42 accepted this revision as: durin42.
durin42 added a comment.


  I'm fine with this as-is for now, with the caveat that we might want to fix the two -divergent names in the future if they lead to user confusion.
  
  (Someone should feel encouraged to land this, I'm in the middle of some unpleasant debugging and am reviewing while I wait for wireshark to install.)

REPOSITORY
  rHG Mercurial

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

To: lothiraldan, #hg-reviewers, ryanmce, durin42
Cc: ryanmce, martinvonz, quark, durin42, mercurial-devel

Patch

diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t
--- a/tests/test-obsolete.t
+++ b/tests/test-obsolete.t
@@ -207,7 +207,7 @@ 
 
   $ hg --hidden phase --public 2
   $ hg log -G
-  @  5:5601fb93a350 (draft bumped) [tip ] add new_3_c
+  @  5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c
   |
   | o  2:245bde4270cd (public) [ ] add original_c
   |/
@@ -224,7 +224,7 @@ 
 the public changeset
 
   $ hg log --hidden -r 'bumped()'
-  5:5601fb93a350 (draft bumped) [tip ] add new_3_c
+  5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c
 
 And that we can't push bumped changeset
 
@@ -239,20 +239,20 @@ 
   $ hg push ../tmpa
   pushing to ../tmpa
   searching for changes
-  abort: push includes bumped changeset: 5601fb93a350!
+  abort: push includes phase-divergent changeset: 5601fb93a350!
   [255]
 
 Fixing "bumped" situation
 We need to create a clone of 5 and add a special marker with a flag
 
   $ hg summary
-  parent: 5:5601fb93a350 tip (bumped)
+  parent: 5:5601fb93a350 tip (phase-divergent)
    add new_3_c
   branch: default
   commit: (clean)
   update: 1 new changesets, 2 branch heads (merge)
   phases: 1 draft
-  bumped: 1 changesets
+  phase-divergent: 1 changesets
   $ hg up '5^'
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg revert -ar 5
@@ -914,7 +914,7 @@ 
   changeset:   7:50c51b361e60
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  instability: orphan, bumped
+  instability: orphan, phase-divergent
   summary:     add babar
   
 
@@ -926,15 +926,15 @@ 
 test the "troubles" templatekw
 
   $ hg log -r 'bumped() and unstable()'
-  7:50c51b361e60 (draft orphan bumped) [ ] add babar
+  7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar
 
 test the default cmdline template
 
   $ hg log -T default -r 'bumped()'
   changeset:   7:50c51b361e60
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  trouble:     orphan, bumped
+  trouble:     orphan, phase-divergent
   summary:     add babar
   
   $ hg log -T default -r 'obsolete()'
@@ -950,14 +950,14 @@ 
   $ hg up -r 'bumped() and unstable()'
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg summary
-  parent: 7:50c51b361e60  (orphan, bumped)
+  parent: 7:50c51b361e60  (orphan, phase-divergent)
    add babar
   branch: default
   commit: (clean)
   update: 2 new changesets (update)
   phases: 4 draft
   orphan: 2 changesets
-  bumped: 1 changesets
+  phase-divergent: 1 changesets
   $ hg up -r 'obsolete()'
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg summary
@@ -968,7 +968,7 @@ 
   update: 3 new changesets (update)
   phases: 4 draft
   orphan: 2 changesets
-  bumped: 1 changesets
+  phase-divergent: 1 changesets
 
 Test incoming/outcoming with changesets obsoleted remotely, known locally
 ===============================================================================
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -677,9 +677,10 @@ 
         if unfi.obsstore:
             # this message are here for 80 char limit reason
             mso = _("push includes obsolete changeset: %s!")
+            mspd = _("push includes phase-divergent changeset: %s!")
             mscd = _("push includes content-divergent changeset: %s!")
             mst = {"orphan": _("push includes orphan changeset: %s!"),
-                   "bumped": _("push includes bumped changeset: %s!"),
+                   "phase-divergent": mspd,
                    "content-divergent": mscd}
             # If we are to push if there is at least one
             # obsolete or unstable changeset in missing, at
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -230,14 +230,14 @@ 
 
         Troubles are returned as strings. possible values are:
         - orphan,
-        - bumped,
+        - phase-divergent,
         - content-divergent.
         """
         troubles = []
         if self.unstable():
             troubles.append('orphan')
         if self.bumped():
-            troubles.append('bumped')
+            troubles.append('phase-divergent')
         if self.divergent():
             troubles.append('content-divergent')
         return troubles
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4943,7 +4943,7 @@ 
             troublemsg = {
                "unstable": _("orphan: %d changesets"),
                "divergent": _("content-divergent: %d changesets"),
-               "bumped": _("bumped: %d changesets"),
+               "bumped": _("phase-divergent: %d changesets"),
             }
             if numtrouble > 0:
                 ui.status(troublemsg[trouble] % numtrouble + "\n")