English 中文(简体)
PVCS to SVN migration - How to written PVCS Labels to SVNlog Msg
原标题:PVCS to SVN migration - How to write PVCS Labels to SVN Log Msg
  • 时间:2011-03-18 00:14:06
  •  标签:
  • svn
  • pvcs

我们正在从PVCS转向颠覆。 我已经改造了PVCS出口 =>SVN的进口,对我们来说,这项工作非常出色,但我们有一个问题。

我们广泛使用聚氯乙烯标签,这些标签使我们与我们的工作要求号码有着明确和一致的联系。 当我们迁移到特别安全局时,这些标签就变成了标签(这些标签本身是罚款)。 具体做法是将联合执行监督委员会的问题编号写入特别志愿人员国家标志。

到目前为止,在SVN进口时间,我阅读了每个SVN的标识信息,在我发现一份工作申请编号时,我向SVN的标识电文(在SVN使用邮政邮递)。 然而,将W.R.写进PVCS的做法是选择性的,而PVCS标签的使用是强制性的。 因此,许多版本在标识中没有W.R.号,只是在PVCS标签上(或当它成为SVN Tag)。

在SVN进口期间,我是否找到了PVCS版本的标签? 我可以把他们放在PVCS出口的垃圾堆放档案中,在那里他们成为Node-path的一部分。

或者,还有一份报告或问询,我可以提出每个政党修订名单?

Regards Karl

最佳回答

最后,我这样说。 如果任何其他人都存在同样的问题,我发现有可能找到一份使用所有标签的名单。

svn ls <repo URL including tags location>

之后,这些标签使用这些标签。

svn info ...

而AWK则使用以下方法生产SVN INFO。 请注意,我不得不将版本数目减到1,以使我感兴趣的实际版本。 我认为,这是因为在进口时,特别志愿人员在制作该版本后向标签的翻版,这被视为版本。

BEGIN { RS="";
    FS = "
"; }
/^Path:/ { n1 = split($1,path,":");
           n3 = split($6,nodeKind, ":");
           n2 = split($9,lastRev,":");
           theRev = lastRev[2] -1;
printf("%8s %10s, %-75s
", theRev, nodeKind[2], path[2]); }

WRKEYFILE and PTKEYFILE are just .csv lookup files to match against with a format of

PT_TICKET,PKEY,Issue Title

然后,我写了以下文字......

REPO=svn://vuwunicocsagfg1/Banner/tags
REPOPATH=/var/subversion/Banner
WRKEYFILE=workReq_pKey.unix
PTKEYFILE=ptTicket_pKey.unix

# working variables
TEMPFILE=$$.tmp
TAGLIST=$$.tags
REVISIONS=$$.revisions
SVNINFO=$$.info
SVNLOOK=/usr/bin/svnlook


# look up details in Subversion
svn info -R $REPO | awk -f new_svn_report.awk > $SVNINFO
svn ls $REPO > $TAGLIST

cat $TAGLIST | awk  { print $1}  | while read LINE
do

   JIRAISSUE=""
   WRNUM=""
   PTNUM=""
   UWRNUM=""
   UPTNUM=""

   # Find Work Request or Perfect Tracker number
   WRNUM=$(echo "$LINE" | sed -n -e "s:.*([wW][rR][0-9# -][0-9]+).*:1:p")
   PTNUM=$(echo "$LINE" | sed -n -e "s:.*([pP][tT][0-9# -][0-9]+).*:1:p")

   # upper case the strings found and remove unwanted chars
   UWRNUM=`echo $WRNUM| tr  a-z   A-Z  | tr --delete  # - `
   UPTNUM=`echo $PTNUM| tr  a-z   A-Z  | tr --delete  # - `
   # Debug
   # echo "=============================="
   # echo "Line is: $LINE,  WRNUM is: $WRNUM, PTNUM is: $PTNUM"

   if [[ -n "$UWRNUM" ]]
   then

      # Find the JIRA issue number
      awk -F ,   / "$UWRNUM" / {print $2}  $WRKEYFILE | awk  {if (NR==1) {print $0}}   > $TEMPFILE
      JIRAISSUE=`cat $TEMPFILE`

      awk -F ,   / "$UWRNUM" / {print $2,"; " $3}  $WRKEYFILE | tr  "   _  | awk  {if (NR==1) {print $0}}  > $TEMPFILE
      NEWLOG=`cat $TEMPFILE`

      # all revisions in this Tag which are not directories
      grep $UWRNUM $SVNINFO | grep -v "directory" > $REVISIONS
   fi

   if [[ -n "$UPTNUM" ]]
   then
      # Find the JIRA issue number
      awk -F ,   / "$UPTNUM" / {print $2}  $PTKEYFILE | awk  {if (NR==1) {print $0}}   > $TEMPFILE
      JIRAISSUE=`cat $TEMPFILE`

      awk -F ,   / "$UPTNUM" / {print $2,"; " $3}  $PTKEYFILE | tr  "   _  | awk  {if (NR==1) {print $0}}  > $TEMPFILE
      NEWLOG=`cat $TEMPFILE`

      # all revisions in this Tag which are not directories
      grep $UPTNUM $SVNINFO | grep -v "directory" > $REVISIONS
   fi

   if [[ -n "$JIRAISSUE"  ]]
   then
      cat $REVISIONS | awk  { print $1}  | while read REVLINE
      do

         $SVNLOOK log -r "$REVLINE" "$REPOPATH" | tr  "   _  > $TEMPFILE
         OLDLOG=`cat $TEMPFILE `

         if `echo $OLDLOG | grep "$JIRAISSUE" 1>/dev/null 2>&1`
         then
            LOGMSG=$OLDLOG
         else
            LOGMSG="$OLDLOG  $NEWLOG"
         fi
        # Debug
         # echo "Jira issue is: $JIRAISSUE"
         # echo "update the log message for Revision $REVLINE"
         # echo "New log message is: $LOGMSG"
         # echo "***********************************"

         echo "svn propset --revprop -r "$REVLINE" svn:log ""$LOGMSG"" $REPO"
         svn propset --revprop -r "$REVLINE" svn:log ""$LOGMSG"" $REPO
         echo ""

       done
   fi
done
问题回答

暂无回答




相关问题
Best practices for Subversion and Visual Studio projects

I ve recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that s built from a cobbling-together ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

ASP.NET MVC: How should it work with subversion?

So, I have an asp.net mvc app that is being worked on by multiple developers in differing capacities. This is our first time working on a mvc app and my first time working with .NET. Our app does not ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...

热门标签