summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2007-09-05 20:58:55 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2007-09-05 20:58:55 +0000
commit7ed6a9c8f5b74691f6f734cabd1903b27c8da4dc (patch)
tree0bcf690edd6b7e37e8fdb495cc93e6b21d8bafa6
parent57d81fd620b54f69959b2152d7b38d91c98f56ce (diff)
downloadbitbake-7ed6a9c8f5b74691f6f734cabd1903b27c8da4dc.tar.gz
bzr.py: bzr fetcher tweaks from Robert Schuster (#2913)
-rw-r--r--ChangeLog1
-rw-r--r--lib/bb/fetch/bzr.py10
2 files changed, 4 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 4125e0316..dc6ceb67b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@ Changes in BitBake 1.8.x:
- Add bzr fetcher
- Add support for cleaning directories before a task in the form:
do_taskname[cleandirs] = "dir"
+ - bzr fetcher tweaks from Robert Schuster (#2913)
Changes in Bitbake 1.8.8:
- Rewrite svn fetcher to make adding extra operations easier
diff --git a/lib/bb/fetch/bzr.py b/lib/bb/fetch/bzr.py
index be89a080a..c66d17fdd 100644
--- a/lib/bb/fetch/bzr.py
+++ b/lib/bb/fetch/bzr.py
@@ -87,7 +87,7 @@ class Bzr(Fetch):
if command is "fetch":
bzrcmd = "%s co %s %s://%s" % (basecmd, " ".join(options), proto, bzrroot)
elif command is "update":
- bzrcmd = "%s update %s" % (basecmd, " ".join(options))
+ bzrcmd = "%s pull %s --overwrite" % (basecmd, " ".join(options))
else:
raise FetchError("Invalid bzr command %s" % command)
@@ -101,8 +101,7 @@ class Bzr(Fetch):
bb.msg.debug(1, bb.msg.domain.Fetcher, "%s already exists or was mirrored, skipping bzr checkout." % ud.localpath)
return
- # Updating is disabled until bzr supports the syntax "bzr update -r X" to specify a revision
- if 0 and os.access(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir), '.bzr'), os.R_OK):
+ if os.access(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir), '.bzr'), os.R_OK):
bzrcmd = self._buildbzrcommand(ud, d, "update")
bb.msg.debug(1, bb.msg.domain.Fetcher, "BZR Update %s" % loc)
os.chdir(os.path.join (ud.pkgdir, os.path.basename(ud.path)))
@@ -145,10 +144,7 @@ class Bzr(Fetch):
output = runfetchcmd(self._buildbzrcommand(ud, d, "revno"), d, True)
- for line in output.splitlines():
- revision = line
-
- return revision
+ return output.strip()
def _sortable_revision(self, url, ud, d):
"""