75570fb95674659964f2488baffae618ba1de49c
hiram
  Thu Aug 20 09:38:11 2026 -0700
nodge should check for file has contents not just exists claude review recommendation refs #38021

diff --git src/hg/utils/automation/HgAutomate.pm src/hg/utils/automation/HgAutomate.pm
index 3e9ccc34ed4..f7e3164df17 100755
--- src/hg/utils/automation/HgAutomate.pm
+++ src/hg/utils/automation/HgAutomate.pm
@@ -925,37 +925,37 @@
   return $isNfs;
 }
 
 sub nfsNoodge {
   # the touch of the directory causes NFS to refresh its directory
   # information and thus pick up status change to the file.
   # sometimes localhost can't see the newly created file immediately,
   # so insert some artificial delay in order to prevent the next step
   # from dieing on lack of file.  Only NFS needs this trick; GPFS
   # (/hive today) already keeps its caches coherent between machines,
   # so skip the delay there entirely. refs #38021
   my ($file) = @_;
   confess "Must have exactly 1 argument" if (scalar(@_) != 1);
   confess "undef input" if (! defined $file);
   return if ($main::opt_debug);
-  return if ( -e $file );	# already visible, nothing to noodge
+  return if ( -s $file );	# already visible, nothing to noodge
   my $dir = dirname($file);
   return if (! isNfsDir($dir));
   for (my $i=0;  $i < 5;  $i++) {
     `touch $dir`;
     sleep(4);
-    last if ( -e $file );
+    last if ( -s $file );
   }
 }
 
 sub run {
   # Run a command in sh (unless -debug).
   my ($cmd) = @_;
   confess "Must have exactly 1 argument" if (scalar(@_) != 1);
   confess "undef input" if (! defined $cmd);
   if ($main::opt_debug) {
     print "#DEBUG# $cmd\n";
   } else {
     verbose(1, "# $cmd\n");
     system($cmd) == 0 || die "Command failed:\n$cmd\n";
   }
 }