changeset 5982:991be5efe7cb stable

topic: correctly update from public commits with a (now hidden) topic
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 27 Jul 2021 03:06:25 +0300
parents 6ac544f0218f
children bfa47d370b2c
files CHANGELOG hgext3rd/topic/destination.py tests/test-topic-dest.t
diffstat 3 files changed, 23 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG	Tue Jul 27 03:00:09 2021 +0300
+++ b/CHANGELOG	Tue Jul 27 03:06:25 2021 +0300
@@ -1,6 +1,14 @@
 Changelog
 =========
 
+10.3.3 - in progress
+--------------------
+
+topic (0.22.3)
+
+  * topic: correctly update from public commits with a (now hidden) topic
+    when hg update is called without any revision (issue6553)
+
 10.3.2 - 2021-05-28
 --------------------
 
--- a/hgext3rd/topic/destination.py	Tue Jul 27 03:00:09 2021 +0300
+++ b/hgext3rd/topic/destination.py	Tue Jul 27 03:06:25 2021 +0300
@@ -10,7 +10,6 @@
 from . import (
     common,
     topicmap,
-    constants,
 )
 from .evolvebits import builddependencies
 
@@ -69,7 +68,7 @@
     topic = repo.currenttopic
     if topic:
         revs = repo.revs(b'.::topic(%s)', topic)
-    elif constants.extrakey in repo[b'.'].extra():
+    elif repo[b'.'].topic():
         revs = []
     else:
         return None, None, None
--- a/tests/test-topic-dest.t	Tue Jul 27 03:00:09 2021 +0300
+++ b/tests/test-topic-dest.t	Tue Jul 27 03:06:25 2021 +0300
@@ -489,6 +489,18 @@
   o  0 () c_alpha
   
 
+Testing that default destination for update is not ignoring phases
+https://bz.mercurial-scm.org/show_bug.cgi?id=6553
+
+  $ hg phase --rev 'desc("Huc")' --public
+
+  $ hg up 'desc("Huc")^'
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg up
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to "efbc6aa717fb: Huc"
+  1 other heads for branch "default"
+
 Default destination for histedit
 ================================
 
@@ -496,7 +508,8 @@
 (even when based on other draft changesets)
 
   $ hg up elephant
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  switching to topic elephant
+  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg phase 'desc(c_zeta)'
   11: draft
   $ HGEDITOR=cat hg histedit | grep pick