mercurial/HGCommitDialog.st
changeset 57 47b14a8b7eb8
parent 55 30d72a8f4501
child 67 985488894699
--- a/mercurial/HGCommitDialog.st	Thu Nov 15 10:26:08 2012 +0000
+++ b/mercurial/HGCommitDialog.st	Thu Nov 15 10:26:14 2012 +0000
@@ -119,13 +119,14 @@
 !HGCommitDialog methodsFor:'change & update'!
 
 updateFileList
-    | wcroot statuses entries showOnlyModified wcrootPathNameRelativeLen |
+    | wcroot statuses entries showOnlyModified wcrootPathNameRelative wcrootPathNameRelativeLen |
 
     showOnlyModified := fileListShowOnlyModifiedHolder value.
     "HACK..."
 
     wcroot := self model package root.
-    wcrootPathNameRelativeLen := wcroot pathNameRelative size + 2.
+    wcrootPathNameRelative := wcroot pathNameRelative.
+    wcrootPathNameRelativeLen := wcrootPathNameRelative size + 2.
     statuses := HGCommand status
                     workingDirectory: wcroot pathName;
                     execute.
@@ -135,15 +136,17 @@
             or:[statusAndPath first isCleanOrIgnored not]) ifTrue:[
             | nm entry |
 
-            nm := (statusAndPath second copyFrom:wcrootPathNameRelativeLen).
-            entry := SCMAbstractCommitDialog::FileEntry application: self entry: wcroot / nm name: nm.
-            entries add: entry
+            (statusAndPath second startsWith: wcrootPathNameRelative) ifTrue:[
+                nm := (statusAndPath second copyFrom:wcrootPathNameRelativeLen).
+                entry := SCMAbstractCommitDialog::FileEntry application: self entry: wcroot / nm name: nm.
+                entries add: entry
+            ].
         ].
     ].
     self fileListHolder value: entries
 
     "Created: / 08-02-2012 / 18:05:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 15-11-2012 / 09:33:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 15-11-2012 / 10:09:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGCommitDialog class methodsFor:'documentation'!