Frage

I am very new to bazaar and I am exploring the features of it (and of version control system)

I have a bazaar repo, lets call it 'foo'. Under foo repo I have a directory, lets call it 'projects'.

so, I want to create a separate bazaar repo with only projects directory & I want to retain the log too. I mean to say, everything that is related to project folder present in log file, should be available with this new repo.

I tried export command, but I just got the directory without any log.

Any pointers where I should look ?

War es hilfreich?

Lösung

You can do this using the fastimport plugin:

bzr fast-export /path/to/orig/project | \
    bzr fast-import-filter -i project1/ | \
        bzr fast-import - /path/to/new/project1

(I broke the line for readability)

  • The first command dumps the revisions of the branch at the specified path to standard output
  • The second command filters the revisions, selecting only the ones that affect the project1/ directory. The trailing / is important.
  • The third command imports the revisions from the standard input to the specified branch. If the branch does not exist, bzr will create a shared repository with a branch named trunk in it.

For more details, see the help pages:

  • bzr help fast-export
  • bzr help fast-import-filter
  • bzr help fast-import

The fastimport plugin is included in the default installation on Windows and Mac OS X. If you have a more exotic setup, I recommend installing it with pip. I don't remember 100% the package name, maybe bzr-fastimport. You will also need the fastimport python library.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top