From 7c2e3186477c529008fc69921e39509c1c93ae06 Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Tue, 12 Jan 2010 01:37:46 -0800 Subject: Fix an assumption that Git master represents SVN trunk. post-review makes an assumption that the 'master' branch in a Git repository represents SVN's 'trunk' when using git-svn. Now it uses the calculated parent branch, which may be 'master' or may be some other branch, depending on the repository setup. Patch by Mike Crute Reviewed at http://reviews.reviewboard.org/r/1307/ --- AUTHORS | 1 + rbtools/postreview.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index a7d51ef..88c271e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -17,6 +17,7 @@ Contributors: * Lepton Wu * Luke Lu * Matthew Woehlke + * Mike Crute * Paul Scott * Raghu Kaippully * Ravi Kondamuru diff --git a/rbtools/postreview.py b/rbtools/postreview.py index 9b422c4..a313a79 100755 --- a/rbtools/postreview.py +++ b/rbtools/postreview.py @@ -2160,7 +2160,7 @@ class GitClient(SCMClient): svn diff would generate. This is needed so the SVNTool in Review Board can properly parse this diff. """ - rev = execute(["git", "svn", "find-rev", "master"]).strip() + rev = execute(["git", "svn", "find-rev", parent_branch]).strip() if not rev: return None -- cgit v1.2.3