Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dshbak no longer shows commas for collapsed hosts with same output if hostnames are dissimilar #27

Closed
GoogleCodeExporter opened this issue Jan 7, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

``dshbak`` broke a bit somewhere between 2.11 and r1325,

same output for multiple hosts gets correctly collapsed
into ranges, but hostnames that don't fit in the ranges
just get mashed together::

    host1other4foo[8-20]

where it used to be::

    host1,other2,foo[8-20]

tried to understand the perl and got scared, but closed my
eyes and made the attached patch.

Please apply, thanks.

P.S. output used to be indented but it's not anymore, not
     sure that matters? cannot decide which looks better.

-- 
Scott

Original issue reported on code.google.com by scott@omnisys.com on 28 Apr 2011 at 10:19

Attachments:

@GoogleCodeExporter
Copy link
Author

This was also reported in issue 19, and should have been fixed by r1319.

However, I like your fix better, for some reason I was determined to use the
obscure $" variable to join the hostlist with commas.

Can you check to make sure you have the dshbak from trunk, and see if you
still have the issue? I think there is even a test in the testsuite for this.

(Anyhow, I may still change the code to use your more straightforward join())

Original comment by mark.gro...@gmail.com on 28 Apr 2011 at 1:33

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Original comment by mark.gro...@gmail.com on 28 Apr 2011 at 1:38

  • Changed state: Duplicate

@GoogleCodeExporter
Copy link
Author

I had r1325 at the time, but was running perl 5.8.8,
don't know if that matters.

Current trunk seems to work fine for this.  Thanks!

Original comment by scott@omnisys.com on 2 May 2011 at 10:24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant