summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
authorMike Pontillo <pontillo@gmail.com>2012-02-28 11:53:24 -0800
committerShawn O. Pearce <sop@google.com>2012-03-12 12:24:22 -0700
commitd3153825723b2bec3476e84f2e423c646fd4c598 (patch)
tree11436435822daca2da44674fc538b3a668c199a5 /manifest_xml.py
parent43bda84362b8fd8bb74a81003e8b49cff15ea5ed (diff)
downloadgit-repo-d3153825723b2bec3476e84f2e423c646fd4c598.tar.gz
Add 'rebase="false"' attribute to the <project/> 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
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py9
1 files changed, 8 insertions, 1 deletions
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):
498 "project %s path cannot be absolute in %s" % \ 498 "project %s path cannot be absolute in %s" % \
499 (name, self.manifestFile) 499 (name, self.manifestFile)
500 500
501 rebase = node.getAttribute('rebase')
502 if not rebase:
503 rebase = True
504 else:
505 rebase = rebase.lower() in ("yes", "true", "1")
506
501 if self.IsMirror: 507 if self.IsMirror:
502 relpath = None 508 relpath = None
503 worktree = None 509 worktree = None
@@ -513,7 +519,8 @@ class XmlManifest(object):
513 worktree = worktree, 519 worktree = worktree,
514 relpath = path, 520 relpath = path,
515 revisionExpr = revisionExpr, 521 revisionExpr = revisionExpr,
516 revisionId = None) 522 revisionId = None,
523 rebase = rebase)
517 524
518 for n in node.childNodes: 525 for n in node.childNodes:
519 if n.nodeName == 'copyfile': 526 if n.nodeName == 'copyfile':