mercurial/HGRepository.st
branchcvs_MAIN
changeset 613 19384e1808c7
parent 612 060d81f48e19
child 614 f17a7cd7fd67
--- a/mercurial/HGRepository.st	Wed Mar 23 19:53:12 2016 +0100
+++ b/mercurial/HGRepository.st	Wed Mar 23 19:56:54 2016 +0100
@@ -192,24 +192,20 @@
 
      Currently, it searches for the presence of .hg directory"
 
-    | f |
+    | f parent |
     
     f := aStringOrFilename.
     f isDirectory ifFalse:[
         f := f directory
     ].
-    'h1' errorPrintCR.
     [ ( f / '.hg' ) exists ] whileFalse:[
         f pathName errorPrintCR.
-        f isRootDirectory ifTrue:[ 
-           'hX' errorPrintCR.
-            ^ nil 
-        ].
-        f := f directory.
-        'directory ' errorPrint. f errorPrintCR.
+        f isRootDirectory ifTrue:[^ nil].
+        parent := f directory.
+        parent pathName = f pathName ifTrue:[^ nil].
+        f := parent.
     ].
-    'h2' errorPrintCR.
-    ^f
+    ^ f
 
     "Created: / 13-11-2012 / 22:34:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 14-11-2012 / 00:02:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"