Commit graph

116 commits

Author SHA1 Message Date
Nobuyoshi Nakada
bdcfba547d
vcs.rb: handle --dryrun option 2019-06-23 22:35:10 +09:00
Takashi Kokubun
f3c877e8de
Ignore ~/.gitconfig on tool/vcs.rb git commands
Because some `log.*` git configs may change the result of `git log`,
`RUBY_LAST_COMMIT_TITLE` can be wrongly formatted and break version.c
compilation. So the `git log` executions should not respect user's gitconfig.
2019-06-05 20:23:23 +09:00
Nobuyoshi Nakada
542d69c894
Revert "vcs.rb support non-inplace build"
This reverts commit 22cd402734.

It did not make sense due to a typo `@srcidr`.
2019-06-05 12:04:11 +09:00
Nobuyoshi Nakada
39eae6bf89
tool/vcs.rb: return the commit date as the modified time 2019-06-04 21:27:46 +09:00
Nobuyoshi Nakada
3102ca4c6e
Default GIT external encoding to UTF-8 🤷‍♂️
And dump the title as US-ASCII.
2019-06-03 12:54:33 +09:00
Nobuyoshi Nakada
1e9057b54a
Prefer the current branch or tag name 2019-05-31 10:55:37 +09:00
Nobuyoshi Nakada
f0945176c3
Fix missing gitcmd 2019-05-30 22:27:11 +09:00
NARUSE, Yui
22cd402734 vcs.rb support non-inplace build 2019-05-30 22:20:28 +09:00
Jeremy Evans
f0ded36693 Use Regexp#match instead of #match for 1.9 BASERUBY support 2019-05-29 18:40:03 -07:00
Takashi Kokubun
1a0c3d8dd6
Convert Enumerator to Array for Ruby 1.9.3
String#lines seems to return Enumerator in Ruby 1.9.3, and it does not
respond to #delete_if 538559919
2019-05-29 15:04:45 +09:00
Takashi Kokubun
6b5e712361
Make tool/vcs.rb compliant to BASERUBY
People seem to consider BASERUBY is either 1.8 or 1.9 now. Since this
file may be executed by BASERUBY from file2lastrev.rb, I think we should
not rely on Ruby 2.0 in this file for now.
2019-05-29 08:22:04 +09:00
Nobuyoshi Nakada
a205e24747
Make RUBY_REVISION full length 2019-05-22 23:53:21 +09:00
Nobuyoshi Nakada
d819d97cf0
Default to the current branch
* tool/make-snapshot: default to the current branch if no branch
  but srcdir is given.
2019-05-22 23:52:51 +09:00
Nobuyoshi Nakada
658f17b8ec
Fixed the method to delegate
* tool/vcs.rb (VCS::GITSVN.revision_name): should delegate to the
  same method of SVN, not an undefined method.
2019-05-22 22:28:02 +09:00
Nobuyoshi Nakada
025206d0dd
Fallback to an invalid branch name if no branch found 2019-05-09 14:12:03 +09:00
Nobuyoshi Nakada
eb84b33c86
Search a branch name at a detached head 2019-05-09 14:02:01 +09:00
Nobuyoshi Nakada
d802698d3e
Push the current (topic) branch to the remote upstream 2019-05-09 10:01:31 +09:00
Nobuyoshi Nakada
4fabb74471
Show the commit command if dryrun 2019-05-09 10:00:48 +09:00
Nobuyoshi Nakada
10723dd6ce
dryrun option is for push, not git 2019-05-09 08:54:38 +09:00
Kazuhiro NISHIYAMA
a1ae478a31
Fix a typo 2019-05-02 14:44:47 +09:00
Nobuyoshi Nakada
474af9ee9a
No last commit when up-to-date
Get the last commit title from the upstream to the head, so that
no `last_commit` line will be shown when the branch is up to date
with the upstream.
2019-05-01 20:47:00 +09:00
Kazuhiro NISHIYAMA
c222f4d31f
from is not nil but "" on shallow clone [ci skip] 2019-04-30 16:20:46 +09:00
Kazuhiro NISHIYAMA
040b37f8b4
Use 10 chars as RUBY_REVISION in snapshot too 2019-04-29 23:02:18 +09:00
Nobuyoshi Nakada
4c8f107898
Make the range to export as changelog optional
* `from` is defaulted to the beginning of the branch inclusively,
  otherwise the given revision is excluded as the previous.

* `to` is defaulted to the head.
2019-04-28 13:46:16 +09:00
Nobuyoshi Nakada
d72bd190a8
Added VCS::SVN#branch_beginning 2019-04-28 12:11:59 +09:00
Nobuyoshi Nakada
b766970527
Search the beginning revision more strictly a bit 2019-04-28 12:04:15 +09:00
Nobuyoshi Nakada
5a53682d6d
Removed --reverse option
It is nonsense with `-n1` option.
2019-04-28 11:36:03 +09:00
Nobuyoshi Nakada
d47cd75b4f
Chomp a newline from the branch name 2019-04-28 10:41:32 +09:00
Nobuyoshi Nakada
7790b610b8
Shorten git revision name without "r" prefix in snapshot 2019-04-28 09:56:56 +09:00
Nobuyoshi Nakada
bb6036946e
Reduce matz's work, let git do it instead 2019-04-28 00:30:16 +09:00
Nobuyoshi Nakada
2a4625115a
Separate format_changelog
VCS::GITSVN#format_changelog generates previous format, similar to
svn-log, and VCS::GIT#format_changelog stores just git-log as-is
for now.
2019-04-27 23:14:59 +09:00
Nobuyoshi Nakada
7875c42f64
Override log format to parse for ChangeLog 2019-04-27 23:13:03 +09:00
Nobuyoshi Nakada
6f8ac2cb28
Include the beginning commit in ChangeLog 2019-04-27 23:08:50 +09:00
Nobuyoshi Nakada
2ae5f6f97c
Add VCS::GIT#commit 2019-04-23 15:43:51 +09:00
Nobuyoshi Nakada
2fb83a0af7
Split git-svn dependent methods 2019-04-23 15:39:36 +09:00
Kazuhiro NISHIYAMA
87261cf59f
Omit last_commit=RUBY_LAST_COMMIT_TITLE without local commits 2019-04-22 21:45:13 +09:00
Takashi Kokubun
5da52d1210
Migrate RUBY_VERSION/RUBY_DESCRIPTION to Git
from Subversion.

This behavior is tentative and not discussed well. The point of
discussion will be just the length of commit hash, and I thought we
should include this kind of change in 2.7.0-preview1 release even before
the length is fixed yet.

Let's discuss that afterwards and fix it later as needed. Naruse
suggested that length=10 is very unlikely to cause conflict, and thus
it's used by email notification and rubyci now. This behavior is in
favor of that for now.
2019-04-22 21:27:34 +09:00
nobu
f798ff4c43 Limit uplevel travarsing
* tool/vcs.rb (VCS.detect): limit level of travarsing parent
  directories, 0 by the default.  curretly always detecting at the
  source directory itself.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-10 01:58:28 +00:00
nobu
fec4b2225e Detection order
* tool/vcs.rb (VCS.detect): detect each VCS while travarsing
  parent directories.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-10 01:58:27 +00:00
nobu
867d398558 ChangeLog compatibility [ci skip]
* tool/vcs.rb (VCS::GIT#export_changelog): improve the
  compatibility with svn-log.
  remained differences are:

  - in svn-log

    - accented characters, left/right single quotation marks, and
      non-break spaces are translated to ASCII characters

    - other non-ASCII characters are excoded as `{U+XXXX}`

  - in git-log

    - tabs are expanded

  - in git-log (intentional)

    - lines looking too indented are unindented

    - empty lines between headers and bodies are squeezed

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-25 08:32:52 +00:00
nobu
bf9d849b23 vcs.rb: .git at export
* tool/vcs.rb (VCS::GIT#export): do not remove .git directory.
  should remove it by after_export.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26 06:00:08 +00:00
naruse
22acbed662 On getting changelog, use git-log with --no-notes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 02:58:39 +00:00
nobu
1a873c6a70 vcs.rb: dryrun: option of GIT::SVN#commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-10 06:42:35 +00:00
nobu
59cc9e3a67 vcs.rb: no meaningless splat
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 03:19:39 +00:00
nobu
3a4183d2b7 vcs.rb: for old ruby
* tool/vcs.rb (DebugSystem#system): pop option hash for old
  version ruby which does not support `system` options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05 03:19:39 +00:00
naruse
42bb73cf64 support ruby 1.9.3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 07:34:06 +00:00
nobu
c3ce3b4744 vcs.rb: checkout the current branch before rebase
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 04:17:32 +00:00
nobu
a24ccfe6af vcs.rb: fix errors
* tool/vcs.rb (DebugSystem#system): fix undefined local variable
  error.  as system doesn't accept `exception:` option before 2.6,
  remove it from `opts`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 02:20:02 +00:00
naruse
be264f4a65 Suport ruby 1.9.3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29 17:05:41 +00:00
nobu
17d8433d27 vcs.rb: prepend DebugSystem to VCS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-27 06:11:23 +00:00