How to get list of all branch names in bzr server - bazaar

I have forgot the name of a branch of bzr, Is there any way to get the names of all branches on a bzr server
UPDATE: Forexample path to a branch on bzr server is:
bzr+ssh://bzr#192.168.7.171/~/branches/proj_name
Now I want to get all the names of projects present on the server
I promise 300 points bounty, once it is available on this question. Please help

With Bazaar Explorer, go to File > Open location and write down your repository.
bzr://MyServer/path/to/MyRepo/
Then you will see all branches in this repository.
EDIT.
As an example, just browse emacs project : bzr://bzr.savannah.gnu.org/emacs

Related

bzr could not complete pull, now files are missing

I bzr pulled from a repo. Some of the new files (related to a TeX documentation) in the repo apparently could not be placed in the corresponding local dir since there was some kind of lock. I had TeXStudio open, I am not sure if it locked a directory.
The pull operation reported an error (which I missed since the shell window was later closed).
Now the status of my local dirs is:
bzr pull shows the system is up to date.
$ bzr pull
Using saved parent location: XXXXX
No revisions or tags to pull.
The local dir is empty. There should be some files (I actually have them in the local dir in another computer).
I guess .bzr contains the required info.
Is there any way to fix the local copy?
You probably need to run:
bzr co
(without any arguments)
To create a working tree for the current branch.

Rename a repo in GitKraken?

I have been unable to find how to rename a local repo in GitKraken, or if this feature is unavailable.
I believe the option was available if you use the Init feature to generate the local and remote repos, but I'm wanting to update the repo name after it's already been set up and used.
(I set up my remote repo on BitBucket, then cloned my local repo in GitKraken, and it just uses the last folder name in the local path as the repo name.)
My recommendation would be to push everything you have to repo, then rename on the repository itself online, then re-clone from the new location as if it was a new repo.
This is the top result when searching for solutions to this issue.
In case anyone stumbles across this post, these days GitKraken has the ability (at least it does on macOS) to add aliases to existing repos which resolves this issue for me.
To add an alias, you first need to open the repo, then right-click the tab (in the tab bar at the top), and choose the "Alias repository" option. This will then allow you to define an alternative name for that particular repo.
A screenshot showing the open, tab context menu.
Happy aliasing! :)

Need a way to update two gitlab repositories through single intellij project window

I am working on a project which is hosted on a particular gitlab repository. Often we dont get to connect to this repository because of network issues. Hence I have created my own local gitlab repository.
Now to keep the both repositories updated, i have to copy paste the code from one folder linked to one repository to other folder which is linked to other repository.
Is there a way in intellij wherein i can work in the same window but when committing and pushing the changes, both the repositories get updated at the same time ?
Regards,
Thanks in advance
Personally, I think it is far, far easier to use Git from the terminal/powershell.
If you are interested in using the terminal, or powershell, with Git, and want set multiple remote origins, then there is a already a detailed answer about pushing and pulling from multiple remote locations.
Otherwise, look at Intellij's VCS menu, then select "Git."
Then select "remotes":
Then get add your other Git remotes by clicking "+" and add:
Add you should be set. Just select which remote you would like to push to.

Analogue of fetch for Mercurial? How to see a new branch from IntelliJ?

If a branch is created in the repository (Git or Mercurial), I still don't see it in the IntelliJIdea. If the CVS is Git, I have to issue fetch command for to see a new branches.
But for Mercurial I don't see neither fetch, nor something similar. How can I make that new branch visible for IntelliJ?
As I understand, you mean a branch created on a remote server.
It is not IntelliJ specific, you need to get information into your local repository first (this is what you actually do calling pull in Tortoise)
But you don't need to use Tortoise, you can pull from IDEA using VCS - Mercurial - Pull

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.