##// END OF EJS Templates
status: make morestatus call out unresolved conflicts after update...
Rodrigo Damazio Bovendorp -
r44391:489fdf27 default
parent child Browse files
Show More
@@ -818,20 +818,22 b' class morestatus(object):'
818 fm.data(unresolved=True)
818 fm.data(unresolved=True)
819
819
820 def formatfooter(self, fm):
820 def formatfooter(self, fm):
821 fm.startitem()
821 if self.unfinishedop or self.unfinishedmsg:
822 fm.data(
822 fm.startitem()
823 itemtype=b'morestatus',
823 fm.data(itemtype=b'morestatus')
824 unfinished=self.unfinishedop,
824
825 unfinishedmsg=self.unfinishedmsg,
825 if self.unfinishedop:
826 )
826 fm.data(unfinished=self.unfinishedop)
827
827 statemsg = (
828 statemsg = (
828 _(b'The repository is in an unfinished *%s* state.')
829 _(b'The repository is in an unfinished *%s* state.')
829 % self.unfinishedop
830 % self.unfinishedop
830 )
831 )
831 fm.plain(b'%s\n' % _commentlines(statemsg), label=self._label)
832 fm.plain(b'%s\n' % _commentlines(statemsg), label=self._label)
832 if self.unfinishedmsg:
833 fm.data(unfinishedmsg=self.unfinishedmsg)
833
834
834 self._formatconflicts(fm)
835 self._formatconflicts(fm)
836
835 if self.unfinishedmsg:
837 if self.unfinishedmsg:
836 fm.plain(
838 fm.plain(
837 b'%s\n' % _commentlines(self.unfinishedmsg), label=self._label
839 b'%s\n' % _commentlines(self.unfinishedmsg), label=self._label
@@ -870,12 +872,12 b' def readmorestatus(repo):'
870 statetuple = statemod.getrepostate(repo)
872 statetuple = statemod.getrepostate(repo)
871 mergestate = mergemod.mergestate.read(repo)
873 mergestate = mergemod.mergestate.read(repo)
872 activemerge = mergestate.active()
874 activemerge = mergestate.active()
873 if not statetuple:
875 if not statetuple and not activemerge:
874 return None
876 return None
875
877
876 unfinishedop, unfinishedmsg = statetuple
878 unfinishedop = unfinishedmsg = unresolved = None
877 mergestate = mergemod.mergestate.read(repo)
879 if statetuple:
878 unresolved = None
880 unfinishedop, unfinishedmsg = statetuple
879 if activemerge:
881 if activemerge:
880 unresolved = sorted(mergestate.unresolved())
882 unresolved = sorted(mergestate.unresolved())
881 return morestatus(
883 return morestatus(
@@ -252,6 +252,12 b' Cases are run as shown in that table, ro'
252 $ hg st
252 $ hg st
253 M a
253 M a
254 ? a.orig
254 ? a.orig
255 # Unresolved merge conflicts:
256 #
257 # a
258 #
259 # To mark files as resolved: hg resolve --mark FILE
260
255 $ cat a
261 $ cat a
256 <<<<<<< working copy: 6efa171f091b - test: 3
262 <<<<<<< working copy: 6efa171f091b - test: 3
257 three
263 three
@@ -315,6 +321,12 b' File conflict is not allowed'
315 $ rm a.orig
321 $ rm a.orig
316 $ hg status
322 $ hg status
317 M a
323 M a
324 # Unresolved merge conflicts:
325 #
326 # a
327 #
328 # To mark files as resolved: hg resolve --mark FILE
329
318 $ hg resolve -l
330 $ hg resolve -l
319 U a
331 U a
320
332
@@ -553,6 +565,12 b' Test that statuses are reported properly'
553 $ hg status
565 $ hg status
554 M a
566 M a
555 M foo
567 M foo
568 # Unresolved merge conflicts:
569 #
570 # a
571 #
572 # To mark files as resolved: hg resolve --mark FILE
573
556
574
557 $ hg revert -r . a
575 $ hg revert -r . a
558
576
@@ -561,6 +579,12 b' Test that statuses are reported properly'
561 U a
579 U a
562 $ hg status
580 $ hg status
563 M foo
581 M foo
582 # Unresolved merge conflicts:
583 #
584 # a
585 #
586 # To mark files as resolved: hg resolve --mark FILE
587
564 $ hg status -Tjson
588 $ hg status -Tjson
565 [
589 [
566 {
590 {
@@ -577,6 +601,8 b' Test that statuses are reported properly'
577 R a
601 R a
578 $ hg status
602 $ hg status
579 M foo
603 M foo
604 # No unresolved merge conflicts.
605
580 $ hg status -Tjson
606 $ hg status -Tjson
581 [
607 [
582 {
608 {
@@ -589,6 +615,8 b' Test that statuses are reported properly'
589 Test that 4 is detected as the no-argument destination from 3 and also moves
615 Test that 4 is detected as the no-argument destination from 3 and also moves
590 the bookmark with it
616 the bookmark with it
591 $ hg up --quiet 0 # we should be able to update to 3 directly
617 $ hg up --quiet 0 # we should be able to update to 3 directly
618 $ hg status
619 M foo
592 $ hg up --quiet --hidden 3 # but not implemented yet.
620 $ hg up --quiet --hidden 3 # but not implemented yet.
593 updated to hidden changeset 6efa171f091b
621 updated to hidden changeset 6efa171f091b
594 (hidden revision '6efa171f091b' was rewritten as: d047485b3896)
622 (hidden revision '6efa171f091b' was rewritten as: d047485b3896)
General Comments 0
You need to be logged in to leave comments. Login now