element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Chat (English) embedding version control information in schematic and board
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 6 replies
  • Subscribers 174 subscribers
  • Views 566 views
  • Users 0 members are here
Related

embedding version control information in schematic and board

Former Member
Former Member over 12 years ago

hi all,

 

after I've finally upgraded to eagle 6, I'm now experimenting with

putting my eagle files under version control (subversion in my case).

 

One of subversions features is putting revision information into the

files by keyword expansion.

As eagle now uses XML formatted files this now works without problems.

 

Just put for instance "$URL:$" or "$Revision:$" into a text and

subversion will replace it with "$URL: ULP ulp-name ulp-parameters ..."

 

Both solution would solve my immediate needs.

 

 

What do you think?

--

 

Lorenz

 

  • Sign in to reply
  • Cancel
  • igalloway
    igalloway over 12 years ago

    If I understand you correctly, I would second this approach.

    I also think that in eagle a custom string for >SVN_VERSION would be helpful.

    Subversion can execute a post commit script automatically on commit. So it could keep the revision in a text file for Eagle to read.?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 12 years ago in reply to igalloway

    Iain Galloway wrote:

    If I understand you correctly, I would second this approach.

    I also think that in eagle a custom string for >SVN_VERSION would be

    helpful.

     

    the situation has been getting better in the meantime.

     

    subversion 1.8 (due in about 4 week) will have custom keyword

    expansion.

    With that it will be possible to get revision info without any

    overhead into eagle properties and texts.

     

    If anyone want's to play with it sooner, tortoisesvn nightlies (

    http://nightlybuilds.tortoisesvn.net/latest) already ship with the

    custom keyword capabilities.

     

     

    Subversion can execute a post commit script automatically on commit.

     

    Subversion itself only has server-side hooks (but you probably are

    talking about tortoisesvn and its client-side hook).

     

     

    So it could keep the revision in a text file for Eagle to read.?

     

    that would not help much. You still need a mechanism in eagle that

    could access that information without the eagle files getting

    modified.

    --

     

    Lorenz

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • dukepro
    dukepro over 12 years ago

    On 02/21/2013 10:44 AM, Lorenz wrote:

    ...

     

     

    Just put for instance "$URL:$" or "$Revision:$" into a text and

    subversion will replace it with "$URL: <path to file in repository> $"

    and "$Revision 12345 $"  every time the file is checked out, checked

    in or updated.

     

    Other change management systems could be covered with regular expression

    (RE) substitution.  The substitution could be included in an attribute's

    value as well as in a text value.

     

    As a global attribute, the goal is to set the attribute REVISION (for

    example) to a value of "12345", which is only known after the file is

    checked into the change management system.  The value of the attribute

    as saved could be something on the order of:

     

        "$Revision:$|/[0-9]+/"

     

    The first part, "$Revision:$" would expand to a real revision number

    such as "$Revision: 12345$" as supplied by the change management

    system.  Thus, when the file is loaded by Eagle, the value of the

    attribute would be

     

        "$Revision: 12345$|/[0-9]+/"

     

    The pipe symbol would cause Eagle to pipe that text into the RE enclosed

    in the slashes.  In this case, only one or more digits would be

    included, resulting in the value of "12345".  Thus the value displayed

    would be the result of the RE.

     

    This has been discussed in the past in the suggest news group and

    cleaner solutions have been proposed.  See the thread titled "/regular

    expression search & replace support for text variables/" in

    eagle.suggest.eng dated March 5th, 2013.  Recapping part of that

    discussion...

     

    Shamelessly stealing some built-in functions from GNU Make, a more

    generic form could be:

     

    $(subst

    from

    ,

    to

    ,

    text

    )

        Replace from with to in text.

     

    $(patsubst

    pattern

    ,

    replacement

    ,

    text

    )

        Replace words matching pattern with replacement in text.

     

    See

    http://www.gnu.org/software/make/manual/html_node/Quick-Reference.html#Quick-Reference

     

    Eagle would have to maintain the formula for the attribute's value.  As

    such, an additional formula property may need to be added to UL_TEXT

    and UL_ATTRIBUTE objects that would contain the as-saved value.  The

    value property would return the calculated value, just as it does now.

     

    Employing the above, the saved formula for the attribute or text would be:

     

        $(patsubst .\(+\).,\1,$Revision: 12345$)

     

    The change management system would replace the /text/ portion with

    appropriate values.

     

    While I mention only a REVISION attribute, other attributes could be

    defined with their own formulas such as path in the repository, last

    check-in time stamp, or author.

     

    Jorge,  Does Cadsoft have any input on this?

     

        - Chuck

     

     

    Attachments:
    0250.att1.html.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 12 years ago in reply to dukepro

    On 6/11/2013 11:12 AM, Chuck Huber wrote:

     

     

    Jorge,  Does Cadsoft have any input on this?

     

    I'm not very familiar with subversion to be honest, I generally use

    Bazaar and then maybe only one percent of it's functionality. On top

    of that I can speak on behalf of the developers.

     

    But from what I can tell an easy solution would be two use two

    attributes and a ULP. The idea would be that you would use one

    Attribute in the manner described, with the additional text. You would

    then use a ULP to read that string in EAGLE strip the extra characters

    (through an RE or simple string methods) and write that to the second

    attribute which is the one that would be displayed on the layout.

     

    This would look correct and use the functionality available in

    subversion without changing EAGLE. The downside is that you have an

    extraneous attribute.

     

    I will ask the devs to take a look at this thread and post their

    comments.

     

    hth,

    Jorge Garcia

         - Chuck

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • CSWalt
    CSWalt over 12 years ago in reply to dukepro

    Hi Chuck,

     

    some comments:

    The principal improvement in V6 wrt this was the change to XML that allows you to use

    any versioning system for tracking differences. We also avoid unnecessary changes

    to XML to keep it "diff friendly".

    To get in version info as described, my idea would be to use global attribute "SVN_VERSION" e.g.

    Couldn't you run a small "before-checkin-script" that adapts or increments the value of SVN_VERSION

    in the XML file accordingly ? This could run automatically together with checkin (using an alias

    e.g.).

     

    Adding a mechanism for direct versioning would require something like suggested by you and others.

    The texts or attributes need to deal with regular expressions.

    Another similar idea might be to teach maths to texts/attributes. Say MATH1 with value "=", similar to Excel. That's actually not the direction we think EAGLE should go.

    These are things where other tools are much better than we, we better focus on our core competence

    of PCB design.

    I'm not saying we don't do this in any case, but it's something considered with low prio.

     

    Regards,

    Walter Spermann

     

    On 06/11/13 17:12, Chuck Huber wrote:

     

    On 02/21/2013 10:44 AM, Lorenz wrote:

    ...

     

     

    Just put for instance "$URL:$" or "$Revision:$" into a text and

    subversion will replace it with "$URL: <path to file in repository> $"

    and "$Revision 12345 $"  every time the file is checked out, checked

    in or updated.

     

    Other change management systems could be covered with regular expression

    (RE) substitution.  The substitution could be included in an attribute's

    value as well as in a text value.

     

    As a global attribute, the goal is to set the attribute REVISION (for

    example) to a value of "12345", which is only known after the file is

    checked into the change management system.  The value of the attribute

    as saved could be something on the order of:

     

        "$Revision:$|/[0-9]+/"

     

    The first part, "$Revision:$" would expand to a real revision number

    such as "$Revision: 12345$" as supplied by the change management

    system.  Thus, when the file is loaded by Eagle, the value of the

    attribute would be

     

        "$Revision: 12345$|/[0-9]+/"

     

    The pipe symbol would cause Eagle to pipe that text into the RE enclosed

    in the slashes.  In this case, only one or more digits would be

    included, resulting in the value of "12345".  Thus the value displayed

    would be the result of the RE.

     

    This has been discussed in the past in the suggest news group and

    cleaner solutions have been proposed.  See the thread titled "/regular

    expression search & replace support for text variables/" in

    eagle.suggest.eng dated March 5th, 2013.  Recapping part of that

    discussion...

     

    Shamelessly stealing some built-in functions from GNU Make, a more

    generic form could be:

     

    |$(subst |from|,|to|,|text|)|

        Replace from with to in text.

     

    |$(patsubst |pattern|,|replacement|,|text|)|

        Replace words matching pattern with replacement in text.

     

    See

    http://www.gnu.org/software/make/manual/html_node/Quick-Reference.html#Quick-Reference

     

    Eagle would have to maintain the formula for the attribute's value.  As

    such, an additional formula property may need to be added to UL_TEXT

    and UL_ATTRIBUTE objects that would contain the as-saved value.  The

    value property would return the calculated value, just as it does now.

     

    Employing the above, the saved formula for the attribute or text would be:

     

        $(patsubst .\(+\).,\1,$Revision: 12345$)

     

    The change management system would replace the /text/ portion with

    appropriate values.

     

    While I mention only a REVISION attribute, other attributes could be

    defined with their own formulas such as path in the repository, last

    check-in time stamp, or author.

     

    Jorge,  Does Cadsoft have any input on this?

     

        - Chuck

     

     

     

    --

    -


    Walter Spermann

    Softwareentwicklung

    CadSoft Computer GmbH

    Pleidolfweg 15

    84568 Pleiskirchen

    Tel.: 08635/6989-10

    www.cadsoft.de

    -


    Registergericht: Amtsgericht Traunstein HRB 5573

    Geschäftsführer: Thomas Liratsch

    -


     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 12 years ago in reply to autodeskguest

    Jorge Garcia wrote:

    On 6/11/2013 11:12 AM, Chuck Huber wrote:

    Jorge,  Does Cadsoft have any input on this?

     

    I'm not very familiar with subversion to be honest, I generally use

    Bazaar and then maybe only one percent of it's functionality. On top

    of that I can speak on behalf of the developers.

     

    But from what I can tell an easy solution would be two use two

    attributes and a ULP. The idea would be that you would use one

    Attribute in the manner described, with the additional text. You would

    then use a ULP to read that string in EAGLE strip the extra characters

    (through an RE or simple string methods) and write that to the second

    attribute which is the one that would be displayed on the layout.

     

    This would look correct and use the functionality available in

    subversion without changing EAGLE. The downside is that you have an

    extraneous attribute.

     

    The ULP solutuion has at least two disadvantages:

     

    1) By running the ULP the file is changed, so that the version control

    system (VC, not necessarily subversion) sees and flags it as changed.

     

    2) you need to run the ULP to get the desired result. You can't just

    check-out the file and be done.

     

     

     

    For subversion at least there will be a solution as soon as V1.8.x is

    released (see:  "howto get 'clean' subversion revision info into

    global eagle properties" from 2013-06-11 in this news group).

    --

     

    Lorenz

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube