From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.bugs Subject: bug#58842: 29.0.50/tramp; copy-file KEEP-TIME gives the target earlier time Date: Fri, 28 Oct 2022 12:39:31 -0400 Message-ID: Reply-To: sds@gnu.org Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19677"; mail-complaints-to="usenet@ciao.gmane.io" To: 58842@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 28 18:40:33 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ooSPJ-0004th-Ad for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Oct 2022 18:40:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooSOq-0001y4-51; Fri, 28 Oct 2022 12:40:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooSOo-0001pe-Of for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2022 12:40:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ooSOo-0007Up-FO for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2022 12:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ooSOo-0006LK-9l for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2022 12:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sam Steingold Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Oct 2022 16:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58842 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166697518824356 (code B ref -1); Fri, 28 Oct 2022 16:40:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Oct 2022 16:39:48 +0000 Original-Received: from localhost ([127.0.0.1]:34171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooSOZ-0006Kl-Db for submit@debbugs.gnu.org; Fri, 28 Oct 2022 12:39:48 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooSOU-0006Ka-AG for submit@debbugs.gnu.org; Fri, 28 Oct 2022 12:39:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooSOU-00081X-3r for bug-gnu-emacs@gnu.org; Fri, 28 Oct 2022 12:39:42 -0400 Original-Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ooSOO-0007Ni-1T; Fri, 28 Oct 2022 12:39:41 -0400 Original-Received: by mail-qv1-xf2c.google.com with SMTP id x13so4409802qvn.6; Fri, 28 Oct 2022 09:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:reply-to:return-receipt-to:subject:to :from:sender:from:to:cc:subject:date:message-id:reply-to; bh=fxMHPFtOEfClIVIIUGT+u6ywTUtgmGGYeUnCHLBrOgs=; b=a2KZj4NSenya/uOQwjwLa7cj/ZmZ74orYzvJyQyp/7p6DDLnRvHbI4tMaUjrlvt90k 9ZJSsj5p+W2E0e2N+iW+eQwqNuaGKTWRCXTaRQkVIibiI09GuFBuBW9qhIu2TZ5UsRj9 zyCLRHFixYGNq4PTdtAtGyViQ77iXzw+2CM6V68AW2+D8dtAMkoYQvp9sBztweRLHMpe oti3vY3i6GSlNF0l6ke0UHtlJdVWK+emVPF6Db4Hj5xAynhZMFEk1Z3giKxbdbjXZOl3 DsLW474mMkTJGSKwus0alZAEZmBrI025uBX0gOcRxVLyswyMAlCqJktwrVAXzKZPI7lv SqMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:reply-to:return-receipt-to:subject:to :from:sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fxMHPFtOEfClIVIIUGT+u6ywTUtgmGGYeUnCHLBrOgs=; b=F9EFYN+A9Nh5xbuPoHND2hvPocucT+ovV23WjokR31HJbJwfBEdi5i1v7oI6GnknJj yQwgPkITz3Fvv+Sr47Pnv5hY3f6izsazuK27VLxlugqZ018afv3N3/jQ9KBKtjlrkY/Y ylxTeA3tgxXDiLG3ijh59j9Drd8ISNsXksaYs3U3pMWnFuK5Yh11c798wMLsUSkq/GBa aMxREIXhYHIiBTd9L41BDfIMUzcdNL7YY/N4C8mC8+K+ME6kRTE1MZTYLLRQ1ZSJUyfg pyfQF3aajBAXeVASj1RQdw1tifcOUmhOxxanaTltQQiF7sQB/v7QUeFn/E9XQv5BWNF1 tv4A== X-Gm-Message-State: ACrzQf0m7h8ED+4E/rVOmtkNObzDLG/BxjnLeJD3RqS3Hza7jlGMTVXH bLxQYN4ihMaEKVeTopxT1VM8nipzWg== X-Google-Smtp-Source: AMsMyM7hrv0IWLh4O5vRuAYfAUClNfBLybxEwl6251yTpkJQHXdCIuoO/tDrJOdZfhvCRw97yvwdYA== X-Received: by 2002:a05:6214:19cc:b0:4bb:5917:3ce0 with SMTP id j12-20020a05621419cc00b004bb59173ce0mr201396qvc.49.1666975173537; Fri, 28 Oct 2022 09:39:33 -0700 (PDT) Original-Received: from 3c22fb11fdab.ant.amazon.com (pool-72-69-2-113.nycmny.fios.verizon.net. [72.69.2.113]) by smtp.gmail.com with ESMTPSA id bs10-20020ac86f0a000000b0035ce8965045sm2591771qtb.42.2022.10.28.09.39.32 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Oct 2022 09:39:32 -0700 (PDT) X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Received-SPF: pass client-ip=2607:f8b0:4864:20::f2c; envelope-from=sam.steingold@gmail.com; helo=mail-qv1-xf2c.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246436 Archived-At: One property of `copy-file' that I came to expect is: (copy-file src dst ...) is successful ==> (file-newer-than-file-p src dst) is false This ensures that the same file is not copied over and over. Alas, this does not hold in the following corner case: 1. src is local on mac 2. dst is remote on linux 3. KEEP-TIME is passed to `copy-file' In this case, after `(copy-file src dst t t)`, --8<---------------cut here---------------start------------->8--- (file-attribute-modification-time (file-attributes dst)) => (25435 65247 0 0) (file-attribute-modification-time (file-attributes src)) => (25435 65247 279367 729000) --8<---------------cut here---------------end--------------->8--- I understand this is bad behavior is covered by the `copy-file' doc --8<---------------cut here---------------start------------->8--- Fourth arg KEEP-TIME non-nil means give the output file the same last-modified time as the old one. (This works on only some systems.) --8<---------------cut here---------------end--------------->8--- but it would seem to be relatively easy to fix by rounding _up_ the time before calling the tramp handler for `set-file-times'. Thank you. In GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.6 (Build 21G115)) of 2022-10-24 built on 3c22fb11fdab.ant.amazon.com Repository revision: 366169450392c7025665f6477e5062be72c7280f Repository branch: master Windowing system distributor 'Apple', version 10.3.2113 System Description: macOS 12.6 Configured using: 'configure --with-imagemagick --with-mailutils --with-ns PKG_CONFIG_PATH=' Configured features: ACL GIF GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM ZLIB Important settings: value of $LANG: C locale-coding-system: utf-8-unix Major mode: Org Minor modes in effect: shell-dirtrack-mode: t pyvenv-mode: t flyspell-mode: t display-fill-column-indicator-mode: t global-edit-server-edit-mode: t winner-mode: t which-function-mode: t url-handler-mode: t desktop-save-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t column-number-mode: t line-number-mode: t auto-fill-function: org-auto-fill-function auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t abbrev-mode: t Load-path shadows: None found. Features: (shadow bbdb-message mailalias cookie1 emacsbug tramp-adb tramp-archive tramp-container tramp-ftp tramp-gvfs shortdoc tramp-cmds url-http url-gw url-auth url-cache nndoc qp flow-fill mm-archive sort smiley gnus-cite textsec uni-scripts idna-mapping uni-confusable textsec-check gnus-async gnus-bcklg gnus-dup mail-extr gnus-ml hl-line disp-table spam spam-stat gnus-uu yenc nndraft nnmh gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg utf-7 gnus-cache bbdb-gnus network-stream nsm nntp cal-move package apropos cl-print skeleton dabbrev log-edit vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view pcvs-util misearch multi-isearch vc-annotate display-line-numbers smerge-mode diff add-log vc-hg vc-bzr tramp-cache time-stamp tramp-sh tramp tramp-loaddefs trampver tramp-integration tramp-compat ls-lisp remember emacs-news-mode tex-mode shell dired-aux mhtml-mode css-mode smie color js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode facemenu bug-reference vc-dir ewoc vc company-oddmuse company-keywords company-etags company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-template company-cmake company-bbdb yasnippet-snippets yasnippet flymake-proc flymake company-capf company help-fns radix-tree elpy elpy-rpc pyvenv eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util cus-start elpy-shell elpy-profile elpy-django s elpy-refactor ido hideshow grep compile files-x etags fileloop xref python project compat compat-macs flyspell ispell display-fill-column-indicator org-element avl-tree generator cl-extra ol-eww eww xdg url-queue thingatpt mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file svg dom browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time gnus-spec gnus-int gnus-range message sendmail mailcap yank-media puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums gmm-utils mailheader gnus-win ol-docview doc-view filenotify jka-compr image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete comint ansi-osc ansi-color org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601 ol rx org-keys oc org-compat org-macs org-loaddefs format-spec cal-x view cal-china cal-bahai cal-islam holidays holiday-loaddefs bbdb-anniv cal-iso cal-hebrew lunar cal-julian solar cal-dst appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs vc-git diff-mode easy-mmode vc-dispatcher midnight dired dired-loaddefs cus-edit pp warnings icons gnus nnheader gnus-util text-property-search time-date mail-utils range mm-util mail-prsvr wid-edit bbdb-mua bbdb-com crm mailabbrev bbdb bbdb-site timezone modus-vivendi-theme modus-themes pcase edit-server advice server winner ring which-func imenu edebug debug backtrace help-mode find-func url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile cconv url-vars help-at-pt desktop frameset cl-loaddefs cl-lib cus-load info bbdb-autoloads edit-server-autoloads ein-autoloads elpy-autoloads company-autoloads fb2-reader-autoloads async-autoloads f-autoloads dash-autoloads markdown-mode-autoloads polymode-autoloads request-autoloads s-autoloads websearch-autoloads with-editor-autoloads compat-autoloads yaml-mode-autoloads yasnippet-snippets-autoloads rmc iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 802255 121214) (symbols 48 41505 4) (strings 32 285576 10877) (string-bytes 1 7676394) (vectors 16 110700) (vector-slots 8 2392334 272891) (floats 8 1495 665) (intervals 56 17832 6120) (buffers 1000 48)) -- Sam Steingold (https://aphar.dreamwidth.org/) on darwin Ns 10.3.2113 https://lastingimpactpsychology.com https://steingoldpsychology.com http://think-israel.org https://www.dhimmitude.org https://memri.org Do not worry about which side your bread is buttered on: you eat BOTH sides.