Mercurial > evolve
comparison hgext/evolve.py @ 751:a5474648a9d2
gdown/gup: add next/previous alias
Up and down refer to the customary order in log output rather than
concepts; as such, it may be confusing to the user. I for one found
them suprising -- they just didn't fit with my mental model.
Previous and next, however, imply a clear parent/child relationship.
We attroduce the new name as aliases for now.
author | Dan Villiom Podlaski Christiansen <dan@cabo.dk> |
---|---|
date | Fri, 15 Nov 2013 21:33:54 -0500 |
parents | ddbea2fdee5e |
children | bfdfdf731f8a |
comparison
equal
deleted
inserted
replaced
750:ddbea2fdee5e | 751:a5474648a9d2 |
---|---|
1236 | 1236 |
1237 | 1237 |
1238 | 1238 |
1239 shorttemplate = '[{rev}] {desc|firstline}\n' | 1239 shorttemplate = '[{rev}] {desc|firstline}\n' |
1240 | 1240 |
1241 @command('^gdown', | 1241 @command('^gdown|previous', |
1242 [], | 1242 [], |
1243 '') | 1243 '') |
1244 def cmdgdown(ui, repo): | 1244 def cmdprevious(ui, repo): |
1245 """update to parent and display summary lines""" | 1245 """update to parent and display summary lines""" |
1246 wkctx = repo[None] | 1246 wkctx = repo[None] |
1247 wparents = wkctx.parents() | 1247 wparents = wkctx.parents() |
1248 if len(wparents) != 1: | 1248 if len(wparents) != 1: |
1249 raise util.Abort('merge in progress') | 1249 raise util.Abort('merge in progress') |
1259 for p in parents: | 1259 for p in parents: |
1260 displayer.show(p) | 1260 displayer.show(p) |
1261 ui.warn(_('multiple parents, explicitly update to one\n')) | 1261 ui.warn(_('multiple parents, explicitly update to one\n')) |
1262 return 1 | 1262 return 1 |
1263 | 1263 |
1264 @command('^gup', | 1264 @command('^gup|next', |
1265 [], | 1265 [], |
1266 '') | 1266 '') |
1267 def cmdup(ui, repo): | 1267 def cmdnext(ui, repo): |
1268 """update to child and display summary lines""" | 1268 """update to child and display summary lines""" |
1269 wkctx = repo[None] | 1269 wkctx = repo[None] |
1270 wparents = wkctx.parents() | 1270 wparents = wkctx.parents() |
1271 if len(wparents) != 1: | 1271 if len(wparents) != 1: |
1272 raise util.Abort('merge in progress') | 1272 raise util.Abort('merge in progress') |