Duplicate Block eeschema - Page 1
Forum section: electronics / general

author: gilbenl
author_rank: Regular Contributor
timestamp: May 03, 2016, 12:33:05 am
content: While attempting to move a large section of a block out of a hierarchical sheet, I managed to duplicate the entire block. So, now I have two identical blocks on top of each other. Didn't notice until I exited and came back (so no undo). Any chance I'm not hosed on this one or am I about to go through and manually delete all the dupes?

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: May 03, 2016, 12:47:17 am
content: probably open up the schematic file in a text editor. you can probably see it appended.ps. Always use source control for Kicad. It will save you time and time again. Probably the same with other packages.

author: gilbenl
author_rank: Regular Contributor
timestamp: May 03, 2016, 12:10:27 pm
content: Quote from: HackedFridgeMagnet on May 03, 2016, 12:47:17 amHow does one use source control with Kicad? I've found it difficult to save iterative versions.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: May 03, 2016, 12:28:46 pm
content: The source control only interacts with the file system and although some also interact with the OS. It doesn't know anything about Kicad nor does Kicad know about the source control.It basically keeps a history of all files that you check in. A record is kept with each check in.If they are text files, such as all the Kicad project files then you can do comparisons between different versions and see what you stuffed up when you clicked the wrong button.I use SVN, with the Gui overlay Tortoise SVN, I use it on Windows.https://tortoisesvn.net/Many others use Git.

author: LHelge
author_rank: Contributor
timestamp: June 14, 2016, 01:46:37 pm
content: Mercurial also has a tortoise frontend, and works fine with Kicad. It's a little easier than SVN to maintain since each repo only is a folder on your filesystem. Easy to clone to your NAS for a backup or to a thumbdrive if you're on the go.Very similar to git, but much easier to start with.

author: SimonR
author_rank: Regular Contributor
timestamp: June 14, 2016, 07:00:55 pm
content: I can also vouch for SVN and Tortoise.I prefer the advantages of GIT but SVN and Tortoise is easier to set up. Especially if you are just one person because you can run it directly from a folder. You don't have to user a server and have the complication of setting a server up.If more than one person is going to use the same SVN repository it is dangerous not to use a server but if like me you are the only user then you can run out of a folder.If you want to give it a try to see if you like it I'll post some notes I wrote for a collegue to run it on a windows system.Basically you create a repository to store your projects in and then add you projects to it. Then you check out a copy of your project in to any folder you choose which becomes known as the "Working Directory".When its checked out it contains hidden files which keep track of the changes you make locally.From this point you just work on your project normally just as you always have. When you have made some changes you commit those changes back to the repository. With tortoise you right click on the "Working Directory" and click commit.Every time you click commit a new version is created in the repository.Thats it.At a later date you may want to look at an old version of your project and you can check out any version of the project that you commited and it will be exacltly as it was at the time you committed it. So any file that you may have deleted in the meantime will be restored etc.

author: SimonR
author_rank: Regular Contributor
timestamp: June 14, 2016, 07:02:22 pm
content: Notes on how to install SVN and Tortoise--------------------------------------------Create a new SVN Repository---------------------------1/ Install Tortoise you can find it herehttps://tortoisesvn.net/2/ create an empty folder where you want to store your repositoryeg. C:\Users\simon\Documents\SVNRepository3/ open the folder and right click and select TortoiseSVN/Create Repositry here4/ Click the button that says "Create Folder Structure"5/ When that completes Click the other button that says "StartReprobrowser"6/ A window will pop up showing a folder tree of what is in the repository. Nothing but the main folders'branches', 'tags' and 'trunk' at this stage7/ in the right hand box right click on trunk and click "Add Folder"8/ Navigate to the project you want to save in the repository and press button "Select Folder"9/ The Log Message box pops up so enter a message explaining why you added the folder and click OK, Or just click OKCheck out a project-------------------You have now created an SVN repositoryBefore you can use SVN to keep track of your project progress you need to check out the project.1/Create a new folder to work n, open it in explorer and right click in it.eg. C:\Users\simonr\Documents\Work\ProjectNameThis is known as your "working copy".2/ click on SVN Checkout and a checkout dialogue will pop up.3/ This is the least intuitive part of the process. we need to point Tortoise at the repository.In the URL of Repository box type the path of the folder that contains your newly created repository.But with file:// at the begininningeg. file://C:\Users\simonr\Documents\SVNRepositorydon't be tempted to clik the "..." button it won't help you yet.4/ In the other box "checkout Directory" put the path of the folder where you are going to workE.g C:\Users\simonr\Documents\Work\ProjectName5/ click OKYou now have a copy of your original project in the new folder.Only its slightly different.It has hidden files which keep track of your changes and all of the file icons now have a tick in a green circle on top of them.From now on when you change a file the green circle will turn red indicating a change.When you check a project back in the circle will go green again.Now you are ready to do some work.----------------------------------1/Open your project from the new folder and make some changes and save them as normal2/open explorer in the folder above your project and right click on it.3/ Select "SVN Commit..." and a commit dialogue pops upType a message explaining what you changed. Always a good idea because you will forget.4/ Click OK. A progress window will pop up showing the changes being written to the repository.SVN will automatically give the commit a version number which will be the last thing in the window.5/ click OK to complete.6/ make some more changes and commit again.7/ repeatNow you have some history you can do some cool things.List what changes you made in each version------------------------------------------1/ Right click on your project working directory2/ click "TortoiseSVN/show Log"3/ A log window will pop up showing every commit you made, what version number it is and the commit message telling you what you changed.if you right click on any line you get a menu giving you a whole load of things you can do including check out an old version.Check out an old version of the project---------------------------------------1/Open the SVN Log as in the above instructions2/ right click on the version of the project you want to check outin the checkout window point the checkout directory box to a folder where you want the code to go.click OKCreate a project Branch-----------------------This is where the real power of revision control comes in.You can creat a branch of a project so that you can test changes without affecting the main trunk.if you are woring on the branch (by checking out the branch) any changes you commit will only affect the branchThe main trunk will not be affected.At a lator date if you are happy with your changes you can merge them back into the main trunk.To create a branch1/Open the SVN Log as in the above instructions2/ right click on the version of the project you want create abranch from. Usually this is thetop item (or Head). ie the current code.3/In the branch window you will see that the new branch will be a folder in the branches folder named the same as you main project folder.4/ Enter a log message as always and click OKYou may want to alter the name of the branch before commiting. I usually append the reason for the branch to the name.eg. trunk/projectname becomes /branches/projectname_rewriteUartDriverclick OKWhen you click OK the branch is made in the repository and your current working copy remains to same.You may want this in which case you need to check out the branch seperately to work on it.Alternatively you coulf tick the "Switch working copy to new branch/tag" before clicking OK.This will change your working copy to the new branch after creating it

author: Kilrah
author_rank: Unknown
timestamp: June 14, 2016, 08:32:37 pm
content: Quote from: SimonR on June 14, 2016, 07:00:55 pmSame with git, I've got loads of local-only repos.

author: SimonR
author_rank: Regular Contributor
timestamp: June 14, 2016, 09:13:44 pm
content: Tortoise didn't support GIT when I used it, I gather it does now.Do you know if I can use Tortoise to create the repository the same way it can with SVN?I might give GIT another go if it does.

author: Kilrah
author_rank: Unknown
timestamp: July 03, 2016, 11:51:18 am
content: Yep.I much prefer Sourcetree for dealing with Git repos though.