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': diff --git a/project.py b/project.py index f1a931c6..60fa510a 100644 --- a/project.py +++ b/project.py @@ -503,7 +503,8 @@ class Project(object): worktree, relpath, revisionExpr, - revisionId): + revisionId, + rebase = True): self.manifest = manifest self.name = name self.remote = remote @@ -522,6 +523,8 @@ class Project(object): else: self.revisionId = revisionId + self.rebase = rebase + self.snapshots = {} self.copyfiles = [] self.config = GitConfig.ForRepository( @@ -1096,7 +1099,7 @@ class Project(object): branch.merge = self.revisionExpr branch.Save() - if cnt_mine > 0: + if cnt_mine > 0 and self.rebase: def _dorebase(): self._Rebase(upstream = '%s^1' % last_mine, onto = revid) self._CopyFiles()