SVN: Way to determine revision by comparing file or file content

前端 未结 2 1006
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-24 04:35

I have a scenario where I have a file and I need to know what revision in source this file is.

I may have hundreds of revisions on a particular file and have a file that

2条回答
  •  臣服心动
    2021-01-24 05:15

    If you have to use any content outside VCS and identify corresponding resisions and don't add this data to file (text file) or repository (binaries) - it's your fail (Git-boys must suffer and be excruciated, because they haven't keywords directly /but have smudge|clean filters/ and revision properties /?/, but in SVN you have these possibilities). Re-think about your workflow and start using Power!

    In your current state (no keywords, no metadata) you can (for each file)

    • calculate any available hash for unversioned file
    • calculate the same hash for this file for all revisions in question in repo
    • compare hashes and find a match(es)

提交回复
热议问题