Commits

Pierre-Yves David committed 20e2f2d

stabilize: conflicting changeset are considered if "."

if not unstable changeset are found, the current parent directory may be
stabilize if conflicting

  • Participants
  • Parent commits b12ff7e
  • Branches default

Comments (0)

Files changed (2)

File hgext/evolve.py

 def _picknexttroubled(ui, repo, any=False):
     """Pick a the next trouble changeset to solve"""
     tr = _stabilizableunstable(repo, repo['.'])
+    if tr is None:
+        wdp = repo['.']
+        if 'conflicting' in wdp.troubles():
+            tr = wdp
     if tr is None and any:
         troubled = list(repo.set('unstable()'))
         if not troubled:
             troubled = list(repo.set('conflicting()'))
         if troubled:
             tr = troubled[0]
+
     return tr
 
 

File tests/test-stabilize-result.t

 
 Stabilize of late comer with different parent
 ==================================================
+
 (the with same parent is handled in test-evolve.t)
 
   $ glog
   |
   o  0:07f494440405@default(public) bk:[] adda
   
+
+Stabilize of conflicting changeset with same parent
+====================================================
+
+
+  $ hg up 9
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ glog
+  o  14:1d94fef80e85@default(draft) bk:[] latecomer update to e3183e9c0961:
+  |
+  | @  9:355c5cda4de1@default(draft) bk:[] add c
+  | |
+  o |  8:e3183e9c0961@default(public) bk:[] newer a
+  |/
+  o  7:e8cc1b534401@default(public) bk:[changea] changea
+  |
+  o  0:07f494440405@default(public) bk:[] adda
+  
+  $ echo 'babar' >> a
+  $ hg amend
+  $ hg up 9
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  Working directory parent is obsolete
+  $ mv a a.old
+  $ echo 'jungle' > a
+  $ cat a.old >> a
+  $ rm a.old
+  $ hg amend
+  2 new conflictings changesets
+  $ glog
+  @  18:5d568f72d576@default(draft) bk:[] add c
+  |
+  | o  16:a311193de6c8@default(draft) bk:[] add c
+  |/
+  | o  14:1d94fef80e85@default(draft) bk:[] latecomer update to e3183e9c0961:
+  | |
+  | o  8:e3183e9c0961@default(public) bk:[] newer a
+  |/
+  o  7:e8cc1b534401@default(public) bk:[changea] changea
+  |
+  o  0:07f494440405@default(public) bk:[] adda
+  
+
+Stabilize It
+
+  $ hg stabilize
+  conflicting not handled yet
+  [4]