##// END OF EJS Templates
largefiles: specify where .orig files are kept...
Christian Delahousse -
r26944:ef5bab63 default
parent child Browse files
Show More
@@ -444,12 +444,14 b' def updatelfiles(ui, repo, filelist=None'
444 updated, removed = 0, 0
444 updated, removed = 0, 0
445 for lfile in lfiles:
445 for lfile in lfiles:
446 abslfile = repo.wjoin(lfile)
446 abslfile = repo.wjoin(lfile)
447 abslfileorig = cmdutil.origpath(ui, repo, abslfile)
447 absstandin = repo.wjoin(lfutil.standin(lfile))
448 absstandin = repo.wjoin(lfutil.standin(lfile))
449 absstandinorig = cmdutil.origpath(ui, repo, absstandin)
448 if os.path.exists(absstandin):
450 if os.path.exists(absstandin):
449 if (os.path.exists(absstandin + '.orig') and
451 if (os.path.exists(absstandinorig) and
450 os.path.exists(abslfile)):
452 os.path.exists(abslfile)):
451 shutil.copyfile(abslfile, abslfile + '.orig')
453 shutil.copyfile(abslfile, abslfileorig)
452 util.unlinkpath(absstandin + '.orig')
454 util.unlinkpath(absstandinorig)
453 expecthash = lfutil.readstandin(repo, lfile)
455 expecthash = lfutil.readstandin(repo, lfile)
454 if expecthash != '':
456 if expecthash != '':
455 if lfile not in repo[None]: # not switched to normal file
457 if lfile not in repo[None]: # not switched to normal file
@@ -509,6 +509,18 b' Test actions on largefiles using relativ'
509 $ hg revert anotherlarge
509 $ hg revert anotherlarge
510 $ hg st
510 $ hg st
511 ? sub/anotherlarge.orig
511 ? sub/anotherlarge.orig
512
513 Test orig files go where we want them
514 $ echo moremore >> anotherlarge
515 $ hg revert anotherlarge -v --config 'ui.origbackuppath=.hg/origbackups'
516 creating directory: $TESTTMP/addrm2/.hg/origbackups/.hglf/sub
517 saving current version of ../.hglf/sub/anotherlarge as $TESTTMP/addrm2/.hg/origbackups/.hglf/sub/anotherlarge.orig
518 reverting ../.hglf/sub/anotherlarge (glob)
519 creating directory: $TESTTMP/addrm2/.hg/origbackups/sub
520 found 90c622cf65cebe75c5842f9136c459333faf392e in store
521 found 90c622cf65cebe75c5842f9136c459333faf392e in store
522 $ ls ../.hg/origbackups/sub
523 anotherlarge.orig
512 $ cd ..
524 $ cd ..
513
525
514 Test glob logging from the root dir
526 Test glob logging from the root dir
General Comments 0
You need to be logged in to leave comments. Login now