merging %s paths

Ali Sabil ali.sabil at gmail.com
Fri Jan 15 09:53:26 GMT 2010


On Fri, Jan 15, 2010 at 10:45 AM, David Ingamells
<david.ingamells at mapscape.eu> wrote:
>
>
> }--o wrote:
>>
>> hi,
>>
>> at our company we have a simple file-structure for projects, something
>> like
>>
>> http://reposerver.com/repos/
>> project
>>  - mymain
>>  - yourmain
>>  - hisbranch
>>  - herbranch
>> ....
>>
>> and we do merging between these branches quite often. bzr merge works
>> fine, but it would be really nice to write bzr merge herbranch to get bzr
>> merge bzr+ssh:://reposerver/repos/herbranch
>>
>> is this possible in some easy way?
>>
>> thanks, V
>
> on *NIX:
>
> herbranch=bzr+ssh:://reposerver/repos/herbranch
>
> bzr merge $herbranch
>

You can also use the bzr-bookmarks plugin or write your own based on
this template:

from bzrlib.errors import InvalidURL
from bzrlib.directory_service import directories


class BookmarkDirectory(object):

    def look_up(self, name, url):
        if url.startswith('company:'):
            name = url[8:]
        else:
            raise InvalidURL(path=url)
        return "http://reposerver.com/repos/" + name

def get_test_permutations():
    return []

directories.register('company:', BookmarkDirectory)


which allows you to do things like bzr merge company:herbranch

Ali



More information about the bazaar mailing list