equal
deleted
inserted
replaced
62 |
62 |
63 # No files matched commit, so nothing excluded |
63 # No files matched commit, so nothing excluded |
64 if not exclude: |
64 if not exclude: |
65 return None |
65 return None |
66 |
66 |
67 files = (initialfiles - exclude) |
|
68 # return the p1 so that we don't create an obsmarker later |
67 # return the p1 so that we don't create an obsmarker later |
69 if not keepcommit: |
68 if not keepcommit: |
70 return ctx.p1().node() |
69 return ctx.p1().node() |
71 |
70 |
|
71 files = (initialfiles - exclude) |
72 # Filter copies |
72 # Filter copies |
73 copied = copiesmod.pathcopies(base, ctx) |
73 copied = copiesmod.pathcopies(base, ctx) |
74 copied = dict((dst, src) for dst, src in copied.iteritems() |
74 copied = dict((dst, src) for dst, src in copied.iteritems() |
75 if dst in files) |
75 if dst in files) |
76 def filectxfn(repo, memctx, path, contentctx=ctx, redirect=()): |
76 def filectxfn(repo, memctx, path, contentctx=ctx, redirect=()): |
81 fctx.islink(), |
81 fctx.islink(), |
82 fctx.isexec(), |
82 fctx.isexec(), |
83 copied=copied.get(path)) |
83 copied=copied.get(path)) |
84 return mctx |
84 return mctx |
85 |
85 |
|
86 if not files: |
|
87 repo.ui.status(_("note: keeping empty commit\n")) |
|
88 |
86 new = context.memctx(repo, |
89 new = context.memctx(repo, |
87 parents=[base.node(), node.nullid], |
90 parents=[base.node(), node.nullid], |
88 text=ctx.description(), |
91 text=ctx.description(), |
89 files=files, |
92 files=files, |
90 filectxfn=filectxfn, |
93 filectxfn=filectxfn, |