martinvonz added a comment.

  Here's a case I just ran into where I would have liked to de-obsolete a 
commit:
  
  1. Someone queues a patch and pushes to central repo. Repo looks like this:
  
    o  B
    |
    o  A
  
  
  
  2. I fix a typo and and amend, but I forget to push.
  3. I build my own commit on top. My repo:
  
    o  X
    |
    o  B'
    |
    o  A
  
  
  
  4. Someone pushes new patches to central repo. Central repo:
  
    o  C
    |
    o  B
    |
    o  A
  
  
  
  5. I pull from central repo. My repo:
  
    o  C
    |
    x B
    |
    | o  X
    | |
    | o  B'
    |/
    o  A
  
  
  
  6. I move my change onto the new upstream and prune my local B' that's now 
unwanted:
  
    o X'
    |
    o  C
    |
    x B
    |
    | x B'
    |/
    o  A
  
  If upstream history was really just a single commit (`C` above), then the 
obvious thing to do is to just evolve that commit and push it. However, 
sometimes there is a long chain on top, and in my case there was a separate 
commit upstream that fixed the typo I fixed when I amended `B` and it would be 
a little confusing to explain why someone's fix was "lost".  So I'd prefer to 
mark B as no longer obsolete. I know I can do that with `hg strip B'`, but that 
also strips `X`, which is probably not a big loss, but it's a weird 
side-effect. Perhaps all I'm asking for is a way of dropping the obsmarker 
between `B` and `B'`. I don't know what the best UI for that would be, though. 
For now, I guess I'll use `hg strip`.

REPOSITORY
  rHG Mercurial

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

To: indygreg, #hg-reviewers
Cc: martinvonz, markand, durin42, lothiraldan, pulkit, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to