COIN-OR::LEMON - Graph Library

Opened 15 years ago

Closed 15 years ago

#166 closed enhancement (fixed)

Safer migration script

Reported by: Peter Kovacs Owned by: Peter Kovacs
Priority: major Milestone: LEMON 1.1 release
Component: core Version: hg main
Keywords: Cc:
Revision id:

Description

Maybe we should have a safer migration script (rename script).

The current one in [560e4b6d020d] replaces all occurrences of graph, edge etc. whether it is a whole word or not. Thus it replaces graphic by digraphic, wedge by warc etc. It is not a huge problem for us, but since this script became a tool for users too, I prefer to make it (at least a little bit) safer.

Attachments (4)

76af530ed2fe.patch (4.0 KB) - added by Peter Kovacs 15 years ago.
956a29f30887.patch (4.0 KB) - added by Peter Kovacs 15 years ago.
migr1_74ed2aeefc5d.patch (1.9 KB) - added by Peter Kovacs 15 years ago.
migr2_236b1902e5cc.patch (2.1 KB) - added by Peter Kovacs 15 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 15 years ago by Peter Kovacs

Type: defectenhancement

Changed 15 years ago by Peter Kovacs

Attachment: 76af530ed2fe.patch added

comment:2 Changed 15 years ago by Peter Kovacs

Owner: changed from Alpar Juttner to Peter Kovacs
Status: newassigned

[76af530ed2fe] makes the script safer and also improves the migration guide.

E.g. applying the new script to the following lines

graph graphs graphss graphic graphgraph
ListGraph Listgraph GraphReader Graphreader
edge edges edgess wedge edgeedge
addEdge addedge EdgeMap Edgemap

the result is

digraph digraphs graphss graphic graphgraph
ListDigraph Listgraph DigraphReader Graphreader
arc arcs edgess wedge edgeedge
addArc addedge ArcMap Edgemap

Changed 15 years ago by Peter Kovacs

Attachment: 956a29f30887.patch added

comment:3 Changed 15 years ago by Peter Kovacs

[956a29f30887] contains a slightly improved variant of [76af530ed2fe].

comment:4 Changed 15 years ago by Peter Kovacs

Resolution: fixed
Status: assignedclosed

[956a29f30887] went to the main branch.

comment:5 Changed 15 years ago by Peter Kovacs

Resolution: fixed
Status: closedreopened

[74ed2aeefc5d] contains more improvements to the script to handle "(U)GRAPH_TYPEDEFS" and "directed graph/edge" patterns.

[236b1902e5cc] is an extended variant of [74ed2aeefc5d], in which (U)GRAPH_TYPEDEFS(typename ...) is renamed to TEMPLATE_(DI)GRAPH_TYPEDEFS(...).

Which one is better? Should we make such "smart" replacements to get better/nicer 1.x codes, or we should make only simple renamings?

Changed 15 years ago by Peter Kovacs

Attachment: migr1_74ed2aeefc5d.patch added

Changed 15 years ago by Peter Kovacs

Attachment: migr2_236b1902e5cc.patch added

comment:6 in reply to:  5 Changed 15 years ago by Alpar Juttner

Resolution: fixed
Status: reopenedclosed

Replying to kpeter:

Which one is better?

The better one is now in the main.

Note: See TracTickets for help on using tickets.