Show More
@@ -2969,9 +2969,6 b' def _dograft(ui, repo, *revs, **opts):' | |||||
2969 |
|
2969 | |||
2970 | revs = list(revs) |
|
2970 | revs = list(revs) | |
2971 | revs.extend(opts.get(b'rev')) |
|
2971 | revs.extend(opts.get(b'rev')) | |
2972 | basectx = None |
|
|||
2973 | if opts.get(b'base'): |
|
|||
2974 | basectx = scmutil.revsingle(repo, opts[b'base'], None) |
|
|||
2975 | # a dict of data to be stored in state file |
|
2972 | # a dict of data to be stored in state file | |
2976 | statedata = {} |
|
2973 | statedata = {} | |
2977 | # list of new nodes created by ongoing graft |
|
2974 | # list of new nodes created by ongoing graft | |
@@ -3061,6 +3058,8 b' def _dograft(ui, repo, *revs, **opts):' | |||||
3061 | opts[b'log'] = True |
|
3058 | opts[b'log'] = True | |
3062 | if statedata.get(b'no_commit'): |
|
3059 | if statedata.get(b'no_commit'): | |
3063 | opts[b'no_commit'] = statedata.get(b'no_commit') |
|
3060 | opts[b'no_commit'] = statedata.get(b'no_commit') | |
|
3061 | if statedata.get(b'base'): | |||
|
3062 | opts[b'base'] = statedata.get(b'base') | |||
3064 | nodes = statedata[b'nodes'] |
|
3063 | nodes = statedata[b'nodes'] | |
3065 | revs = [repo[node].rev() for node in nodes] |
|
3064 | revs = [repo[node].rev() for node in nodes] | |
3066 | else: |
|
3065 | else: | |
@@ -3073,6 +3072,9 b' def _dograft(ui, repo, *revs, **opts):' | |||||
3073 | revs = scmutil.revrange(repo, revs) |
|
3072 | revs = scmutil.revrange(repo, revs) | |
3074 |
|
3073 | |||
3075 | skipped = set() |
|
3074 | skipped = set() | |
|
3075 | basectx = None | |||
|
3076 | if opts.get(b'base'): | |||
|
3077 | basectx = scmutil.revsingle(repo, opts[b'base'], None) | |||
3076 | if basectx is None: |
|
3078 | if basectx is None: | |
3077 | # check for merges |
|
3079 | # check for merges | |
3078 | for rev in repo.revs(b'%ld and merge()', revs): |
|
3080 | for rev in repo.revs(b'%ld and merge()', revs): | |
@@ -3165,6 +3167,8 b' def _dograft(ui, repo, *revs, **opts):' | |||||
3165 |
|
3167 | |||
3166 | if opts.get(b'no_commit'): |
|
3168 | if opts.get(b'no_commit'): | |
3167 | statedata[b'no_commit'] = True |
|
3169 | statedata[b'no_commit'] = True | |
|
3170 | if opts.get(b'base'): | |||
|
3171 | statedata[b'base'] = True | |||
3168 | for pos, ctx in enumerate(repo.set(b"%ld", revs)): |
|
3172 | for pos, ctx in enumerate(repo.set(b"%ld", revs)): | |
3169 | desc = b'%d:%s "%s"' % ( |
|
3173 | desc = b'%d:%s "%s"' % ( | |
3170 | ctx.rev(), |
|
3174 | ctx.rev(), |
@@ -853,6 +853,26 b' graft --continue after --force' | |||||
853 | $ cat a |
|
853 | $ cat a | |
854 | abc |
|
854 | abc | |
855 |
|
855 | |||
|
856 | graft --continue after --base with conflits | |||
|
857 | ||||
|
858 | $ echo base > d | |||
|
859 | $ hg ci -m _ | |||
|
860 | $ hg graft -r 6 | |||
|
861 | skipping ungraftable merge revision 6 | |||
|
862 | [255] | |||
|
863 | $ hg graft -r 6 --base 5 | |||
|
864 | grafting 6:25a2b029d3ae "6" | |||
|
865 | merging d | |||
|
866 | merging e | |||
|
867 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |||
|
868 | abort: unresolved conflicts, can't continue | |||
|
869 | (use 'hg resolve' and 'hg graft --continue') | |||
|
870 | [1] | |||
|
871 | $ echo a > d && hg resolve -qm | |||
|
872 | continue: hg graft --continue | |||
|
873 | $ hg graft --continue | |||
|
874 | grafting 6:25a2b029d3ae "6" | |||
|
875 | ||||
856 | Continue testing same origin policy, using revision numbers from test above |
|
876 | Continue testing same origin policy, using revision numbers from test above | |
857 | but do some destructive editing of the repo: |
|
877 | but do some destructive editing of the repo: | |
858 |
|
878 |
General Comments 0
You need to be logged in to leave comments.
Login now