Discussion:
width of output of 'svn shelves' is too large
wuzhouhui
2018-03-19 11:26:08 UTC
Permalink
The width of terminal is 80 column, but the width of output of 'svn shelves' is 82
at least, I think 80 is better.

What do you think?
Daniel Shahaf
2018-03-30 17:28:46 UTC
Permalink
Post by wuzhouhui
The width of terminal is 80 column, but the width of output of 'svn shelves' is 82
at least, I think 80 is better.
Thanks for testing the pre-releases.
Post by wuzhouhui
What do you think?
Agreed in principle, but cannot reproduce the original problem. With current
trunk, the output for me is 70 columns. By code inspection, that should be the
case so long as the shelf name is ≤29 characters (plus or minus the length of
the right-hand side description, which can vary by ±5 columns).

What version are you testing with?
wuzhouhui
2018-03-31 10:17:17 UTC
Permalink
Post by Daniel Shahaf
Post by wuzhouhui
The width of terminal is 80 column, but the width of output of 'svn shelves' is 82
at least, I think 80 is better.
Thanks for testing the pre-releases.
Post by wuzhouhui
What do you think?
Agreed in principle, but cannot reproduce the original problem. With current
trunk, the output for me is 70 columns. By code inspection, that should be the
case so long as the shelf name is ≤29 characters (plus or minus the length of
the right-hand side description, which can vary by ±5 columns).
What version are you testing with?
Version: subversion-1.10.0-rc1.tar.bz2
OS: ubuntu 16.04
Configure args: ./configure --with-lz4=internal
Post by Daniel Shahaf
a 3 mins old 235 bytes 1 paths changed
a | 1 +
1 file changed, 1 insertion(+)
82 /tmp/a.out
It seemed that the max width of shelves's output is 82 column even if the name of shelve is
a single char 'a' and the changes is 1 line.

In addition, I found another issue:
1. Create a empty file (named 'a') and version it, then commit.
2. Add some contents to file 'a'
3. svn shelve a a
Now, the file 'a' will be deleted, that isn't what I want.
Daniel Shahaf
2018-04-04 18:25:02 UTC
Permalink
Post by wuzhouhui
Post by Daniel Shahaf
Post by wuzhouhui
The width of terminal is 80 column, but the width of output of 'svn shelves' is 82
at least, I think 80 is better.
Thanks for testing the pre-releases.
Post by wuzhouhui
What do you think?
Agreed in principle, but cannot reproduce the original problem. With current
trunk, the output for me is 70 columns. By code inspection, that should be the
case so long as the shelf name is ≤29 characters (plus or minus the length of
the right-hand side description, which can vary by ±5 columns).
What version are you testing with?
Version: subversion-1.10.0-rc1.tar.bz2
OS: ubuntu 16.04
Configure args: ./configure --with-lz4=internal
Okay. 1.10.0-rc2 should be released soon (it's being prepared), but I haven't
the time to test it.

Which reminds me, sorry that we took so long to reply to your original
email. It must have slipped through the cracks.
Post by wuzhouhui
1. Create a empty file (named 'a') and version it, then commit.
2. Add some contents to file 'a'
3. svn shelve a a
Now, the file 'a' will be deleted, that isn't what I want.
I assume this is a use-case we'd like to support, but I'll let the devs who
work on shelving comment on this. (I've pinged them)

The cause will be that the backend of 'shelve' is patch files, which make no
distinction between an empty file and a non-existent file. (So to support this
use-case we'll have either to swap backends or to make 'svn patch' smarter; I
believe Julian has considered both options)

Thanks again for your patience.

Daniel
wuzhouhui
2018-04-15 01:24:11 UTC
Permalink
Post by Daniel Shahaf
Post by wuzhouhui
The width of terminal is 80 column, but the width of output of 'svn shelves' is 82
at least, I think 80 is better.
Thanks for testing the pre-releases.
Post by wuzhouhui
What do you think?
Agreed in principle, but cannot reproduce the original problem. With current
trunk, the output for me is 70 columns. By code inspection, that should be the
case so long as the shelf name is ≤29 characters (plus or minus the length of
Following code which produces shelves's output is quoted from
^/subversion/tags/1.10.0/subversion/svn/shelve-cmd.c:

SVN_ERR(svn_cmdline_printf(scratch_pool,
_("%-30s %6d mins old %10ld bytes %4d paths changed\n"),
name, age, (long)info->dirent->filesize,
apr_hash_count(paths)));

According to the format string, it will output 82 characters (30+6+10+4+32=82) at least.
Post by Daniel Shahaf
the right-hand side description, which can vary by ±5 columns).
What version are you testing with?
Loading...