[Pkg-bazaar-commits] ./bzrtools/unstable r681: New upstream release.
Jelmer Vernooij
jelmer at samba.org
Fri May 29 07:35:18 UTC 2009
------------------------------------------------------------
revno: 681
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: unstable
timestamp: Fri 2009-05-29 09:35:18 +0200
message:
New upstream release.
modified:
NEWS
__init__.py
command_classes.py
debian/changelog
debian/control
fetch_ghosts.py
version.py
------------------------------------------------------------
revno: 659.1.46
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: bzrtools-rich-root
timestamp: Tue 2009-04-28 14:48:53 -0400
message:
Update NEWS
modified:
NEWS
------------------------------------------------------------
revno: 659.1.47
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: bzrtools
timestamp: Wed 2009-05-20 12:30:15 +0200
message:
Update version to 1.15
modified:
version.py
------------------------------------------------------------
revno: 659.1.48
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: bzrtools
timestamp: Wed 2009-05-27 20:57:14 +0200
message:
Clean up fetch_ghosts.
modified:
__init__.py
command_classes.py
fetch_ghosts.py
------------------------------------------------------------
revno: 659.1.49
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: bzrtools
timestamp: Wed 2009-05-27 20:58:58 +0200
message:
Update NEWS
modified:
NEWS
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2009-04-10 21:11:45 +0000
+++ b/NEWS 2009-05-27 18:58:58 +0000
@@ -1,14 +1,21 @@
-April 10 2008
+May 27 2009
+* Fix fetch-ghosts command for bzr 1.15
+* RELEASE: bzrtools 1.15.0
+
+April 28 2009
+* bzrtools officially upgraded to rich roots.
+
+April 10 2009
* Fix import command for Python 2.6
* RELEASE: bzrtools 1.14.0
-March 11 2008
+March 11 2009
* `bzr patch` handles URLs with trailing slashes.
* RELEASE: bzrtools 1.13.0
* Remove clean-tree (now in bzr core)
* New conflict-diff command
-February 10 2008
+February 10 2009
* RELEASE: bzrtools 1.12.0
January 12 2009
=== modified file '__init__.py'
--- a/__init__.py 2009-04-10 20:07:41 +0000
+++ b/__init__.py 2009-05-27 18:57:14 +0000
@@ -77,6 +77,7 @@
import tests.is_clean
import tests.test_cbranch
import tests.test_conflict_diff
+ from bzrlib.plugins.bzrtools.tests import test_fetch_ghosts
import tests.test_link_tree
import tests.test_patch
import tests.test_rspush
@@ -93,6 +94,7 @@
result.addTest(zap.test_suite())
result.addTest(TestLoader().loadTestsFromModule(tests.test_dotgraph))
result.addTest(TestLoader().loadTestsFromModule(tests.is_clean))
+ result.addTest(TestLoader().loadTestsFromModule(test_fetch_ghosts))
result.addTest(TestLoader().loadTestsFromModule(tests.test_link_tree))
result.addTest(TestLoader().loadTestsFromModule(tests.test_patch))
result.addTest(TestLoader().loadTestsFromModule(tests.test_rspush))
=== modified file 'command_classes.py'
--- a/command_classes.py 2009-04-10 20:07:41 +0000
+++ b/command_classes.py 2009-05-27 18:57:14 +0000
@@ -120,7 +120,7 @@
takes_options = [Option('no-fix', help="Skip additional synchonization.")]
def run(self, branch=None, no_fix=False):
from fetch_ghosts import fetch_ghosts
- fetch_ghosts(branch, no_fix)
+ fetch_ghosts(branch, do_reconcile=not no_fix)
strip_help="""Strip the smallest prefix containing num leading slashes from \
each file name found in the patch file."""
=== modified file 'debian/changelog'
--- a/debian/changelog 2009-04-16 18:51:59 +0000
+++ b/debian/changelog 2009-05-29 07:35:18 +0000
@@ -1,10 +1,13 @@
-bzrtools (1.14.0-2) unstable; urgency=low
+bzrtools (1.15.0-1) unstable; urgency=low
[ Adeodato Sim? ]
* Remove myself from uploaders.
- -- Adeodato Sim? <dato at net.com.org.es> Thu, 16 Apr 2009 20:51:15 +0200
+ [ Jelmer Vernooij ]
+ * New upstream release.
+
+ -- Jelmer Vernooij <jelmer at debian.org> Fri, 29 May 2009 09:33:56 +0200
bzrtools (1.14.0-1) unstable; urgency=low
=== modified file 'debian/control'
--- a/debian/control 2009-04-16 18:51:59 +0000
+++ b/debian/control 2009-05-29 07:35:18 +0000
@@ -4,7 +4,7 @@
Maintainer: Debian Bazaar Maintainers <pkg-bazaar-maint at lists.alioth.debian.org>
Uploaders: Gustavo Franco <stratus at debian.org>, Arnaud Fontaine <arnau at debian.org>, Reinhard Tartler <siretart at tauware.de>, Jelmer Vernooij <jelmer at debian.org>
Build-Depends: cdbs, debhelper, python, python-central
-Build-Depends-Indep: bzr (>= 1.14~), rsync
+Build-Depends-Indep: bzr (>= 1.15~), rsync
Vcs-Bzr: http://bzr.debian.org/pkg-bazaar/bzrtools/unstable
Homepage: http://bazaar-vcs.org/BzrTools
Standards-Version: 3.8.1
@@ -13,7 +13,7 @@
Package: bzrtools
Architecture: all
-Depends: ${python:Depends}, bzr (>= 1.14~), bzr (<< 1.15~), patch, ${misc:Depends}
+Depends: ${python:Depends}, bzr (>= 1.15~), bzr (<< 1.16~), patch, ${misc:Depends}
Recommends: rsync
Suggests: librsvg2-bin, graphviz
XB-Python-Version: ${python:Versions}
=== modified file 'fetch_ghosts.py'
--- a/fetch_ghosts.py 2007-04-04 18:12:00 +0000
+++ b/fetch_ghosts.py 2009-05-27 18:57:14 +0000
@@ -14,73 +14,92 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from bzrlib.branch import Branch
-from bzrlib.errors import NoSuchRevision, InstallFailed, BzrCommandError
-def fetch_ghosts(branch, no_fix):
- """Install ghosts from copies in another branch."""
- this_branch = Branch.open_containing('.')[0]
- if branch is None:
- branch = this_branch.get_parent()
- if branch is None:
- raise BzrCommandError('No branch specified and no location saved.')
- else:
- print "Using saved location %s" % branch
-
- other_branch = Branch.open_containing(branch)[0]
- installed = []
- failed = []
- lock_other = this_branch.base != other_branch.base
-
- this_branch.lock_write()
- try:
- if lock_other:
- other_branch.lock_read()
+from bzrlib.trace import note
+from bzrlib.errors import NoSuchRevision, BzrCommandError
+
+class GhostFetcher(object):
+
+ @classmethod
+ def from_cmdline(klass, other):
+ this_branch = Branch.open_containing('.')[0]
+ if other is None:
+ other = this_branch.get_parent()
+ if other is None:
+ raise BzrCommandError('No branch specified and no location'
+ ' saved.')
+ else:
+ note("Using saved location %s.", branch)
+ other_branch = Branch.open_containing(other)[0]
+ return klass(this_branch, other_branch)
+
+ def __init__(self, this_branch, other_branch):
+ self.this_branch = this_branch
+ self.other_branch = other_branch
+
+ def run(self):
+ lock_other = self.this_branch.base != self.other_branch.base
+ self.this_branch.lock_write()
try:
- # Because iter_ghosts tests for existence after our last fetch
- # is complete, it won't falsely report an ancestor as a ghost.
- # Yay iterators!
- ghosts = iter_ghosts(this_branch)
- for revision in ghosts:
+ if lock_other:
+ self.other_branch.lock_read()
+ try:
+ return self._run_locked()
+ finally:
+ if lock_other:
+ self.other_branch.unlock()
+ finally:
+ self.this_branch.unlock()
+
+ def iter_ghosts(self):
+ """Find all ancestors that aren't stored in this branch."""
+ seen = set()
+ lines = [self.this_branch.last_revision()]
+ if lines[0] is None:
+ return
+ while len(lines) > 0:
+ new_lines = []
+ for line in lines:
+ if line in seen:
+ continue
+ seen.add(line)
try:
- this_branch.fetch(other_branch, revision)
- installed.append(revision)
- except InstallFailed:
- failed.append(revision)
- else:
- if this_branch.last_revision() is None:
- print "No revisions in branch."
- if len(installed) > 0:
- print "Installed:"
- for rev in installed:
- print rev
- if len(failed) > 0:
- print "Still missing:"
- for rev in failed:
- print rev
- finally:
- if lock_other:
- other_branch.unlock()
- finally:
- this_branch.unlock()
-
- if not no_fix and len(installed) > 0:
+ revision = self.this_branch.repository.get_revision(line)
+ new_lines.extend(revision.parent_ids)
+ except NoSuchRevision:
+ yield line
+ lines = new_lines
+
+ def _run_locked(self):
+ installed = []
+ failed = []
+ if self.this_branch.last_revision() is None:
+ print "No revisions in branch."
+ return
+ # Because iter_ghosts tests for existence after our last fetch
+ # is complete, it won't falsely report an ancestor as a ghost.
+ # Yay iterators!
+ ghosts = self.iter_ghosts()
+ for revision in ghosts:
+ try:
+ self.this_branch.fetch(self.other_branch, revision)
+ installed.append(revision)
+ except NoSuchRevision:
+ failed.append(revision)
+ return installed, failed
+
+def fetch_ghosts(branch, do_reconcile):
+ """Install ghosts from copies in another branch."""
+ installed, failed = GhostFetcher.from_cmdline(branch).run()
+ if len(installed) > 0:
+ print "Installed:"
+ for rev in installed:
+ print rev
+ if len(failed) > 0:
+ print "Still missing:"
+ for rev in failed:
+ print rev
+ if do_reconcile and len(installed) > 0:
from bzrlib.builtins import cmd_reconcile
cmd_reconcile().run(".")
-def iter_ghosts(branch):
- """Find all ancestors that aren't stored in this branch."""
- seen = set()
- lines = [branch.last_revision()]
- if lines[0] is None:
- return
- while len(lines) > 0:
- new_lines = []
- for line in lines:
- if line in seen:
- continue
- seen.add(line)
- try:
- revision = branch.repository.get_revision(line)
- new_lines.extend(revision.parent_ids)
- except NoSuchRevision:
- yield line
- lines = new_lines
+
=== modified file 'version.py'
--- a/version.py 2009-03-25 18:49:18 +0000
+++ b/version.py 2009-05-20 10:30:15 +0000
@@ -1,2 +1,2 @@
-__version__ = '1.14.0'
+__version__ = '1.15.0'
version_info = tuple(int(n) for n in __version__.split('.'))
More information about the Pkg-bazaar-commits
mailing list