Author Topic: Batch tagging  (Read 6490 times)

jporkka

  • Senior Community Member
  • Posts: 140
  • Hero Points: 6
Batch tagging
« on: February 24, 2010, 03:15:43 PM »
I'm trying to setup a automated system to sync my projects from source control and retag.

I'm using
    workspace_open( ....
    _workspace_update_files_retag
    workspace_close

This tends to wipe out my *.vpwhist file though.

How can I preserve that file?

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Batch tagging
« Reply #1 on: February 24, 2010, 11:29:39 PM »
There is the 'vsmktags' tool, which is quite helpful for use cases like yours. Maybe you should give it try.
HS2

rdroaten

  • Community Member
  • Posts: 13
  • Hero Points: 0
Re: Batch tagging
« Reply #2 on: February 25, 2010, 01:53:57 PM »
I've been trying to do the same thing (auto/batch update of tagfiles).  Can vsmktags add new source files to a tagfile?

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Batch tagging
« Reply #3 on: February 25, 2010, 05:09:07 PM »
Quote
Can vsmktags add new source files to a tagfile?
Should work if your existing workspace::project(s) uses wildcards to specify the project files.
HS2

jporkka

  • Senior Community Member
  • Posts: 140
  • Hero Points: 6
Re: Batch tagging
« Reply #4 on: February 25, 2010, 06:10:01 PM »
Do wildcards really work?


hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Batch tagging
« Reply #5 on: February 25, 2010, 08:15:14 PM »
Well, I was just guessing b/c I would've done it like that ;)
But you're right - I should only post verified things.
Tested it with a small example workspace containing 1 *.cpp wildcard project containing the file 'cpp.cpp' (no subdirs).
1) run vsmktags -> listvtg (w/o invoking SE)
2) added a 2nd 'cpp2.cpp' file to the directory
3) run vsmktags -> listvtg (w/o invoking SE) again
Seems to work as expected,
HS2

jporkka

  • Senior Community Member
  • Posts: 140
  • Hero Points: 6
Re: Batch tagging
« Reply #6 on: February 25, 2010, 08:35:19 PM »
Confirmed.
But I also found that it only works if the project is in the directory with the source files.
So, I cannot have
   C:\Src\...
   C:\SlickProjectFiles\...
and get it to work.
No errors or anything, it just doesn't ever find anything.
 

evanratt

  • Senior Community Member
  • Posts: 300
  • Hero Points: 23
Re: Batch tagging
« Reply #7 on: February 25, 2010, 09:07:14 PM »
I use wildcards with the project in a completely separate directory. Then, I just need to "Refresh" the project to find and tag all newly added files, as well as retag modified files.

Make sure your project Working Directory is set to the directory with the source files? I think it uses that as the base for the wildcard search...

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Batch tagging
« Reply #8 on: February 25, 2010, 10:03:17 PM »
Unfortunately I'm not sure about the latest status, but it was required to keep the vpj in the topdir of the assoc. source tree. AFAIK b/c project working dir was/is used to build the file list relativ to this dir. vpw can be anywhere. Could be useful to specify different dir-prefixed wildcards (e.g. rel. to the project working dir)...
HS2
« Last Edit: February 25, 2010, 10:06:09 PM by hs2 »

evanratt

  • Senior Community Member
  • Posts: 300
  • Hero Points: 23
Re: Batch tagging
« Reply #9 on: February 25, 2010, 10:14:31 PM »
Nope, I have all my Slickedit project files in a completely separate directory, but on the same drive as my source tree. Then, for my wildcards, I specify the full path. So, my working directory is "\<project_name>\src", and my project files are:
"\<project_name>\src\*.cpp"
"\<project_name>\src\*.h"
etc.

Works a treat for me, in my setup, at least...

jporkka

  • Senior Community Member
  • Posts: 140
  • Hero Points: 6
Re: Batch tagging
« Reply #10 on: February 26, 2010, 06:11:13 PM »
Well, heck, this actually works  :)

What does "Apply custom view filters (flat file list) " mean ?

What is the downside of this?
Grrrr...this seems like the feature I've wanted for a long time - seems like it should make managing projects under source control a whole heck of a lot easier.

Wierd that the wildcard can only be a single pattern, making adding *.cpp,*.h, *.etc, tiresome.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Batch tagging
« Reply #11 on: March 13, 2010, 01:01:01 AM »
This may be useful.