mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vcs.rb: no empty names
* tool/vcs.rb (get_revisions): branch names must not be empty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
63491598c6
commit
ae27382632
1 changed files with 2 additions and 2 deletions
|
@ -135,7 +135,7 @@ class VCS
|
||||||
info_xml = IO.pread(%W"svn info --xml #{path}")
|
info_xml = IO.pread(%W"svn info --xml #{path}")
|
||||||
_, last, _, changed, _ = info_xml.split(/revision="(\d+)"/)
|
_, last, _, changed, _ = info_xml.split(/revision="(\d+)"/)
|
||||||
modified = info_xml[/<date>([^<>]*)/, 1]
|
modified = info_xml[/<date>([^<>]*)/, 1]
|
||||||
branch = info_xml[%r'<relative-url>\^/(?:branches/|tags/)?([^<>]*)', 1]
|
branch = info_xml[%r'<relative-url>\^/(?:branches/|tags/)?([^<>]+)', 1]
|
||||||
[last, changed, modified, branch]
|
[last, changed, modified, branch]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ class VCS
|
||||||
cmd = %W[git]
|
cmd = %W[git]
|
||||||
cmd.push("-C", srcdir) if srcdir
|
cmd.push("-C", srcdir) if srcdir
|
||||||
cmd.push("symbolic-ref", "HEAD")
|
cmd.push("symbolic-ref", "HEAD")
|
||||||
branch = IO.pread(cmd)[%r'\A(?:refs/heads/)?(.*)', 1]
|
branch = IO.pread(cmd)[%r'\A(?:refs/heads/)?(.+)', 1]
|
||||||
[last, changed, modified, branch]
|
[last, changed, modified, branch]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue