{"action":"opened","issue":{"url":"https://api.github.com/repos/fipymigrate/sumatra/issues/145","labels_url":"https://api.github.com/repos/fipymigrate/sumatra/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/fipymigrate/sumatra/issues/145/comments","events_url":"https://api.github.com/repos/fipymigrate/sumatra/issues/145/events","html_url":"https://github.com/fipymigrate/sumatra/issues/145","id":55908914,"number":145,"title":"Can't use main files not in current directory when using git","user":{"login":"apdavison","id":260552,"avatar_url":"https://avatars.githubusercontent.com/u/260552?v=3","gravatar_id":"","url":"https://api.github.com/users/apdavison","html_url":"https://github.com/apdavison","followers_url":"https://api.github.com/users/apdavison/followers","following_url":"https://api.github.com/users/apdavison/following{/other_user}","gists_url":"https://api.github.com/users/apdavison/gists{/gist_id}","starred_url":"https://api.github.com/users/apdavison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apdavison/subscriptions","organizations_url":"https://api.github.com/users/apdavison/orgs","repos_url":"https://api.github.com/users/apdavison/repos","events_url":"https://api.github.com/users/apdavison/events{/privacy}","received_events_url":"https://api.github.com/users/apdavison/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-29T14:57:03Z","updated_at":"2015-01-29T14:57:03Z","closed_at":null,"body":"I tried to run\r\n\r\nsmt run -e myexec -m dir/program.sh\r\n\r\nand got an error saying that the file dir/program.sh was not under version control.\r\n\r\nAt http://neuralensemble.org/trac/sumatra/browser/src/records.py, line 88 \r\n\r\nit appears to search for the basename of the file instead of the actual filename in the repository.\r\n\r\nChanging \r\n   normpath(join(cwd_relative_to_wc, basename(self.main_file)))):\r\nto\r\n   normpath(join(cwd_relative_to_wc, self.main_file))):\r\n\r\nappears to fix the issue for me, but I'm sure it breaks something else. \r\n\n        \n\n _Imported from Bitbucket issue [162](https://bitbucket.org/apdavison/sumatra/issue/162),  created by apdavison on 03-18-2013 at 21:21, last modified: 03-26-2013 at 12:23_\n\n        "}}