0

I know about templates. I know this has been asked before (here and here). Please let me explain my situation in detail and hopefully you'll understand why I'm asking this question again.

I use an IDE (and language) called PowerBuilder. PowerBuilder (PB) stores source code and binary object code together in a PBL (pibble) file. A PBL can contain source code for multiple classes. Because of this, it's not really practical to keep the PBL under version control; it's each individual class that should be revisioned independently. However, since it's the PBL file itself that the IDE uses, and because of the presence of the object code within the PBL, these files need to be pushed out when a repository is cloned. I can go into more detail on this if requested.

The PB IDE provides hooks for the MSSCCAPI interface so that it can support source code control providers. It works great with Visual Source Safe 6! But there are no usable MSSCCAPI providers for Mercurial. (I've asked before.) Yes, I'm trying to get the people that create PB to support an updated API, but there's no telling how long that will take. The IDE does, however, offer its own, basic, SCC functions. It's not a "real" solution; it's more of a "this will get you by, you cheap b*****d, until you can buy a real SCC program" type of thing. It works, though, by exporting the source for each class into individual text files and creating a corresponding "status" file (PRP file) for each class. Text files? Those can be tracked by Mercurial! FYI, this basic, "get you by" SCC option doesn't keep history or handle merges.

Let me detail a little more about these PRP files. PB's built-in SCC solution is built around exclusive locks. Check-out, check-in, all that old stuff. It manages these check-outs and check-ins via the PRP files. It also knows what is and what isn't under revision control by the presence of the corresponding PRP file.

So first with the PRP files. I need to have these pushed out (and added for new classes) so that the IDE can see that the corresponding class should be tracked. If there's no PRP file, the IDE doesn't export the syntax and nothing can get tracked in Mercurial. But if I continue to track changes to the PRP files, then that means that I'm pushing out the exclusive locks on the classes as well, and nobody wants that. So I need to add the PRP files but not track any subsequent changes to them.

And I need the same for the binary PBL files. As mentioned before, I need them to exist so that the IDE knows what PBLs make up a code base, but the complexities of the object code, compilation, and class inter-dependencies mean that it's not feasible to recreate them on the fly. So I need the PBLs added to Mercurial, but I don't really want to track the changes to those PBLs. And though I might be able to get by with templates for the PRP files, I can't do that for these binary PBL files.

Hopefully, that explains my situation fully. I apologize that this question is so long, but I wanted to make sure that you had a clear understanding of what I was up against so that I didn't get a bunch of off-the-cuff "This is a duplicate of X" responses. Thank you for your patience and for any guidance you can offer.

Community
  • 1
  • 1
Jason 'Bug' Fenter
  • 1,616
  • 1
  • 16
  • 27
  • Is Mercurial final, not discussed choice or alternatives are possible? – Lazy Badger Nov 09 '12 at 21:03
  • > "there are no usable MSSCCAPI providers for Mercurial" - but what about old version, which [have](http://www.newsupaplex.pp.ru/files/hgscc.zip) this support? – Lazy Badger Nov 09 '12 at 21:13
  • @Lazy Badger, the files you posted cause PowerBuilder to crash. I suspect that it's the same provider that I tested and mentioned in the question I linked to in my third paragraph. It's why I said there was no *usable* provider. :( – Jason 'Bug' Fenter Nov 12 '12 at 15:49
  • Maybe clone the old HgSCC version and start debugging? When you asked before I took a look at what got ripped out and it didn't seem all that much, but as I recall it didn't look very easy to integrate it back in (e.g. in a fork that could pull new code for the HG side of interface). Fixing the old code base might not be too hard though. PBSCC Proxy does work so you could use it as a reference for the MSSCCAPI end of things. Another angle would be to hack up PBSCC Proxy to talk to HG. Apart from peaking in the SVN WC's data it runs the command line client. – Hugh Brackett Nov 15 '12 at 02:51
  • Hugh, in a way, I *am* hacking up the PBSCC proxy. Though I'm not modifying its libraries directly, I'm attempting to use its version database for a purpose other than it was originally intended (pushing its "database" into Hg". Forking the HgSCC source would definitely be an educational experience for me with a formidable learning curve. – Jason 'Bug' Fenter Nov 15 '12 at 15:58

2 Answers2

0

Even if I can't understand this

if I continue to track changes to the PRP files, then that means that I'm pushing out the exclusive locks on the classes as well, and nobody wants that. So I need to add the PRP files but not track any subsequent changes to them.

namely: "...nobody wants that..." and "...add the PRP files but not track any subsequent changes to them..." - if you don't version-contol changeable (and changed) sources I can't see reason to add outdated after fist change files to Mercurial

You can add, store and ignore later files in Mercurial. This answer play game nicely with small change: because you want .hgignore full working copy (really want?) you can use hg up -r N

Community
  • 1
  • 1
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • "... nobody wants that..." was a reference to the need for concurrent development. In my opinion (based on 14 years' experience), the software industry has outgrown exclusive code ownership and maintenance. Apparently, others agree, or no one would have developed concurrent code management systems like Mercurial and Git. I'll try out the answer you linked to and the tweaks you mention in .hgignore. Hopefully that will give me what I need. – Jason 'Bug' Fenter Nov 12 '12 at 15:58
0

Alternative solutions

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • SVN is for version control instead of revision control which some people (Joel Spolsky, http://hginit.com) believe make it difficult to use for branching, merging, and concurrent development. WizSource is also a create versioning system but does not support branching and merging at all, so it's unusable for concurrent development. I'm checking out the PushOk plug-in for Git which may be a tremendous help. Regardless of how much I appreciate it, my question wasn't about alternatives, so I can't mark this as having answered the question that was asked. – Jason 'Bug' Fenter Nov 12 '12 at 15:55