Mercurial > hg
comparison hgext/extdiff.py @ 45400:1bed1b00b18d
extdiff: remove dir2root and pass full path as dir2 in _runperfilediff()
The only use of `dir2root` was to join with `dir2` to generate the path for
other side of diff. Like in previous patch, `dir1a` and `dir1b` are full paths
and no longer base names, hence we pass `dir2` as full path too and making
`dir2root` unrequired.
Differential Revision: https://phab.mercurial-scm.org/D8970
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 29 Aug 2020 14:32:26 +0530 |
parents | e7c5735433ac |
children | 451e13cc6d85 |
comparison
equal
deleted
inserted
replaced
45399:e7c5735433ac | 45400:1bed1b00b18d |
---|---|
253 confirm, | 253 confirm, |
254 commonfiles, | 254 commonfiles, |
255 tmproot, | 255 tmproot, |
256 dir1a, | 256 dir1a, |
257 dir1b, | 257 dir1b, |
258 dir2root, | |
259 dir2, | 258 dir2, |
260 rev1a, | 259 rev1a, |
261 rev1b, | 260 rev1b, |
262 rev2, | 261 rev2, |
263 ): | 262 ): |
278 path1b = os.path.join(dir1b, commonfile) | 277 path1b = os.path.join(dir1b, commonfile) |
279 label1b = commonfile + rev1b | 278 label1b = commonfile + rev1b |
280 if not os.path.isfile(path1b): | 279 if not os.path.isfile(path1b): |
281 path1b = pycompat.osdevnull | 280 path1b = pycompat.osdevnull |
282 | 281 |
283 path2 = os.path.join(dir2root, dir2, commonfile) | 282 path2 = os.path.join(dir2, commonfile) |
284 label2 = commonfile + rev2 | 283 label2 = commonfile + rev2 |
285 | 284 |
286 if confirm: | 285 if confirm: |
287 # Prompt before showing this diff | 286 # Prompt before showing this diff |
288 difffiles = _(b'diff %s (%d of %d)') % ( | 287 difffiles = _(b'diff %s (%d of %d)') % ( |
499 confirm=opts.get(b'confirm'), | 498 confirm=opts.get(b'confirm'), |
500 commonfiles=common, | 499 commonfiles=common, |
501 tmproot=tmproot, | 500 tmproot=tmproot, |
502 dir1a=os.path.join(tmproot, dir1a), | 501 dir1a=os.path.join(tmproot, dir1a), |
503 dir1b=os.path.join(tmproot, dir1b) if do3way else None, | 502 dir1b=os.path.join(tmproot, dir1b) if do3way else None, |
504 dir2root=dir2root, | 503 dir2=os.path.join(dir2root, dir2), |
505 dir2=dir2, | |
506 rev1a=rev1a, | 504 rev1a=rev1a, |
507 rev1b=rev1b, | 505 rev1b=rev1b, |
508 rev2=rev2, | 506 rev2=rev2, |
509 ) | 507 ) |
510 | 508 |