equal
deleted
inserted
replaced
4045 if not rev: |
4045 if not rev: |
4046 ctx = repo[None] |
4046 ctx = repo[None] |
4047 parents = ctx.parents() |
4047 parents = ctx.parents() |
4048 changed = "" |
4048 changed = "" |
4049 if default or id or num: |
4049 if default or id or num: |
4050 if (util.any(repo.status()) |
4050 if (any(repo.status()) |
4051 or util.any(ctx.sub(s).dirty() for s in ctx.substate)): |
4051 or any(ctx.sub(s).dirty() for s in ctx.substate)): |
4052 changed = '+' |
4052 changed = '+' |
4053 if default or id: |
4053 if default or id: |
4054 output = ["%s%s" % |
4054 output = ["%s%s" % |
4055 ('+'.join([hexfunc(p.node()) for p in parents]), changed)] |
4055 ('+'.join([hexfunc(p.node()) for p in parents]), changed)] |
4056 if num: |
4056 if num: |
5520 msg = _("no files or directories specified") |
5520 msg = _("no files or directories specified") |
5521 if p2 != nullid: |
5521 if p2 != nullid: |
5522 hint = _("uncommitted merge, use --all to discard all changes," |
5522 hint = _("uncommitted merge, use --all to discard all changes," |
5523 " or 'hg update -C .' to abort the merge") |
5523 " or 'hg update -C .' to abort the merge") |
5524 raise util.Abort(msg, hint=hint) |
5524 raise util.Abort(msg, hint=hint) |
5525 dirty = util.any(repo.status()) |
5525 dirty = any(repo.status()) |
5526 node = ctx.node() |
5526 node = ctx.node() |
5527 if node != parent: |
5527 if node != parent: |
5528 if dirty: |
5528 if dirty: |
5529 hint = _("uncommitted changes, use --all to discard all" |
5529 hint = _("uncommitted changes, use --all to discard all" |
5530 " changes, or 'hg update %s' to update") % ctx.rev() |
5530 " changes, or 'hg update %s' to update") % ctx.rev() |