Package: eazysvn
Eazysvn is a Python script that simplifies some common operations with
Subversion branches.ContentsInstallationUsageGetting helpSwitching between branchesWorking with branchesSeeing all the changes on a branchMerging branchesCherrypickingReverting committed changesMaking tagsManipulating branchesOverall optionsAppendixesRevision numbersBranch namesBranch merge logicChangelog1.15.1 (2019-04-23)1.15.0 (2018-04-13)1.14.0 (2016-09-17)1.13.0 (2015-01-13)1.12.2 (2012-02-20)1.12.1 (2010-09-14)1.12.0 (2010-07-22)1.11.0 (2009-05-26)1.10.0 (2009-04-08)1.9.0 (2008-08-08)1.8.0 (2008-06-26)1.7.0 (2008-06-11)1.6.1 (2007-12-12)1.6.0 (2007-12-11)1.5.1 (2007-06-28)1.5 (2007-06-28)1.5 (2007-06-28)1.4.1 (2007-06-20)1.4.0 (2007-06-11)1.3.1 (2007-04-04)1.3 (2007-01-25)1.2 (2007-01-16)1.1 (2007-01-12)1.0 (2006-08-23)Licensing and source codeBugsWishlist/To doInstallationGet it from thePython Package Index:pip install eazysvnYou’ll need Python 2.7 or later, as well as the Subversion command-line client.UsageGetting helpAt the shell prompt typeeazysvn helpIt will print a list of commands.  Some of the commands have aliases:ezswitch = eazysvn switch
ezmerge = eazysvn merge
ezrevert = eazysvn revert
ezbranch = eazysvn branchurlSwitching between branchesIn a subversion working directory runezswitch -lto see all the branches available in your project.  This assumes your
Subversion repository uses the standard layout with ‘trunk’, ‘tags’, and
‘branches’ in it.Then runezswitchbranchnameto switch to a branch, andezswitch trunkto switch back to trunk.Working with branchesSay you’re working on a project and in the middle of a difficult refactoring
suddenly realize the changes you’ve made are too risky for trunk you want to
put them in a branch.  Runezswitch --createmy-branchThis will create a new branch and switch your working directory to it.  All
your changes in progress are kept intact and you can commit them directly
to the new branch with svn commit.Seeing all the changes on a branchYou may want to see the overall diff of changes made on a branch since it was
created, say, to review it before attempting a merge.eazysvn branchdiffbranchnamedoes exactly that.  For extra readability, installcolordiffand useeazysvn branchdiffbranchname| colordiff | less -RMerging branchesAfter you’ve finished hacking on your branch, you will want to switch back to
trunk and start merging.  Runezswitch trunkthenezmergemy-branchYou will see the svn command used for the merge as well as a log of all the
changes.  Fix merge conflicts (if any), run the test suite, then commit.
The output of ezmerge helps you produce an informative commit message.If instead of merging the changes to your working directory you’d like to see
the combined diff, pass the -d (or –diff) option to ezmergeezmerge -dfeaturebranchCherrypickingIf you want to merge only some of the changes made in a branch, you can pass the
revision number (or a range) to ezmerge.  For example, to backport a bug fix
implemented in revision 1234 of trunk to a release branch,ezswitchrelease-branchezmerge 1234 trunkYou can also merge a range of revisionsezmerge 1234-1236 trunkThis range is inclusive, unlike Subversion.  If you want to, you can also use
Subversion-style half-open ranges as wellezmerge 1233:1236 trunkThe –diff option works here too.ezmerge -d 1234-1236 trunkReverting committed changesIt’s like cherry-picking, but in reverse: you want to unapply changes already
committed to this branch.ezrevert 1234Making tagsTo tag the current version of the source tree in your working directory, runeazysvn tagtagnameManipulating branchesTo remove a branch completely, runeazysvn rmbranchbranchnameTo rename a branch, runeazysvn mvbrancholdbranchnamenewbranchnameTo do other kinds of operations, eazysvn provides a shortcut that lets you
use branch names instead of full branch URLs (this bit assumes a Unix-like
shell):svn ls $(ezbranchbranchname)
svn diff `ezbranchbranch1` `ezbranchbranch2`Another possibly useful eazysvn command isbranchpoint.  It shows the
revision when a branch was created.  For example, to see the changes
in trunk that are not present in a branch, runsvn diff -r `eazysvn branchpointbranch`:HEAD `ezbranchtrunk`Overall optionsAll commands that require a branch name as an argument accept a -l (or –list)
option that lists all branches, e.g.ezbranch -lAll commands that make changes to the repository or working directory accept
a -n (or –dry-run) option that just prints the svn commands that would
otherwise be executed.ezmerge -n 1234 otherbranchAll commands that make changes to the repository (create/remove/rename branches
or tags) accept a -m option with a commit message.  If not specified, you’ll
get a text editor spawned by subversion itself to type the commit message.ezswitch -c newbranch -m "Create branch for the new feature"Many of the commands accept other options as well.  Useeazysvncmd--help
ezmerge --help
ezswitch --helpetc.to discover those.AppendixesRevision numbersA revision to Subversion means the state of the whole project tree at a given
instant of time.  Sometimes the changeset that converts one revision to another
is more interesting.  When you specify a single number N to ezmerge, it assumes
that you want to merge the changeset that changes revision (N-1) to revision N.If you specify a range N-M, ezmerge.py merges all the changesets
that change revision (N-1) to revision M.  For compatibility withsvn mergeyou can specify the revision range as N:M, and ezmerge will
merge all the changesets that convert revision N to revision M.  In the last
case N can be greater than M, which is useful if you want to revert some
changes, althoughezrevertis more convenient for that.When you specify ranges (N-M or N:M) M can be a special nameHEAD.
It means the latest revision in the repository.You can also specify a special rangeALL, which means all the changesets
made in the branch.  ezmerge will parse the output ofsvn logto get the
revision numbers for you.ezmerge branchnameis a shortcut forezmerge ALL branchname.For easier copying & pasting fromsvn logoutput, you can prefix numbers
with the letterr, e.g.r1234.Branch namesEazysvn expects you to use the traditional repository layout, and can
find its way from any of these to any other of these URLs if you specify the
desired branch name as ‘trunk’, ‘foo’, or ‘bar’.scheme://server/path/to/svn/repo/trunk/subdirsscheme://server/path/to/svn/repo/branches/foo/subdirsscheme://server/path/to/svn/repo/branches/bar/subdirsYou do not have to be at the top of the project to switch or merge, any
subdirectory will work.  The part of your checkout above the current
directory will not be touched by the merge/switch.An alternative scheme is partially supported:scheme://server/path/to/svn/repo/trunk/subdirsscheme://server/path/to/svn/repo/branch/foo/subdirsscheme://server/path/to/svn/repo/branch/bar/subdirsEazysvn will be able to find the location of trunk or other branches if you
start out in a branch checkout, but it won’t be able to find your branches
from a trunk checkout.  This is a bug that should be fixed one day.You can force eazysvn to use any nonstandard scheme if you explicitly enter the
prefix with a slash in front of the branch name, e.g.ezswitch feature/fooin a trunk checkout would switch fromscheme://server/path/to/svn/repo/trunk/subdirstoscheme://server/path/to/svn/repo/feature/foo/subdirsIf you start out in a checkout of such a nonstandard location, Eazysvn won’t be
able to find the location of trunk or other branches.  This is a bug that
should be fixed one day.Branch merge logicWhen you merge a branch (to trunk or to another branch), eazysvn usessvn logto find the revision number when the branch was created.  Then it merges
all the changes ever committed on that branch.This means you usually can’t merge from the same branch more than once.  It’s
a consequence of Subversion’s lack of merge tracking.Also, since there’s no fancy searching for common ancestors or anything like
that, if you branch A from trunk make some changes, then branch B from branch
A, make some changes, then if you ezmerge B on trunk, you won’t get any changes
made in branch A.When you merge a trunk to a branch, eazysvn again usessvn logto find the
branch point and then merges all the changes made on trunk since that revision.It’s a bad idea to merge from trunk to a branch, because then you won’t easily
be able to merge that branch back to trunk.  You may try, subversion might
apply the already-applied changes twice cleanly, but it’s a matter of luck.Keep it simple: always merge a branch only once, back to the same place you
branched from, and you’ll avoid trouble.  Remove branches you’ve merged to
avoid accidentally making new changes that will be harder to merge.Changelog1.15.1 (2019-04-23)Add support for Python 3.7.Drop support for Python 3.4.1.15.0 (2018-04-13)Add support for Python 3.6.Drop support for Python 3.3.100% test coverage.1.14.0 (2016-09-17)Drop Python 2.6 and 3.2 support.Actually support Python 3.1.13.0 (2015-01-13)Flush output buffers before executing external commands.  Previously
if you did, e.g. eazysvn branchdiff > DIFF, you would see the output of svn
diff above the svn diff command itself.Fix command alias handling on windows
(https://github.com/mgedmin/eazysvn/pull/1)
Patch by Timon Wong <timon86.wang@gmail.com>.Support Python 3.1.12.2 (2012-02-20)New argument:ezmerge--accept=ARG, passed directly to subversion.Moved the source code from self-hosted Subversion to GitHub.1.12.1 (2010-09-14)A somewhat better error message forezswitch-cnewbranchwhen eazysvn
is unable to understand the branch structure (LP#446369).ezswitch-ttagname; ezswitch branchnameswitches to a branch namedbranchnameinstead of trying to switch to a tag namedbranchname(LP#617888, fix by Wolfgang Schnerring).1.12.0 (2010-07-22)Minor fixes to various options –help messages.Don’t pass revision range to svn when usingezmerge--reintegrate.
Patch by Michael Howitz <mh@gocept.com>.New option:ezmerge--tag.
Contributed by Michael Howitz <mh@gocept.com>.1.11.0 (2009-05-26)New option:ezmerge--reintegrate, passed straight to svn merge.
Contributed by Wolfgang Schnerring <wosc@wosc.de>.1.10.0 (2009-04-08)Usessubprocessinstead ofos.popen2; no more deprecation warnings
on Python 2.6.1.9.0 (2008-08-08)eazysvn tagaccepts the -l (–list) option.ezbranchandezswitchaccept the -t option.New command:eazysvn branchpoint.You can refer to tags in all commands that accept branch names; use a branch
named “tags/tagname”.  This works for all kinds of prefixes, e.g.
“obsolete-branches/branchname” etc.1.8.0 (2008-06-26)Nice PyPI documentation page with a changelog.New command:eazysvn tag.eazysvn--versionprints the version number.1.7.0 (2008-06-11)New command:eazysvn branchdiff.1.6.1 (2007-12-12)ezmergeaccepts the -l (–list) option.ezmerge branchnameis short forezmerge ALL branchname.1.6.0 (2007-12-11)ezmergeaccepts the -d (–diff) option.1.5.1 (2007-06-28)ezrevertis short foreazysvn revert.1.5 (2007-06-28)New command:ezbranch, short foreazysvn branchurl.1.5 (2007-06-28)New command:ezbranch, short foreazysvn branchurl.1.4.1 (2007-06-20)Bugfix foreazysvn rmbranch.1.4.0 (2007-06-11)New command:eazysvn rmbranch.New command:eazysvn mvbranch.1.3.1 (2007-04-04)Makeezmerge ALL trunkuseful: merge changes from the branch point of the
current branch, not from the start of trunk.1.3 (2007-01-25)New command:eazysvn revert.1.2 (2007-01-16)First setuptools-based release, thanks to Philipp von Weitershausen.New command:eazysvnwith four subcommands:merge(same as the oldezmergecommand),switch(same as the oldezswitchcommand),helpandselftest.1.1 (2007-01-12)New command:ezswitch.Changedezmergeoutput format to be clearer.ezmergenow accepts ‘rXXX’ as revision numbers.ezmerge XXX:YYYtreats the range as SVN-compatibleezmergeXXX-YYYis the new syntax for user-friendly inclusive rangesezmerge ALL branchnamefigures out the appropriate revision numbers to
merge all of the changes made in that branch.ezmergenow accepts -n (–dry-run) option.ezmergenow accepts -h (–help) and shows a help message.1.0 (2006-08-23)The originalezmerge.pyby Philipp von Weitershausen.Some of the dates before version 1.7.0 may be approximate, and the changes
misattributed to the wrong revision.Licensing and source codeEazysvn is licensed under the GNU General Public Licence version 2 or later.You can get the latest source code withgit clonehttps://github.com/mgedmin/eazysvnEazysvn began life as Philipp von Weitershausen’sezmerge.py.  Then Marius Gedminas
took over, created ahome page, and started
adding random features.BugsReport bugs athttps://github.com/mgedmin/eazysvn/issuesWishlist/To doezmergeshould accept a comma-separated list of revisions (1,2,4-6,9).There should beeazysvn rmtagandeazysvn mvtag.eazysvn help cmdshould be the same aseazysvn cmd--helpand not an
error.eazysvn-ncmdshould be the same aseazysvn cmd-nand not an error.eazysvnshould do ansvn lsto discover the branching scheme in use
(‘branch’ or the more traditional ‘branches’).