hgext/phabricator.py
changeset 41163 0101a35deae2
parent 41080 9d35ae3d9999
child 41164 43fd1947301d
equal deleted inserted replaced
41162:cc1f545c4075 41163:0101a35deae2
    57     httpconnection as httpconnectionmod,
    57     httpconnection as httpconnectionmod,
    58     mdiff,
    58     mdiff,
    59     obsutil,
    59     obsutil,
    60     parser,
    60     parser,
    61     patch,
    61     patch,
       
    62     phases,
    62     registrar,
    63     registrar,
    63     scmutil,
    64     scmutil,
    64     smartset,
    65     smartset,
    65     tags,
    66     tags,
    66     templateutil,
    67     templateutil,
   582                 drev = [d for d in drevs if int(d[r'id']) == drevid][0]
   583                 drev = [d for d in drevs if int(d[r'id']) == drevid][0]
   583                 newdesc = getdescfromdrev(drev)
   584                 newdesc = getdescfromdrev(drev)
   584                 newdesc = encoding.unitolocal(newdesc)
   585                 newdesc = encoding.unitolocal(newdesc)
   585                 # Make sure commit message contain "Differential Revision"
   586                 # Make sure commit message contain "Differential Revision"
   586                 if old.description() != newdesc:
   587                 if old.description() != newdesc:
       
   588                     if old.phase() == phases.public:
       
   589                         ui.warn(_("warning: not updating public commit %s\n")
       
   590                                 % scmutil.formatchangeid(old))
       
   591                         continue
   587                     parents = [
   592                     parents = [
   588                         mapping.get(old.p1().node(), (old.p1(),))[0],
   593                         mapping.get(old.p1().node(), (old.p1(),))[0],
   589                         mapping.get(old.p2().node(), (old.p2(),))[0],
   594                         mapping.get(old.p2().node(), (old.p2(),))[0],
   590                     ]
   595                     ]
   591                     new = context.metadataonlyctx(
   596                     new = context.metadataonlyctx(