Show More
@@ -255,7 +255,7 b' def writediffproperties(ctx, diff):' | |||||
255 | callconduit(ctx.repo(), 'differential.setdiffproperty', params) |
|
255 | callconduit(ctx.repo(), 'differential.setdiffproperty', params) | |
256 |
|
256 | |||
257 | def createdifferentialrevision(ctx, revid=None, parentrevid=None, oldnode=None, |
|
257 | def createdifferentialrevision(ctx, revid=None, parentrevid=None, oldnode=None, | |
258 | actions=None): |
|
258 | olddiff=None, actions=None): | |
259 | """create or update a Differential Revision |
|
259 | """create or update a Differential Revision | |
260 |
|
260 | |||
261 | If revid is None, create a new Differential Revision, otherwise update |
|
261 | If revid is None, create a new Differential Revision, otherwise update | |
@@ -279,6 +279,13 b' def createdifferentialrevision(ctx, revi' | |||||
279 | diff = creatediff(ctx) |
|
279 | diff = creatediff(ctx) | |
280 | writediffproperties(ctx, diff) |
|
280 | writediffproperties(ctx, diff) | |
281 | transactions.append({'type': 'update', 'value': diff[r'phid']}) |
|
281 | transactions.append({'type': 'update', 'value': diff[r'phid']}) | |
|
282 | else: | |||
|
283 | # Even if we don't need to upload a new diff because the patch content | |||
|
284 | # does not change. We might still need to update its metadata so | |||
|
285 | # pushers could know the correct node metadata. | |||
|
286 | assert olddiff | |||
|
287 | diff = olddiff | |||
|
288 | writediffproperties(ctx, diff) | |||
282 |
|
289 | |||
283 | # Use a temporary summary to set dependency. There might be better ways but |
|
290 | # Use a temporary summary to set dependency. There might be better ways but | |
284 | # I cannot find them for now. But do not do that if we are updating an |
|
291 | # I cannot find them for now. But do not do that if we are updating an | |
@@ -383,7 +390,7 b' def phabsend(ui, repo, *revs, **opts):' | |||||
383 | if oldnode != ctx.node(): |
|
390 | if oldnode != ctx.node(): | |
384 | # Create or update Differential Revision |
|
391 | # Create or update Differential Revision | |
385 | revision = createdifferentialrevision(ctx, revid, lastrevid, |
|
392 | revision = createdifferentialrevision(ctx, revid, lastrevid, | |
386 | oldnode, actions) |
|
393 | oldnode, olddiff, actions) | |
387 | newrevid = int(revision[r'object'][r'id']) |
|
394 | newrevid = int(revision[r'object'][r'id']) | |
388 | if revid: |
|
395 | if revid: | |
389 | action = _('updated') |
|
396 | action = _('updated') |
General Comments 0
You need to be logged in to leave comments.
Login now