[Python-Dev] [Python-3000] Python source code on Bazaar vcs
Jonathan Lange
jml at mumak.net
Sat Mar 22 01:13:13 CET 2008
On Sat, Mar 22, 2008 at 8:28 AM, Paul Moore <p.f.moore at gmail.com> wrote:
> Basically, can some Bazaar expert offer a suggestion as to how a
> non-developer with read-only access would best use the Bazaar
> repositories to maintain a number of patches to be posted to the
> tracker?
>
Here's what I'd do: get Python, make a branch for my patch, hack on
the patch in the branch, then use merge --preview to generate a diff.
If you want to maintain a long-lived branch of Python with patches,
say you're maintaining a distro package, then looms are your best bet.
For those inclined to specifics, here's a near-exact example of what I would do:
# Get Python
bzr init-repo ~/src/python
cd ~/src/python
bzr branch <url_of_python_trunk>
# Make a patch
bzr branch trunk docstring-fix-bug-123456
cd docstring-fix-bug-123456
<hack hack hack>
bzr ci -m 'Correct some spelling'
<hack hack hack>
bzr ci -m 'Oops. Make sure we use US English'
<hack hack hack -- notice this doesn't belong in the branch>
# Move the unrelated work to another branch.
cd ..
bzr branch trunk testcase-add-cleanup
cd testcase-add-cleanup
bzr merge --uncommitted ../docstring-fix-bug-123456
bzr ci -m "Add addCleanup method to TestCase. Schedules a nullary
callable to be run before tearDown"
# Prepare the patches
cd ../trunk
bzr merge --preview ../docstring-fix-bug-123456 > ~/Desktop/docstring.patch
bzr merge --preview ../testcase-add-cleanup > ~/Desktop/add-cleanup.patch
Hope this helps,
jml
More information about the Python-Dev
mailing list