equal
deleted
inserted
replaced
327 |
327 |
328 return datemaydiffer |
328 return datemaydiffer |
329 |
329 |
330 |
330 |
331 def checknotesize(ui, opts): |
331 def checknotesize(ui, opts): |
332 """ make sure note is of valid format """ |
332 """make sure note is of valid format""" |
333 |
333 |
334 note = opts.get(b'note') |
334 note = opts.get(b'note') |
335 if not note: |
335 if not note: |
336 return |
336 return |
337 |
337 |
973 |
973 |
974 raise error.UnknownCommand(cmd, allcmds) |
974 raise error.UnknownCommand(cmd, allcmds) |
975 |
975 |
976 |
976 |
977 def changebranch(ui, repo, revs, label, opts): |
977 def changebranch(ui, repo, revs, label, opts): |
978 """ Change the branch name of given revs to label """ |
978 """Change the branch name of given revs to label""" |
979 |
979 |
980 with repo.wlock(), repo.lock(), repo.transaction(b'branches'): |
980 with repo.wlock(), repo.lock(), repo.transaction(b'branches'): |
981 # abort in case of uncommitted merge or dirty wdir |
981 # abort in case of uncommitted merge or dirty wdir |
982 bailifchanged(repo) |
982 bailifchanged(repo) |
983 revs = scmutil.revrange(repo, revs) |
983 revs = scmutil.revrange(repo, revs) |
1104 for s in sorted(ctx.substate): |
1104 for s in sorted(ctx.substate): |
1105 ctx.sub(s).bailifchanged(hint=hint) |
1105 ctx.sub(s).bailifchanged(hint=hint) |
1106 |
1106 |
1107 |
1107 |
1108 def logmessage(ui, opts): |
1108 def logmessage(ui, opts): |
1109 """ get the log message according to -m and -l option """ |
1109 """get the log message according to -m and -l option""" |
1110 |
1110 |
1111 check_at_most_one_arg(opts, b'message', b'logfile') |
1111 check_at_most_one_arg(opts, b'message', b'logfile') |
1112 |
1112 |
1113 message = opts.get(b'message') |
1113 message = opts.get(b'message') |
1114 logfile = opts.get(b'logfile') |
1114 logfile = opts.get(b'logfile') |
3923 nodes = repo.vfs.read(b'graftstate').splitlines() |
3923 nodes = repo.vfs.read(b'graftstate').splitlines() |
3924 return {b'nodes': nodes} |
3924 return {b'nodes': nodes} |
3925 |
3925 |
3926 |
3926 |
3927 def hgabortgraft(ui, repo): |
3927 def hgabortgraft(ui, repo): |
3928 """ abort logic for aborting graft using 'hg abort'""" |
3928 """abort logic for aborting graft using 'hg abort'""" |
3929 with repo.wlock(): |
3929 with repo.wlock(): |
3930 graftstate = statemod.cmdstate(repo, b'graftstate') |
3930 graftstate = statemod.cmdstate(repo, b'graftstate') |
3931 return abortgraft(ui, repo, graftstate) |
3931 return abortgraft(ui, repo, graftstate) |