##// END OF EJS Templates
phabricator: update diff property even if we choose not to create a new diff...
Jun Wu -
r33655:f100354c default
parent child Browse files
Show More
@@ -255,7 +255,7 b' def writediffproperties(ctx, diff):'
255 255 callconduit(ctx.repo(), 'differential.setdiffproperty', params)
256 256
257 257 def createdifferentialrevision(ctx, revid=None, parentrevid=None, oldnode=None,
258 actions=None):
258 olddiff=None, actions=None):
259 259 """create or update a Differential Revision
260 260
261 261 If revid is None, create a new Differential Revision, otherwise update
@@ -279,6 +279,13 b' def createdifferentialrevision(ctx, revi'
279 279 diff = creatediff(ctx)
280 280 writediffproperties(ctx, diff)
281 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 290 # Use a temporary summary to set dependency. There might be better ways but
284 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 390 if oldnode != ctx.node():
384 391 # Create or update Differential Revision
385 392 revision = createdifferentialrevision(ctx, revid, lastrevid,
386 oldnode, actions)
393 oldnode, olddiff, actions)
387 394 newrevid = int(revision[r'object'][r'id'])
388 395 if revid:
389 396 action = _('updated')
General Comments 0
You need to be logged in to leave comments. Login now