bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Added support for file list in single file update


From: Shigio YAMAGUCHI
Subject: Re: Added support for file list in single file update
Date: Wed, 25 Jun 2014 13:15:51 +0900


Hello,
> Hello,
>  I wanted to an ability to update existing tags based on incremental
> changes. My incremental changes are on a small bunch of files. Here is
> the workflow.
>
> 1. Create a p4 client (we use perforce with some cool snapshot based
> client creation at work)
> 2. I get a pre-built p4 client with gtags built
> 3. Edit files and update tags (gtags --single-update file.cpp). Invoke
> the command for each file that I have modified
> 4. Other developers have checked in their code over time
> 5. I create a new p4 client and import my changes into the new client
> 6. Again, I update my local tags
>
> When tags are pre-built during build between snapshots, I know the
> files that are added/modified/deleted. I wanted to improve the
> performance by not calling 'gtags' binary multiple times (once per
> file) for an update AND not use '-i' and let 'gtags' stat() all files
> to find if deleted.

Although I don't know 'perforce' and some terms like 'p4 client' and
'pre-built p4', it seems that your suggestion is changing 'single-update'
into 'multi-update'. If so, I agree with you.

> The following patch implements 2 features:
>
> - "GTAGSLOGICALPATH" for supporting logical path instead of realpath
> - treat the file given to --single-update as a single file or a file
> containing a list of files
> -- It supports optional prefixes in the file list '-' or '+' to avoid
> costly stat() over NAS (I work in storage and know the overheads of
> stat() to try avoiding it)
>
> Sample file list (4 lines):
> -path/to/deleted/file.cpp
> +path/to/new/file.cpp
> +path/to/modified/file.cpp
> path/to/a/file/and/let/stat/determine/if/present/or/missing.cpp

I'm hesitant to accept the prefixes (+, -), because wrong specification
of them corrupts the tag files.
How effective is this?

--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]