[#37248] [Feature:1.9] Enumerator#inspect — "Yusuke ENDOH" <mame@...>

遠藤です。

12 messages 2008/12/02

[#37337] [Feature #841] Object#self — "rubikitch ." <redmine@...>

Feature #841: Object#self

13 messages 2008/12/09

[#37513] Current status of 1.9.1 RC1's issues — "Yugui (Yuki Sonoda)" <yugui@...>

Hi, folks

14 messages 2008/12/20
[#37516] Re: Current status of 1.9.1 RC1's issues — Masatoshi SEKI <m_seki@...> 2008/12/20

咳といいます。

[#37576] [BUG:trunk] encoding for stdio's — "Yugui (Yuki Sonoda)" <yugui@...>

Yuguiです。

11 messages 2008/12/24

[ruby-dev:37557] Re: [Bug #919] tool/file2lastrev.rbでエラー

From: SASADA Koichi <ko1@...>
Date: 2008-12-22 22:12:27 UTC
List: ruby-dev #37557
 ささだです.

Tadashi Saito wrote::
> 一応下ので直りましたが、汎用性があるのか正直自信がありません。

 私はよくわかんなかったので,簡単にしてみました.でも,なんでフルパスに
するんだろう.

Index: tool/file2lastrev.rb
===================================================================
--- tool/file2lastrev.rb        (リビジョン 20922)
+++ tool/file2lastrev.rb        (作業コピー)
@@ -6,12 +6,15 @@
 class VCSNotFoundError < RuntimeError; end

 def detect_vcs(path)
-  target_path = Pathname(File.expand_path(path))
+  # target_path = Pathname(File.expand_path(path))
+  #
+  # path = target_path.directory? ? target_path : target_path.parent
+  #
+  path = Pathname(File.dirname($0)).parent

-  path = target_path.directory? ? target_path : target_path.parent
   begin
-    return :svn, target_path.relative_path_from(path) if
File.directory?("#{pat
          h}/.svn")
-    return :git, target_path.relative_path_from(path) if
File.directory?("#{pat
          h}/.git")
+    return :svn, path if File.directory?("#{path}/.svn")
+    return :git, path if File.directory?("#{path}/.git")
     path, orig = path.parent, path
   end until path == orig
   raise VCSNotFoundError, "does not seem to be under a vcs"

-- 
// SASADA Koichi at atdot dot net

In This Thread