Mercurial > public > mercurial-scm > hg
comparison mercurial/ui.py @ 34054:3c82b14d2838
editor: file created for diff action should have .diff suffix
This is a follow-up to https://phab.mercurial-scm.org/D464 (6e6452bc441d) that
introduced the new file extension behavior. It erroneously changed `.diff` to
`.diff.hg.txt`.
Test Plan:
Verified `make tests` passes, particularly `test-editor-filename.t`.
Differential Revision: https://phab.mercurial-scm.org/D607
author | Michael Bolin <mbolin@fb.com> |
---|---|
date | Fri, 01 Sep 2017 20:28:26 +0000 |
parents | 6e6452bc441d |
children | 0fa781320203 |
comparison
equal
deleted
inserted
replaced
34053:24ce7b0edaf9 | 34054:3c82b14d2838 |
---|---|
1359 self.develwarn('extra.suffix is not None but will soon be ' | 1359 self.develwarn('extra.suffix is not None but will soon be ' |
1360 'ignored by ui.edit()') | 1360 'ignored by ui.edit()') |
1361 extra_defaults.update(extra) | 1361 extra_defaults.update(extra) |
1362 extra = extra_defaults | 1362 extra = extra_defaults |
1363 | 1363 |
1364 if action: | 1364 if action == 'diff': |
1365 suffix = '.diff' | |
1366 elif action: | |
1365 suffix = '.%s.hg.txt' % action | 1367 suffix = '.%s.hg.txt' % action |
1366 else: | 1368 else: |
1367 suffix = extra['suffix'] | 1369 suffix = extra['suffix'] |
1368 | 1370 |
1369 rdir = None | 1371 rdir = None |