简体   繁体   中英

bzr equivalent of svn mergeinfo

In my current svn repository I use the command:

svn mergeinfo --show-revs eligible ^/trunk ^/branches/testing

to get revisions to merge in a format processable by a program.

Does someone know if there is an equivalent command in bazaar?

The way bzr works, I don't think there's an exact equivalent to svn mergeinfo , however, the information that you seek should be retrievable by the bzr missing command, specifically:

cd /path/to/trunk
bzr missing --line --theirs-only /path/to/branches/testing | tail + 2 | awk -F: '{print $1}'

The --theirs-only option shows revisions that exist in the other branch but haven't been merged into the current one. The tail +2 filter strips out the header line.

The --line format will have additional information that awk then strips out by only printing the revision number before the colon.

You can also omit the cd part in an automated script by using the -d option if desired:

bzr missing --line --theirs-only -d /path/to/trunk /path/to/branches/testing

If you need more information instead of just the revision number (for example, if you need UUIDs instead of numeric revision numbers), you can install the bzr-xmloutput plugin via:

# create ~/.bazaar/plugins directory if it doesn't exist via
# mkdir ~/.bazaar; mkdir ~/.bazaar/plugins
cd ~/.bazaar/plugins
bzr branch lp:bzr-xmloutput xmloutput

and use --xml --show-ids instead of --line and use your favorite XML library to process the output.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM