I tried to use Bazaar in Ubuntu to push/merge onto a MS-DOS (FAT) partition (like a USB-mounted Android device) to keep all my code and notes synced up. On Ubuntu with the device mounted as a USB drive:

cd /media/83E2-0FEC/ bzr checkout ~/Notes/briefcase/notes

Unfortunately, I get a

bzr: ERROR: [Errno 1] Operation not permitted

Is this because the partition is FAT? Is it because of chmod/chown attempts within bzr? The .bzr directory is created but no files are transferred/pulled.

I haven't tried svn, git, etc, but will if someone has had success doing anything similar. Basically I just need a non-interactive merge for a directory tree of text files that might change on both sides before the merge. Rsync can't handle bidirectional merging much less changes to the same file on both sides.

link|improve this question
feedback

1 Answer

The problem may have been that I was trying to merge repos an NTFS partition and a FAT32 partition containing a symbolic link. The following python script seems to ignore symbolic links. Obviously you need to set your paths appropriately.

if os.path.exists(rpath) and os.path.exists(lpath):
    for pth in [rpath, lpath]:
        # probably better to do a bzr merge, but this seems to work OK
        os.chdir(pth)
        os.system('bzr update')
        os.system('find . -name .bzr -prune -o -type f -print0 | xargs -0 bzr add')
        os.system('bzr commit -m "Committed android versions in \''+pth+'\' or \'$PWD\'"')

When incorporated into a larger script or cron job it's a great way to seemlessly work remotely or locally to edit various text files, like PalmPilot notes synced with Outlook notes used to work.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.