You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2017/08/08 22:04:55 UTC

CR in notify.c

When rolling trunk tarballs I notice the error:

../svn/notify.c:483: warning: internationalized messages should not contain the '\r' escape sequence

The '\r' is intentional, the notification is of the form:

  Checking r32...

and the \r causes the line to get overwritten as the revision changes.
I haven't tested what happens if the revision number gets shorter by
lots of digits, but I suspect that if a long first notification:

  Checking r1234567...

is followed by a short second:

  Checking r99...

the first will not be completely obliterated by the second.

Perhaps we should move the \r out of the internationalized message and
use it in some longer message that is guaranteed to obliterate any
previous message.

-- 
Philip

Re: CR in notify.c

Posted by Philip Martin <ph...@codematters.co.uk>.
Philip Martin <ph...@codematters.co.uk> writes:

> the first will not be completely obliterated by the second.

I hacked the code rather than create a repository with millions of
revisions:

     case svn_wc_notify_tree_conflict_details_progress:
-      SVN_ERR(svn_cmdline_printf(pool, _("\rChecking r%ld..."), n->revision));
+      {
+      static long revision = 1111111;
+      SVN_ERR(svn_cmdline_printf(pool, _("\rChecking r%ld..."), revision));
+      revision = 99;
+      sleep(5);
+      }
       break;

and it does produce garbled output:

      Checking r1111111...

becomes:

      Checking r99...11...

-- 
Philip