comparison tests/test-prev-next.t @ 3547:78abffad8626

next: prompt user to choose a children in case of ambiguity This patch adds functionality to prompt user and ask the children to which next should move to incase of multiple childrens. This is a very nice UI because otherwise user has to lookup changeset hash, and then manually do `hg update` to that. In this case we show hash and description so user can choose which one to update easily. It is using the interactive revision choosing functionality added in a previous patch.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 16 Mar 2018 11:46:47 +0530
parents d197e6f0d0e3
children 802441114400
comparison
equal deleted inserted replaced
3546:d197e6f0d0e3 3547:78abffad8626
1 $ cat >> $HGRCPATH <<EOF 1 $ cat >> $HGRCPATH <<EOF
2 > [ui]
3 > interactive = True
2 > [extensions] 4 > [extensions]
3 > EOF 5 > EOF
4 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH 6 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
5 7
6 hg prev & next move to parent/child 8 hg prev & next move to parent/child
208 $ hg commit -m 'added d' 210 $ hg commit -m 'added d'
209 created new head 211 created new head
210 $ hg prev 212 $ hg prev
211 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 213 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
212 [3] added b (2) 214 [3] added b (2)
213 $ hg next 215 $ hg next <<EOF
214 ambiguous next changeset: 216 > 1
215 [4] added c 217 > EOF
218 ambiguous next changeset, choose one to update:
219 0: [e3b6d5df389b] added c
220 1: [9df671ccd2c7] added d
221 q: quit the prompt
222 enter the index of the revision you want to select: 1
223 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
216 [5] added d 224 [5] added d
217 explicitly update to one of them 225
218 [1] 226 $ hg prev
227 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
228 [3] added b (2)
219 229
220 next with ambiguity in aspiring children 230 next with ambiguity in aspiring children
221 231
222 $ hg am -m 'added b (3)' 232 $ hg am -m 'added b (3)'
223 2 new orphan changesets 233 2 new orphan changesets