Author Topic: Duplicate Block eeschema  (Read 3522 times)

0 Members and 1 Guest are viewing this topic.

Offline gilbenl

  • Regular Contributor
  • *
  • Posts: 170
  • Country: us
  • Country: us
Duplicate Block eeschema
« on: May 03, 2016, 12:33:05 am »
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?  |O
« Last Edit: May 03, 2016, 12:37:02 am by gilbenl »
What doesn't kill you, probably hurts a lot.
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 1937
  • Country: au
  • Country: au
Re: Duplicate Block eeschema
« Reply #1 on: May 03, 2016, 12:47:17 am »
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.

 
The following users thanked this post: gilbenl

Offline gilbenl

  • Regular Contributor
  • *
  • Posts: 170
  • Country: us
  • Country: us
Re: Duplicate Block eeschema
« Reply #2 on: May 03, 2016, 12:10:27 pm »
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.

How does one use source control with Kicad? I've found it difficult to save iterative versions.
What doesn't kill you, probably hurts a lot.
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 1937
  • Country: au
  • Country: au
Re: Duplicate Block eeschema
« Reply #3 on: May 03, 2016, 12:28:46 pm »
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.
 

Offline LHelge

  • Contributor
  • Posts: 21
  • Country: se
  • Country: se
    • My project blog
Re: Duplicate Block eeschema
« Reply #4 on: June 14, 2016, 01:46:37 pm »
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.
My Project Blog
http://www.lhelge.se
 

Offline SimonR

  • Regular Contributor
  • *
  • Posts: 108
  • Country: gb
  • Country: gb
Re: Duplicate Block eeschema
« Reply #5 on: June 14, 2016, 07:00:55 pm »
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.

 

Offline SimonR

  • Regular Contributor
  • *
  • Posts: 108
  • Country: gb
  • Country: gb
Re: Duplicate Block eeschema
« Reply #6 on: June 14, 2016, 07:02:22 pm »
Notes on how to install SVN and Tortoise
--------------------------------------------

Create a new SVN Repository
---------------------------
1/ Install Tortoise you can find it here https://tortoisesvn.net/
2/ create an empty folder where you want to store your repository
 eg. C:\Users\simon\Documents\SVNRepository
3/ open the folder and right click and select TortoiseSVN/Create Repositry here
4/ 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 stage
7/ 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 OK

Check out a project
-------------------
You have now created an SVN repository
Before 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\ProjectName
  This 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 begininning
eg. file://C:\Users\simonr\Documents\SVNRepository
don'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 work
E.g C:\Users\simonr\Documents\Work\ProjectName
5/ click OK

You 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 normal
2/open explorer in the folder above your project and right click on it.
3/ Select "SVN Commit..." and a commit dialogue pops up
    Type 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/ repeat

Now 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 directory
2/ 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 instructions
2/ right click on the version of the project you want to check out
in the checkout window point the checkout directory box to a folder where you want the code to go.
click OK

Create 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 branch
The 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 branch
1/Open the SVN Log as in the above instructions
2/ right click on the version of the project you want create abranch from. Usually this is the
top 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 OK
You 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_rewriteUartDriver
click OK

When 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




 

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1707
  • Country: ch
  • Country: ch
Re: Duplicate Block eeschema
« Reply #7 on: June 14, 2016, 08:32:37 pm »
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.
Same with git, I've got loads of local-only repos.
 

Offline SimonR

  • Regular Contributor
  • *
  • Posts: 108
  • Country: gb
  • Country: gb
Re: Duplicate Block eeschema
« Reply #8 on: June 14, 2016, 09:13:44 pm »
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.
 

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1707
  • Country: ch
  • Country: ch
Re: Duplicate Block eeschema
« Reply #9 on: July 03, 2016, 11:51:18 am »
Yep.

I much prefer Sourcetree for dealing with Git repos though.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf