11.07.2015 Views

Version Control with Subversion - Login

Version Control with Subversion - Login

Version Control with Subversion - Login

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Branching and Merging“Properties”.)You can examine the property, just like any other:$ cd my-calc-branch$ svn propget svn:mergeinfo ./trunk:341-390It is not recommended that you change the value of this property yourself, unless you reallyknow what you're doing. This property is automatically maintained by <strong>Subversion</strong> wheneveryou run svn merge. Its value indicates which changes (at a given path) have been replicatedinto the directory in question. In this case, the path is /trunk and the directory whichhas received the specific changes is /branches/my-calc-branch.There's also a subcommand, svn mergeinfo, which can be helpful in seeing not onlywhich changesets a directory has absorbed, but also which changesets it's still eligible toreceive. This gives a sort of preview of the next set of changes that svn merge will replicateto your branch.$ cd my-calc-branch# Which changes have already been merged from trunk to branch?$ svn mergeinfo ^/trunkr341r342r343…r388r389r390# Which changes are still eligible to merge from trunk to branch?$ svn mergeinfo ^/trunk --show-revs eligibler391r392r393r394r395The svn mergeinfo command requires a “source” URL (where the changes would be comingfrom), and takes an optional “target” URL (where the changes would be merged to). Ifno target URL is given, it assumes that the current working directory is the target. In theprior example, because we're querying our branch working copy, the command assumeswe're interested in receiving changes to /branches/mybranch from the specified trunkURL.Another way to get a more precise preview of a merge operation is to use the --dry-runoption:$ svn merge ^/trunk --dry-runU integer.c$ svn status# nothing printed, working copy is still unchanged.The --dry-run option doesn't actually apply any local changes to the working copy. Itshows only status codes that would be printed in a real merge. It's useful for getting a“high-level” preview of the potential merge, for those times when running svn diff gives toomuch detail.96

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!