Where bazaar looks for rules file? - bazaar

On Bazaar documentation of its using with Subversion repositories:
http://doc.bazaar.canonical.com/migration/en/foreign/bzr-on-svn-projects.html
there is info in "Limited keywords support" about expansion of $Id$.
Where does bazaar look for such rules file? I tried rules.bazaar in current directory and in [APP_DATA]\bazaar\2.0\rules.bazaar, and added that to bazaar.conf but when I checkout from Subversion repository $Id$ is not expanded.
I work on Windows, with Bazaar (bzr) 2.2.1 and Tortoise Bazaar 0.5.8

run bzr version on the commandline
and see the line that starts with "Bazaar configuration:".
You should add a file called "rules" in that directory.

You should put the rules in something like:
C:\Documents and Settings\\Application Data\Bazaar\2.0\rules
It's the directory where you have bazaar.conf.
Keyword expansion should be easier with the keyword plugin

Related

Importing a specific folder from a GIT Erlang repository in IntelliJ

IntelliJ IDEA 2022.2.2
Erlang plugin 0.11.1144
SDK: Erlang OTP 25, erts-13.0
Folder To be Imported: https://github.com/erlang/otp/tree/master/lib/common_test
I am able to import the complete project https://github.com/erlang/otp.git in IntelliJ. But, I am interested in a specific module common_test. I checked File->New->ProjectFromVersionControl, but did not find any option to clone a specific folder. Does IntelliJ support such cloning? Please let me know the procedure if available.
One option could be to clone the specific folder outside IntelliJ as explained in How do I clone a subdirectory only of a Git repository? & then import it using File->New->ProjectFromExistingSources in IntelliJ.
With Git, cloning a specific folder is a bit tricky. In fact, you can't clone only the folder, as you clone the entire repository.
What you can do is actually to use partial-clone in combination with sparse-checkout git features. See How do I clone a subdirectory only of a Git repository?
These options are currently not supported in IJ UI, unfortuantely

Does the "Ignored Files" settings create an external ignore file for it's select VCS?

I assumed that if I have my VCS set up with Git and listed files within the "ignored files" settings, then IntelliJ Idea is automatically creating a .gitignore file. This doesn't appear to be the case.
My project has a .gitignore file and it does not match the settings within "Ignored Files". I suspect this is a failure on my part to understand what this IntelliJ setting is.
So Ignored Files has nothing to do with my gitignore file?
Right: The "Ignore" feature of IDEA is separate from the specific version control ignore feature.
The IDEA help at https://www.jetbrains.com/help/idea/2016.2/configuring-ignored-files.html says
If the version control system that you are using has its own ignore facilities, use the corresponding native command provided by the version control integration.
Unfortunately the git plugin currently does not have specific commands to deal with .gitignore files.
There is a plugin that deals with that (though I never tried it myself):
https://plugins.jetbrains.com/plugin/7495
Interestingly, I have not found a feature request at IDEA's bug tracker (https://youtrack.jetbrains.com/). You may try to create a request there.

How to highlight the edited file using git in intellij?

Eclipse will highlight the files that I have made changes in git repository, but looks like intellij don't highlight that. Is there any preference that I can configure ?
Go to Settings -> Version Control then edit your project for setting git root. After that IDEA will show all changes in your files.

bazaar ignore file

what is the equivalent of the .hgignore mercurial file in bazaar
.bzrignore (at the top of the repository tree), or ~/.bazaar/ignore (for global ignores). Much more information is easily found on the Bazaar site/tutorial - e.g. http://doc.bazaar-vcs.org/bzr-0.9/tutorial.html.
If you are on Windows the global ignore file is in %appdata%\Bazzar\2.0\ignore

How do I export the Bazaar history of a subfolder

I'm coding a framework along with a project which uses this framework. The project is a Bazaar repository, with the framework in a subfolder below the project.
I want to give the framework a Bazaar repository of its own. How do I do it?
You use the split command:
bzr split sub_folder
This creates an independant tree in the subfolder, which you can now export and work on separately.
Use fast-import plugin (http://bazaar-vcs.org/BzrFastImport):
1) Export all your history to the stream:
bzr fast-export BRANCH > full-history.fi
2) Filter the history to produce new stream:
bzr fast-import-filter -i subfolder full-history.fi > subfolder.fi
3) Recreate new branch with subfolder only:
bzr init-repo .
bzr fast-import subfolder.fi
As far as I know, there is not a way to do this easily with bazaar. One possibility is to take the original project, branch it, and then remove everything unrelated to the framework. You can then move the files in the subdir to the main dir. It's quite a chore, but it is possible to preserve the history.
you will end up with something like:
branch project:
.. other files..
framework/a.file
framework/b.file
framework/c.file
branch framework:
a.file
b.file
c.file
As far as I know, "nested" branches are not support by Bazaar yet. Git supports "submodules", which behave similar to Subversion externals.
I have tried doing this with bzr split, however, this does not work how I expect.
The resulting branch still contains the history of all files from all original directories, and a full checkout retrieves all the files. It appears the only thing that split does is convert the repository to a rich root repository so that this particular tree can be of a certain subdirectory only, but the repository still contains all other directories and other checkouts can still retrieve the whole tree.
I used the method in jamuraa's answer above, and this was much better for me as I didn't have to mess with converting to a new repository type. It also meant that full checkouts/branching from that repository only recreated the files I wanted to.
However, it still had the downside that the repository stored the history of all those 'deleted' files, which meant that it took up more space than necessary (and could be a privacy issue if you don't want people to be able to see older revisions of those 'other' directories).
So, more advice on chopping a Bazaar branch down to only one of its subdirectories while permanently removing history of everything else would be appreciated.
Do a
bzr init .
bzr add .
bzr commit
in the framework directory.
Then you can branch and merge to just that directory.
The bazaar higher up will ignore that directory until you do a join.
Bazaar understands when you do things like
bzr branch . mycopy
bzr branch . myothercopy
The current directories .bzr won't track those subdirectories changes.
It saves you from trying to find a place to put a branch.