← Back to team overview

kicad-developers team mailing list archive

Re: Re: eeschema: how to handle component references

 

Hi Tim,

This sound exciting.

Have you read about the svn "switch" command? It is a way to dovetail into a common working directory, files from different places in the repository. Subsequent commits and updates then work magically. Commits will put those files that are mapped from a branches repository directory there, and will put those files which are mapped from a trunk directory there.

To learn how the repository is structured, do this:

svn list https://kicad.svn.sourceforge.net/svnroot/kicad

Your statement about 'trunk' is incorrect as I understood it.

We have been speaking of 'branch', but as you will see by running the above command, it is actually the 'branches' subdirectory of the repository.

The "svn list" command lets you traverse deeper into the repository as well, just by extending the path.

If you were to figure this out by consulting the SVN book and the switch command, and put your changes into a branches directory, you could then publish a shell script which would use the svn switch command to map *pieces* of someone's working directory to your new branches repository subdirectory and get your files instead. Then presumably it would be easy to reverse this back to all trunk. Once you have some users banging on it we can then merge your stuff into trunk. Again, check the subversion book and the switch command, and search this list for subversion switch also.

The one thing I don't really like about our repository structure is that all the help documentation and part libraries are in the trunk. So on initial checkout a pure programmer gets tons of files that are not source code. We should think of other options, maybe we have the best one now, I don't know. I mention this so that as you commit to branches, that you are careful to not somehow duplicate all the help files and part library files into the branch.

Hopefully you will not crush under the weight of subversion, and it will make this fairly easy for you. Thanks for all your efforts.

Dick


Hi Everybody,

I'm about ready to commit the 'branch' which allows for proper
handling of multiple instances of sub-sheets and sub-sub sheets in any
type of hierarchy you like (so long as it is not circular), including
proper (so far as I can test) netlist and BOM and erc creation.
Component references are also handled in a flat way, with different
refs on different instances of the same sheet (as the hierarchy will
be compiled down to a nice flat board:). These are stored in the
schematic file in a way that is backwards compatible with old
schematics, but for the following changes:
* GLabels are proper global labels, and connect all sheets in a
hierarchy. They are still called Glabel in the schematic file, so if
you (like me) meant 'Hierarchal label' when you inserted a glabel in a
past version of eeschema, you'll have to go back to the .sch file and
change 'Glabel' to 'Hlabel' (= hierarchal label). (I still have not
made a new icon for hierarchal label on the right toolbar..)
* you will have to re-annotate, but only if you use a hierarchy, so as
to fill out the hash which converts path to reference.
* all sub-sheets in a given schematic file *must* have different names
(SheetLabel in the C++ struct), as the SheetLabel is used to generate
comprehensible netlists.

Internally, frame->m_CurrentScreen has been replaced with
frame->m_CurrentSheet, which is an class which stores an array of
DrawSheetStructs. This array is a class whose Path() routine returns
a 'path' corresponding to the timestamps of the DrawSheetStructs (or a
human-readable path, in the case of PathHumanReadable() ) The path is
used as a 'key' to the reference hash. Dont' use m_CurrentScreen
(it's null!), use GetScreen(). I made GetScreen virtual because some
of eeschema's dialogs keep around a WinEDA_BaseFrame (or something)
pointer, whose GetScreen() method improperly returns m_CurrentScreen.
nothing complex... but better to say than not to.

Cross-probing on PCBnew seems to work; only one change was required
(an int to wxString for the sheet 'path'). cvpcb (which I normally
don't use?) did not have to be changed at all, as it already handles
the unique IDs or timestamps as wxStrings.

svn status | egrep "^C" returns nothing on my ~/kicad, I can make
clean and make with no warnings (on linux)... I would be happy to make
a branch somehow (as Dick requested), but this might be hard since we
have no 'trunk' directory; I guess what would make me happier would be
to submit the changes and get everyone's immediate feedback. I'll be
running eeschema in gdb for the next few weeks just in case ;) I
certainly would not be happy if all my diligent work will only be used
by me!

thanks,
Tim


On Jan 24, 2008 8:49 AM, Dick H. <dick@...> wrote:





--- In kicad-devel@xxxxxxxxxxxxxxx, "Tim Hanson" <tim@...> wrote:
>
> Hi Dick,
>
:
:
> I'll just keep modifying my branch until there
> is overbearing reason to use it (like import gEDA files..)

Recently I have been working on a bridge (specctra import/export).

Building bridges, I have come to realize recently, is
a great value proposition. All the value on the other
side of the bridge comes to you, merely for the cost of
building the bridge.

The gEDA import is interesting. Four paths come to mind:

File type____________convert__________import__
----------------------------------------------------------
eeschema symbols 1 2
pcbnew footprints 3 4

We could pursue either batch converters, or we could pursue
an abstract import API which would allow Kicad to use the gEDA
libraries directly, with "on the fly conversion", as
the file is read in.

Of course, I'd prefer 2 and 4 in the above matrix, and I want them
done tomorrow. :)

Boy, that felt good. (I'm usually on the other end of that type of
interchange.)

Dick






Yahoo! Groups Links







--
Best Regards,

Dick


I pray we can elect a U.S. President that has the common sense to enforce our
existing immigration laws and stop the invasion from Mexico.







References