{"action":"created","comment":{"url":"https://api.github.com/repos/reinout/checkoutmanager/pulls/comments/39044957","id":39044957,"diff_hunk":"@@ -259,6 +324,22 @@ class GitDirInfo(DirInfo):\n     vcs = 'git'\n \n     @capture_stdout\n+    def cmd_rev(self):\n+        print(self.directory)\n+        os.chdir(self.directory)\n+        print(system(\"git show -q\"))\n+\n+    @capture_stdout\n+    def cmd_cu(self):\n+        output = system(\"git pull --dry-run\")","path":"checkoutmanager/dirinfo.py","position":111,"original_position":111,"commit_id":"c2ce47208aeecd2542f75ef07541c8fb158a63cf","original_commit_id":"c2ce47208aeecd2542f75ef07541c8fb158a63cf","user":{"login":"mauritsvanrees","id":210587,"avatar_url":"https://avatars.githubusercontent.com/u/210587?v=3","gravatar_id":"","url":"https://api.github.com/users/mauritsvanrees","html_url":"https://github.com/mauritsvanrees","followers_url":"https://api.github.com/users/mauritsvanrees/followers","following_url":"https://api.github.com/users/mauritsvanrees/following{/other_user}","gists_url":"https://api.github.com/users/mauritsvanrees/gists{/gist_id}","starred_url":"https://api.github.com/users/mauritsvanrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauritsvanrees/subscriptions","organizations_url":"https://api.github.com/users/mauritsvanrees/orgs","repos_url":"https://api.github.com/users/mauritsvanrees/repos","events_url":"https://api.github.com/users/mauritsvanrees/events{/privacy}","received_events_url":"https://api.github.com/users/mauritsvanrees/received_events","type":"User","site_admin":false},"body":"Maybe `git fetch`? That already gets the code, without updating the working copy.","created_at":"2015-09-09T13:58:16Z","updated_at":"2015-09-09T13:58:16Z","html_url":"https://github.com/reinout/checkoutmanager/pull/14#discussion_r39044957","pull_request_url":"https://api.github.com/repos/reinout/checkoutmanager/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/reinout/checkoutmanager/pulls/comments/39044957"},"html":{"href":"https://github.com/reinout/checkoutmanager/pull/14#discussion_r39044957"},"pull_request":{"href":"https://api.github.com/repos/reinout/checkoutmanager/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/reinout/checkoutmanager/pulls/14","id":44506489,"html_url":"https://github.com/reinout/checkoutmanager/pull/14","diff_url":"https://github.com/reinout/checkoutmanager/pull/14.diff","patch_url":"https://github.com/reinout/checkoutmanager/pull/14.patch","issue_url":"https://api.github.com/repos/reinout/checkoutmanager/issues/14","number":14,"state":"open","locked":false,"title":"New actions","user":{"login":"chintal","id":226507,"avatar_url":"https://avatars.githubusercontent.com/u/226507?v=3","gravatar_id":"","url":"https://api.github.com/users/chintal","html_url":"https://github.com/chintal","followers_url":"https://api.github.com/users/chintal/followers","following_url":"https://api.github.com/users/chintal/following{/other_user}","gists_url":"https://api.github.com/users/chintal/gists{/gist_id}","starred_url":"https://api.github.com/users/chintal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chintal/subscriptions","organizations_url":"https://api.github.com/users/chintal/orgs","repos_url":"https://api.github.com/users/chintal/repos","events_url":"https://api.github.com/users/chintal/events{/privacy}","received_events_url":"https://api.github.com/users/chintal/received_events","type":"User","site_admin":false},"body":"Added actions ``cu`` and ``rev``. \r\n\r\n``cu``\r\n-------\r\n\r\nCheck for incoming changes before applying them. \r\n\r\nTypical usage is to determine which repositories have incoming updates, and to use that information to prevent expected problems by cleaning up necessary trees when ``up`` is run, or by not running ``up`` at that point if it's likely to cause merge conflicts or the like. \r\n\r\n``rev``\r\n--------\r\n\r\nPrint information about the current revision of the working tree. There isn't much use for it when run as a script, but there are use cases for being able to obtain this revision information when used as a module. My immediate use case is to include the revision information of semi-automated test definitions when generating test reports from semi-automated or automated tests. I'm using pysvn to get the revision information for the moment, which works fine, but locks me in to svn.\r\n\r\n\r\nImplementations notes\r\n-----------------------------\r\n\r\nBoth of these work actions work fine for SVN, and if there are problems or corner cases I'll see them soon enough.\r\n\r\nbzr, git, and hg implementations have only been tested on simple repositories with a simple upstream and clean working trees. I think they should still work, but some care may be called for before making use of these actions in production for those version systems. ","created_at":"2015-09-09T03:12:41Z","updated_at":"2015-09-09T13:58:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cbce5ea43232d4bc68ea2f11011fc7b0d80e5c1e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/reinout/checkoutmanager/pulls/14/commits","review_comments_url":"https://api.github.com/repos/reinout/checkoutmanager/pulls/14/comments","review_comment_url":"https://api.github.com/repos/reinout/checkoutmanager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reinout/checkoutmanager/issues/14/comments","statuses_url":"https://api.github.com/repos/reinout/checkoutmanager/statuses/c2ce47208aeecd2542f75ef07541c8fb158a63cf","head":{"label":"chintal:new_actions","ref":"new_actions","sha":"c2ce47208aeecd2542f75ef07541c8fb158a63cf","user":{"login":"chintal","id":226507,"avatar_url":"https://avatars.githubusercontent.com/u/226507?v=3","gravatar_id":"","url":"https://api.github.com/users/chintal","html_url":"https://github.com/chintal","followers_url":"https://api.github.com/users/chintal/followers","following_url":"https://api.github.com/users/chintal/following{/other_user}","gists_url":"https://api.github.com/users/chintal/gists{/gist_id}","starred_url":"https://api.github.com/users/chintal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chintal/subscriptions","organizations_url":"https://api.github.com/users/chintal/orgs","repos_url":"https://api.github.com/users/chintal/repos","events_url":"https://api.github.com/users/chintal/events{/privacy}","received_events_url":"https://api.github.com/users/chintal/received_events","type":"User","site_admin":false},"repo":{"id":42060655,"name":"checkoutmanager","full_name":"chintal/checkoutmanager","owner":{"login":"chintal","id":226507,"avatar_url":"https://avatars.githubusercontent.com/u/226507?v=3","gravatar_id":"","url":"https://api.github.com/users/chintal","html_url":"https://github.com/chintal","followers_url":"https://api.github.com/users/chintal/followers","following_url":"https://api.github.com/users/chintal/following{/other_user}","gists_url":"https://api.github.com/users/chintal/gists{/gist_id}","starred_url":"https://api.github.com/users/chintal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chintal/subscriptions","organizations_url":"https://api.github.com/users/chintal/orgs","repos_url":"https://api.github.com/users/chintal/repos","events_url":"https://api.github.com/users/chintal/events{/privacy}","received_events_url":"https://api.github.com/users/chintal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chintal/checkoutmanager","description":"All your checkouts in one config file, one command to update/push/status/whatever them.","fork":true,"url":"https://api.github.com/repos/chintal/checkoutmanager","forks_url":"https://api.github.com/repos/chintal/checkoutmanager/forks","keys_url":"https://api.github.com/repos/chintal/checkoutmanager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chintal/checkoutmanager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chintal/checkoutmanager/teams","hooks_url":"https://api.github.com/repos/chintal/checkoutmanager/hooks","issue_events_url":"https://api.github.com/repos/chintal/checkoutmanager/issues/events{/number}","events_url":"https://api.github.com/repos/chintal/checkoutmanager/events","assignees_url":"https://api.github.com/repos/chintal/checkoutmanager/assignees{/user}","branches_url":"https://api.github.com/repos/chintal/checkoutmanager/branches{/branch}","tags_url":"https://api.github.com/repos/chintal/checkoutmanager/tags","blobs_url":"https://api.github.com/repos/chintal/checkoutmanager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chintal/checkoutmanager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chintal/checkoutmanager/git/refs{/sha}","trees_url":"https://api.github.com/repos/chintal/checkoutmanager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chintal/checkoutmanager/statuses/{sha}","languages_url":"https://api.github.com/repos/chintal/checkoutmanager/languages","stargazers_url":"https://api.github.com/repos/chintal/checkoutmanager/stargazers","contributors_url":"https://api.github.com/repos/chintal/checkoutmanager/contributors","subscribers_url":"https://api.github.com/repos/chintal/checkoutmanager/subscribers","subscription_url":"https://api.github.com/repos/chintal/checkoutmanager/subscription","commits_url":"https://api.github.com/repos/chintal/checkoutmanager/commits{/sha}","git_commits_url":"https://api.github.com/repos/chintal/checkoutmanager/git/commits{/sha}","comments_url":"https://api.github.com/repos/chintal/checkoutmanager/comments{/number}","issue_comment_url":"https://api.github.com/repos/chintal/checkoutmanager/issues/comments{/number}","contents_url":"https://api.github.com/repos/chintal/checkoutmanager/contents/{+path}","compare_url":"https://api.github.com/repos/chintal/checkoutmanager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chintal/checkoutmanager/merges","archive_url":"https://api.github.com/repos/chintal/checkoutmanager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chintal/checkoutmanager/downloads","issues_url":"https://api.github.com/repos/chintal/checkoutmanager/issues{/number}","pulls_url":"https://api.github.com/repos/chintal/checkoutmanager/pulls{/number}","milestones_url":"https://api.github.com/repos/chintal/checkoutmanager/milestones{/number}","notifications_url":"https://api.github.com/repos/chintal/checkoutmanager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chintal/checkoutmanager/labels{/name}","releases_url":"https://api.github.com/repos/chintal/checkoutmanager/releases{/id}","created_at":"2015-09-07T15:30:15Z","updated_at":"2015-09-07T15:30:15Z","pushed_at":"2015-09-09T03:03:57Z","git_url":"git://github.com/chintal/checkoutmanager.git","ssh_url":"git@github.com:chintal/checkoutmanager.git","clone_url":"https://github.com/chintal/checkoutmanager.git","svn_url":"https://github.com/chintal/checkoutmanager","homepage":"http://pypi.python.org/pypi/checkoutmanager","size":170,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"reinout:master","ref":"master","sha":"ab50aaad0e4344f687bc17f36dca8f4c6655ed84","user":{"login":"reinout","id":121433,"avatar_url":"https://avatars.githubusercontent.com/u/121433?v=3","gravatar_id":"","url":"https://api.github.com/users/reinout","html_url":"https://github.com/reinout","followers_url":"https://api.github.com/users/reinout/followers","following_url":"https://api.github.com/users/reinout/following{/other_user}","gists_url":"https://api.github.com/users/reinout/gists{/gist_id}","starred_url":"https://api.github.com/users/reinout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reinout/subscriptions","organizations_url":"https://api.github.com/users/reinout/orgs","repos_url":"https://api.github.com/users/reinout/repos","events_url":"https://api.github.com/users/reinout/events{/privacy}","received_events_url":"https://api.github.com/users/reinout/received_events","type":"User","site_admin":false},"repo":{"id":41141709,"name":"checkoutmanager","full_name":"reinout/checkoutmanager","owner":{"login":"reinout","id":121433,"avatar_url":"https://avatars.githubusercontent.com/u/121433?v=3","gravatar_id":"","url":"https://api.github.com/users/reinout","html_url":"https://github.com/reinout","followers_url":"https://api.github.com/users/reinout/followers","following_url":"https://api.github.com/users/reinout/following{/other_user}","gists_url":"https://api.github.com/users/reinout/gists{/gist_id}","starred_url":"https://api.github.com/users/reinout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reinout/subscriptions","organizations_url":"https://api.github.com/users/reinout/orgs","repos_url":"https://api.github.com/users/reinout/repos","events_url":"https://api.github.com/users/reinout/events{/privacy}","received_events_url":"https://api.github.com/users/reinout/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/reinout/checkoutmanager","description":"All your checkouts in one config file, one command to update/push/status/whatever them.","fork":false,"url":"https://api.github.com/repos/reinout/checkoutmanager","forks_url":"https://api.github.com/repos/reinout/checkoutmanager/forks","keys_url":"https://api.github.com/repos/reinout/checkoutmanager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reinout/checkoutmanager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reinout/checkoutmanager/teams","hooks_url":"https://api.github.com/repos/reinout/checkoutmanager/hooks","issue_events_url":"https://api.github.com/repos/reinout/checkoutmanager/issues/events{/number}","events_url":"https://api.github.com/repos/reinout/checkoutmanager/events","assignees_url":"https://api.github.com/repos/reinout/checkoutmanager/assignees{/user}","branches_url":"https://api.github.com/repos/reinout/checkoutmanager/branches{/branch}","tags_url":"https://api.github.com/repos/reinout/checkoutmanager/tags","blobs_url":"https://api.github.com/repos/reinout/checkoutmanager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reinout/checkoutmanager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reinout/checkoutmanager/git/refs{/sha}","trees_url":"https://api.github.com/repos/reinout/checkoutmanager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reinout/checkoutmanager/statuses/{sha}","languages_url":"https://api.github.com/repos/reinout/checkoutmanager/languages","stargazers_url":"https://api.github.com/repos/reinout/checkoutmanager/stargazers","contributors_url":"https://api.github.com/repos/reinout/checkoutmanager/contributors","subscribers_url":"https://api.github.com/repos/reinout/checkoutmanager/subscribers","subscription_url":"https://api.github.com/repos/reinout/checkoutmanager/subscription","commits_url":"https://api.github.com/repos/reinout/checkoutmanager/commits{/sha}","git_commits_url":"https://api.github.com/repos/reinout/checkoutmanager/git/commits{/sha}","comments_url":"https://api.github.com/repos/reinout/checkoutmanager/comments{/number}","issue_comment_url":"https://api.github.com/repos/reinout/checkoutmanager/issues/comments{/number}","contents_url":"https://api.github.com/repos/reinout/checkoutmanager/contents/{+path}","compare_url":"https://api.github.com/repos/reinout/checkoutmanager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reinout/checkoutmanager/merges","archive_url":"https://api.github.com/repos/reinout/checkoutmanager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reinout/checkoutmanager/downloads","issues_url":"https://api.github.com/repos/reinout/checkoutmanager/issues{/number}","pulls_url":"https://api.github.com/repos/reinout/checkoutmanager/pulls{/number}","milestones_url":"https://api.github.com/repos/reinout/checkoutmanager/milestones{/number}","notifications_url":"https://api.github.com/repos/reinout/checkoutmanager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reinout/checkoutmanager/labels{/name}","releases_url":"https://api.github.com/repos/reinout/checkoutmanager/releases{/id}","created_at":"2015-08-21T07:23:19Z","updated_at":"2015-08-27T18:16:17Z","pushed_at":"2015-09-09T03:12:42Z","git_url":"git://github.com/reinout/checkoutmanager.git","ssh_url":"git@github.com:reinout/checkoutmanager.git","clone_url":"https://github.com/reinout/checkoutmanager.git","svn_url":"https://github.com/reinout/checkoutmanager","homepage":"http://pypi.python.org/pypi/checkoutmanager","size":328,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reinout/checkoutmanager/pulls/14"},"html":{"href":"https://github.com/reinout/checkoutmanager/pull/14"},"issue":{"href":"https://api.github.com/repos/reinout/checkoutmanager/issues/14"},"comments":{"href":"https://api.github.com/repos/reinout/checkoutmanager/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/reinout/checkoutmanager/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/reinout/checkoutmanager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reinout/checkoutmanager/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/reinout/checkoutmanager/statuses/c2ce47208aeecd2542f75ef07541c8fb158a63cf"}}}}