[PATCH] filectxactions: allow copying and renaming added files

10 views
Skip to first unread message

Aay Jay Chan

unread,
Feb 17, 2024, 4:41:47 AMFeb 17
to thg...@googlegroups.com
# HG changeset patch
# User Aay Jay Chan <aayja...@gmail.com>
# Date 1708162534 0
# Sat Feb 17 09:35:34 2024 +0000
# Node ID 66ada0274a3320b323d6a3722e026f00b22f8bee
# Parent 9806d49225a505445a9b2bbde5037e3ffa6f1006
filectxactions: allow copying and renaming added files

While the new file won't have copy information, it's convenient to be able to
rename added files from TortoiseHg.

diff --git a/tortoisehg/hgqt/filectxactions.py b/tortoisehg/hgqt/filectxactions.py
--- a/tortoisehg/hgqt/filectxactions.py
+++ b/tortoisehg/hgqt/filectxactions.py
@@ -756,12 +756,12 @@
self._runWorkingFileCommand('revert', fds, revertopts)

@actionSlot(_('&Copy...'), 'edit-copy', None, '',
- (_single, _isfile, _filestatus('MC')))
+ (_single, _isfile, _filestatus('MAC')))
def copyFile(self, fds: List["FileData"]) -> None:
self._openRenameDialog(fds, iscopy=True)

@actionSlot(_('Re&name...'), 'hg-rename', None, '',
- (_single, _isfile, _filestatus('MC')))
+ (_single, _isfile, _filestatus('MAC')))
def renameFile(self, fds: List["FileData"]) -> None:
self._openRenameDialog(fds, iscopy=False)


Yuya Nishihara

unread,
Feb 17, 2024, 8:42:43 AMFeb 17
to Aay Jay Chan, thg...@googlegroups.com
On Sat, 17 Feb 2024 09:41:44 +0000, Aay Jay Chan wrote:
> # HG changeset patch
> # User Aay Jay Chan <aayja...@gmail.com>
> # Date 1708162534 0
> # Sat Feb 17 09:35:34 2024 +0000
> # Node ID 66ada0274a3320b323d6a3722e026f00b22f8bee
> # Parent 9806d49225a505445a9b2bbde5037e3ffa6f1006
> filectxactions: allow copying and renaming added files
>
> While the new file won't have copy information, it's convenient to be able to
> rename added files from TortoiseHg.

Makes sense. Queued for stable, thanks.
Reply all
Reply to author
Forward
0 new messages