From d3153825723b2bec3476e84f2e423c646fd4c598 Mon Sep 17 00:00:00 2001 From: Mike Pontillo Date: Tue, 28 Feb 2012 11:53:24 -0800 Subject: Add 'rebase="false"' attribute to the XML. This new attribute can prevent 'repo sync' from automatically rebasing. I hit a situation in where one of the git repositories I was tracking was actually an external repository that I wanted to pull commits into and merge myself. (NOT rebase, since that would lose the merge history.) In this case, I'm not using 'repo upload', I'm manually managing the merges to and from this repository. Everything was going great until I typed 'repo sync' and it rebased my manually-merged tree. Hence the option to skip it. Change-Id: I965e0dd1acb87f4a56752ebedc7e2de1c502dbf8 --- manifest_xml.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'manifest_xml.py') diff --git a/manifest_xml.py b/manifest_xml.py index 9189eec4..44538690 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -498,6 +498,12 @@ class XmlManifest(object): "project %s path cannot be absolute in %s" % \ (name, self.manifestFile) + rebase = node.getAttribute('rebase') + if not rebase: + rebase = True + else: + rebase = rebase.lower() in ("yes", "true", "1") + if self.IsMirror: relpath = None worktree = None @@ -513,7 +519,8 @@ class XmlManifest(object): worktree = worktree, relpath = path, revisionExpr = revisionExpr, - revisionId = None) + revisionId = None, + rebase = rebase) for n in node.childNodes: if n.nodeName == 'copyfile': -- cgit v1.2.3-54-g00ecf