3

Is there any command to update my workspace forcedly in Accurev, directly replace the local files with the backed files, and don't care about the conflict files, modified files and so on?

I really miss the cvs command cvs update -C -d

Jeff Fang
  • 269
  • 2
  • 5
  • 14

5 Answers5

7

According to question, I have similar issues. Usually I just use following commands:

accurev update -9
accurev pop -O -R .
accurev update
  • 2
    -O flag on populate forces redownload of all files, despite changed status or not. This is a performance disaster on very large repositories. – Eric Sep 16 '13 at 18:43
3

No, you will need to run a few operations. You can create a script to force update your workspace.

Basically, you will generate a list of all the modified, kept, overlap, member files, then purge those files, then update your workspace.

Check out the stat section in the CLI manual.

jstanley
  • 2,087
  • 15
  • 22
  • 1
    Thank you for you answer! I really surprise there is no such a command in AccuRev. – Jeff Fang May 07 '13 at 02:20
  • "Then purge those files?" You're omitting some important steps.; AccRev doesn't have a purge command. – Andrew Koper Oct 02 '14 at 21:14
  • Accurev doesn't have a purge command? http://www.accurev.com/download/ac_current_release/AccuRev_WebHelp/wwhelp/wwhimpl/js/html/wwhelp.htm#href=AccuRev_User_CLI/cli_ref_purge.html – steve Oct 31 '14 at 14:02
1

What You can do is delete all the local files from the file system and then do a:

accurev pop -R <path to local workspace directory>
gnuchu
  • 1,496
  • 13
  • 21
  • That is just going to delete all your files in the workspace. Its not updating your workspace. – jstanley May 09 '13 at 15:30
  • Also, if you have any kept files and you delete them, when you populate those files again, they are still kept. – jstanley May 09 '13 at 15:30
  • The question is looking to revert the whole workspace to backed - if you don't have any kept files then this is a quick way of achieving that. – gnuchu May 09 '13 at 19:32
  • Yeah, It's a quick way. But in my case which is not mentioned above is that I have many external files distributing in many local workspace diretories. If I remove all the local files, the external files will be removed, which needs a long time to rebuild. – Jeff Fang May 21 '13 at 09:29
1

I had similar issue; First take a back up of existing workspace, then Delete all the files in the local work-space folder. Click update button on Accurev. All files will be re-loaded on the workspace.

Ashwini
  • 11
  • 1
  • I forgot to set ACCUREV_USE_MOD_TIME=1 before creating a new workspace, so all files have mod times around when the workspace was populated. Is the simplest way to fix that, with the fewest undesirable side effects, to do as this answer suggests? There are no modifications in the workspace. It contains over 7k files. – enigment Oct 29 '20 at 17:32
0

If you just want to undo all changes you have done in the workspace:

accurev stat -R -m -fl . | xargs -n 1 accurev purge

You can use similar command with rm / accurev pop to force refetch from backend. You can also vary the flags, -m for modified, -k for kept, -a for all.

Jiri Klouda
  • 1,362
  • 12
  • 25