Check out files with TortoiseSVN from multiple repositories - version-control

I am trying to check out multiple items from two repositories. One checkout goes to the root folder, and another would be checked out to a subdirectory.
Structure:
root
source
invoice.p
compiled
invoice.r
forms
templates
invoice01.xml
invoice01.png
I right-click on the root folder and click "SVN Checkout...". I'm checking out the invoice.p and invoice.r files (specifically) with the same structure from the first repository. The checkout type defaults to "Custom Depths" and everything goes fine. The source and compiled folders show up with the check icon. Then I'm trying to get the invoice files from the second repository, but I am not sure how to check them out. I can right-click on the forms folder in my checkout directory, but no matter how I set it up, it always pulls down the wrong structure, for example:
forms
templates
forms
templates
invoice01.xml
invoice01.png
If I try to select the root folder to check out from the second repository, the original source and compiled folders get overwritten/deleted since they don't exist in the second repo. I can choose invoice01.xml and invoice01.png to go to the templates folder one at a time, but for some projects I may have 30-40 items I'd need to individually check out. Is there an easier way to check out multiple items but to ignore the folder structure?

You can't nest working copies (which is what you're attempting to do here). The lone exception is if your inner working copy is created via an svn:external pointing elsewhere.
If you create an svn:external in the repository directory root is pointing at, call it forms and point it at the URL for the forms repository, you can do what you're attempting. Otherwise, it's not possible.

To answer your query, in case the files are in the same root location like:
-forms
-templates
- invoice01.xml
- invoice01.png
They shall be checked out with the Tortoise SVN URL Repository paths separated by * (asterisk symbol) like:
forms/templates/invoice01.xml*forms/templates/invoice01.png
Thus, in one go only, these files inside the root folder would be checked out even if the actual folder of templates had other files.
In case of a different root location, different folders have to be created and checked out. No other way!

Related

Shopify Github error "Branch isn't a valid name"

I am trying to connect my partner's Shopify account to my github (I am using hydrogen).
I see my branches, but I get a "Branch isn't a valid name" error when I try to connect.
The repository is empty and I am wondering what I'm doing wrong.
Screen capture attached.
It could be because:
Shopify does access your bananasofa/hydrogen repository
but its content does not represent a valid theme
You can see it discussed here, with comments like:
Check if you have your config folder.
If it's missing Shopify will take this as invalid.
At the very least, it needs a config.yml
In case anyone else has the same issue..
Important: the repo can't be empty, you need to have at least the basic folder structure set up in the repo. Add the basic files as well (theme.liquid, etc), even if they're empty for now.
Your theme folders must be in the root of the branch you're working on, for example, if we look at Dawn's repo we can see that the main theme folders are in the root of the 'main' branch and are not contained within a parent folder:
example folder structure
If you'd like to structure your project in such a way that your theme files are in a folder within the root, you'd need to setup some github workflows that will extract the main theme folders out of the parent folder and push that into a separate branch each time you merge into your main branch - you'd then use the separate branch when linking via GH.
So the simple solution is to just take your theme folders out of any parent folder they might be in and place them in the root of your project instead, after doing so you should not see the error any longer when trying to link your theme via GitHub.

EGit working directory not under the local repository

The working directory should be visible on a WebDAV server and none of the parent folders should contain the repository itself.
I want to separate totally the folder for .git and the working directory (on a different drive, clean from project files and others).
Using Eclipse EGIT, the repository creation allows set of working directory (Target Location) within a path within the repository.
No way found to set GIT_DIR or working_directory within Eclipse. Linking not an option (Windows)
The project .location contains the place within the repository (and that is a binary file anyway), so that should be configurable.
Is there any way to move the working directory to a totally different place?
Is there a configuration option I have missed?
After editing the files, do I really have to push all to the server, then commit to git?
To summarize what has been written in the comments, EGit does not support Git repositories whose work directory is at a different location than the .git directory. I.e. the core.worktree configuration setting is not taken into account.
See also this open enhancement request: https://bugs.eclipse.org/bugs/show_bug.cgi?id=433451

Eclipse Team Synchronizing View: How to remove unversioned items in outgoing changes?

While viewing the outgoing changes in Eclipse Team Synchronization(Subclipse), I am able to see the unversioned files also, like the generated class files, build folders, etc, which I do not want to see in this view. I dont want to add it to svn:ignore, since I have to do it manually for all the additional folders generated.
Is there any setting to change this to show only versioned files in this mode always?
Tortoise SVN client shows this option while committing, to show only versioned files. I am looking for such an option in Subclipse Team Synchronization view. Thanks in advance.
eclipse_outgoing_view
You should svn:ignore build folders.
Otherwise it's only a question of time until you or your colleague checks in the build folder
You should use svn:ignore, and note that once you do for a folder, all child folders are automatically ignored. In your example, if the build folder were ignored then everything inside it would automatically be ignored. It looks like your build folder has already been added to repository though, so maybe you can ignore the dist folder inside bin.

How can I add a directory tree to my github repo?

I've been working on a project that's fairly far a long now and I decided it's time to use some sort of version control etc. I decided to go with github. Before I get in too deep let me state explicitly that I am new to github.
My project resides in a directory that contains myriad subdirectories and files of all different kinds. I'd like to take my project directory as is (structure and all) and put it in my github repo.
I followed the tutorials on github's webpage, created the repo, and manually added some files. Obviously I don't want to manually add every file (there are several hundred). I'd like to know how I can add the root directory or for that matter any parent directory and all files/folders in said said directory. In other words I'm looking for a recursive add.
I read on this SO page (How to create folder in github repository?) that you can just use
git add directory/
That works fine for me when I'm dealing with the lowest level directory, but when I try the same command on a directory with subdirectories my terminal just sits there and I have to ctrl-c. I can't tell if it's just taking a long time (as I mentioned there are lots of files) or if this is just the wrong way to add a directory with subdirectories.
Apologies in advance if this is a super ignorant question -- I have looked at a lot of blogs/posts/etc and I cannot find a solution that seems to work.
Use the Current Working Directory
Assuming you're on Linux or OS X, from the command line you would do the following:
git add .
from the root of your repository tree. That will add all non-ignored files, including non-empty directories, into the repository.
From the root directory (the one with all the subdirectories), use git add -A.
If you have a ton of subdirectories and files, it may take a long while, so just let it sit there until it's done.

Where to put .hgignore?

I'm wondering where to put .hgignore file; in the main repository or each programmer should have it on his cloned copy?
Please clarify. Thanks.
You should put the file at the root of your repository.
See :
https://www.selenic.com/mercurial/hgignore.5.html
https://www.mercurial-scm.org/wiki/.hgignore
It says:
These files can be ignored by listing them in a .hgignore file in the root of the working directory. The .hgignore file must be created manually. It is typically put under version control, so that the settings will propagate to other repositories with push and pull.
Also another advantage is that, you might be working on multiple projects. Each having it's own set of pattern of files to ignore. For example, working on a Visual Studio project or a simple C++ project or a Python project. This ensures that patterns to ignore are relevant to the project.
How ever, you may not want to replicate these patterns in every ignore files. In such a case Mercurial configuration file can reference a set of per-user or global ignore files.
Example for global ignore files
in ~/.hgrc1:
[ui]
ignore = ~/.hgignore
in ~/.hgignore:
syntax: glob
*.tex
*.R
1 On Windows: %USERPROFILE%\mercurial.ini, ~ refers to %USERPROFILE% on Windows.
I've never seen it anywhere but the main repository.
How are you going to ignore the .hgignore without an .hgignore file in the repositry to ignore it ;P
Seriously.. it should probably be in the repository, since the files to be ignored are respositry-specific; a user can of course specify their own ignores additionally in a file specified in their .hgrc
you can have a global one inside your ~/.hgrc directory or a project specific one inside
the project's root directory
It belongs in the top folder of the repository. It is not meant for personal ignores but for project-wide ignores (i.e. applying for everyone). However, usually developers will add e.g. their faviourite editor's temp. files to that file - doesn't hurt anyone.
If you want to ignore something others probably do NOT want to ignore, put it in your personal ignore in ~/.hgrc.