Show More
@@ -2007,7 +2007,9 b' User interface controls.' | |||||
2007 |
|
2007 | |||
2008 | ``origbackuppath`` |
|
2008 | ``origbackuppath`` | |
2009 | The path to a directory used to store generated .orig files. If the path is |
|
2009 | The path to a directory used to store generated .orig files. If the path is | |
2010 | not a directory, one will be created. |
|
2010 | not a directory, one will be created. If set, files stored in this | |
|
2011 | directory have the same name as the original file and do not have a .orig | |||
|
2012 | suffix. | |||
2011 |
|
2013 | |||
2012 | ``paginate`` |
|
2014 | ``paginate`` | |
2013 | Control the pagination of command output (default: True). See :hg:`help pager` |
|
2015 | Control the pagination of command output (default: True). See :hg:`help pager` |
@@ -553,7 +553,7 b' def origpath(ui, repo, filepath):' | |||||
553 | '''customize where .orig files are created |
|
553 | '''customize where .orig files are created | |
554 |
|
554 | |||
555 | Fetch user defined path from config file: [ui] origbackuppath = <path> |
|
555 | Fetch user defined path from config file: [ui] origbackuppath = <path> | |
556 | Fall back to default (filepath) if not specified |
|
556 | Fall back to default (filepath with .orig suffix) if not specified | |
557 | ''' |
|
557 | ''' | |
558 | origbackuppath = ui.config('ui', 'origbackuppath') |
|
558 | origbackuppath = ui.config('ui', 'origbackuppath') | |
559 | if origbackuppath is None: |
|
559 | if origbackuppath is None: | |
@@ -567,7 +567,7 b' def origpath(ui, repo, filepath):' | |||||
567 | ui.note(_('creating directory: %s\n') % origbackupdir) |
|
567 | ui.note(_('creating directory: %s\n') % origbackupdir) | |
568 | util.makedirs(origbackupdir) |
|
568 | util.makedirs(origbackupdir) | |
569 |
|
569 | |||
570 |
return fullorigpath |
|
570 | return fullorigpath | |
571 |
|
571 | |||
572 | class _containsnode(object): |
|
572 | class _containsnode(object): | |
573 | """proxy __contains__(node) to container.__contains__ which accepts revs""" |
|
573 | """proxy __contains__(node) to container.__contains__ which accepts revs""" |
@@ -528,13 +528,13 b' Test orig files go where we want them' | |||||
528 | $ echo moremore >> anotherlarge |
|
528 | $ echo moremore >> anotherlarge | |
529 | $ hg revert anotherlarge -v --config 'ui.origbackuppath=.hg/origbackups' |
|
529 | $ hg revert anotherlarge -v --config 'ui.origbackuppath=.hg/origbackups' | |
530 | creating directory: $TESTTMP/addrm2/.hg/origbackups/.hglf/sub (glob) |
|
530 | creating directory: $TESTTMP/addrm2/.hg/origbackups/.hglf/sub (glob) | |
531 |
saving current version of ../.hglf/sub/anotherlarge as $TESTTMP/addrm2/.hg/origbackups/.hglf/sub/anotherlarge |
|
531 | saving current version of ../.hglf/sub/anotherlarge as $TESTTMP/addrm2/.hg/origbackups/.hglf/sub/anotherlarge (glob) | |
532 | reverting ../.hglf/sub/anotherlarge (glob) |
|
532 | reverting ../.hglf/sub/anotherlarge (glob) | |
533 | creating directory: $TESTTMP/addrm2/.hg/origbackups/sub (glob) |
|
533 | creating directory: $TESTTMP/addrm2/.hg/origbackups/sub (glob) | |
534 | found 90c622cf65cebe75c5842f9136c459333faf392e in store |
|
534 | found 90c622cf65cebe75c5842f9136c459333faf392e in store | |
535 | found 90c622cf65cebe75c5842f9136c459333faf392e in store |
|
535 | found 90c622cf65cebe75c5842f9136c459333faf392e in store | |
536 | $ ls ../.hg/origbackups/sub |
|
536 | $ ls ../.hg/origbackups/sub | |
537 |
anotherlarge |
|
537 | anotherlarge | |
538 | $ cd .. |
|
538 | $ cd .. | |
539 |
|
539 | |||
540 | Test glob logging from the root dir |
|
540 | Test glob logging from the root dir |
@@ -110,7 +110,7 b' Local merge with conflicts:' | |||||
110 |
|
110 | |||
111 | Are orig files from the last commit where we want them? |
|
111 | Are orig files from the last commit where we want them? | |
112 | $ ls .hg/origbackups |
|
112 | $ ls .hg/origbackups | |
113 |
zzz2_merge_bad |
|
113 | zzz2_merge_bad | |
114 |
|
114 | |||
115 | $ hg diff --nodates | grep "^[+-][^<>]" |
|
115 | $ hg diff --nodates | grep "^[+-][^<>]" | |
116 | --- a/zzz1_merge_ok |
|
116 | --- a/zzz1_merge_ok |
@@ -465,7 +465,7 b' test mq.keepchanges setting' | |||||
465 | test previous qpop (with --force and --config) saved .orig files to where user |
|
465 | test previous qpop (with --force and --config) saved .orig files to where user | |
466 | wants them |
|
466 | wants them | |
467 | $ ls .hg/origbackups |
|
467 | $ ls .hg/origbackups | |
468 | b.orig |
|
468 | b | |
469 | $ rm -rf .hg/origbackups |
|
469 | $ rm -rf .hg/origbackups | |
470 |
|
470 | |||
471 | $ cd .. |
|
471 | $ cd .. |
@@ -1388,7 +1388,7 b' apply force, should discard changes in h' | |||||
1388 | $ hg qpush -f --verbose --config 'ui.origbackuppath=.hg/origbackups' |
|
1388 | $ hg qpush -f --verbose --config 'ui.origbackuppath=.hg/origbackups' | |
1389 | applying empty |
|
1389 | applying empty | |
1390 | creating directory: $TESTTMP/forcepush/.hg/origbackups (glob) |
|
1390 | creating directory: $TESTTMP/forcepush/.hg/origbackups (glob) | |
1391 |
saving current version of hello.txt as $TESTTMP/forcepush/.hg/origbackups/hello.txt |
|
1391 | saving current version of hello.txt as $TESTTMP/forcepush/.hg/origbackups/hello.txt (glob) | |
1392 | patching file hello.txt |
|
1392 | patching file hello.txt | |
1393 | committing files: |
|
1393 | committing files: | |
1394 | hello.txt |
|
1394 | hello.txt | |
@@ -1422,7 +1422,7 b' apply force, should discard changes in h' | |||||
1422 | test that the previous call to qpush with -f (--force) and --config actually put |
|
1422 | test that the previous call to qpush with -f (--force) and --config actually put | |
1423 | the orig files out of the working copy |
|
1423 | the orig files out of the working copy | |
1424 | $ ls .hg/origbackups |
|
1424 | $ ls .hg/origbackups | |
1425 |
hello.txt |
|
1425 | hello.txt | |
1426 |
|
1426 | |||
1427 | test popping revisions not in working dir ancestry |
|
1427 | test popping revisions not in working dir ancestry | |
1428 |
|
1428 |
@@ -255,8 +255,8 b' resolve --all should re-merge all unreso' | |||||
255 | warning: conflicts while merging file2! (edit, then use 'hg resolve --mark') |
|
255 | warning: conflicts while merging file2! (edit, then use 'hg resolve --mark') | |
256 | [1] |
|
256 | [1] | |
257 | $ ls .hg/origbackups |
|
257 | $ ls .hg/origbackups | |
258 |
file1 |
|
258 | file1 | |
259 |
file2 |
|
259 | file2 | |
260 | $ grep '<<<' file1 > /dev/null |
|
260 | $ grep '<<<' file1 > /dev/null | |
261 | $ grep '<<<' file2 > /dev/null |
|
261 | $ grep '<<<' file2 > /dev/null | |
262 |
|
262 |
@@ -92,7 +92,7 b' Test creation of backup (.orig) file in ' | |||||
92 | $ echo z > e |
|
92 | $ echo z > e | |
93 | $ hg revert --all -v --config 'ui.origbackuppath=.hg/origbackups' |
|
93 | $ hg revert --all -v --config 'ui.origbackuppath=.hg/origbackups' | |
94 | creating directory: $TESTTMP/repo/.hg/origbackups (glob) |
|
94 | creating directory: $TESTTMP/repo/.hg/origbackups (glob) | |
95 |
saving current version of e as $TESTTMP/repo/.hg/origbackups/e |
|
95 | saving current version of e as $TESTTMP/repo/.hg/origbackups/e (glob) | |
96 | reverting e |
|
96 | reverting e | |
97 | $ rm -rf .hg/origbackups |
|
97 | $ rm -rf .hg/origbackups | |
98 |
|
98 |
@@ -1260,7 +1260,7 b' test .orig files go where the user wants' | |||||
1260 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1260 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1261 | [1] |
|
1261 | [1] | |
1262 | $ ls .hg/origbackups |
|
1262 | $ ls .hg/origbackups | |
1263 |
root |
|
1263 | root | |
1264 | $ rm -rf .hg/origbackups |
|
1264 | $ rm -rf .hg/origbackups | |
1265 |
|
1265 | |||
1266 | test Abort unshelve always gets user out of the unshelved state |
|
1266 | test Abort unshelve always gets user out of the unshelved state |
@@ -885,9 +885,9 b' revert moves orig files to the right pla' | |||||
885 | $ hg revert --all --verbose --config 'ui.origbackuppath=.hg/origbackups' |
|
885 | $ hg revert --all --verbose --config 'ui.origbackuppath=.hg/origbackups' | |
886 | reverting subrepo ../gitroot |
|
886 | reverting subrepo ../gitroot | |
887 | creating directory: $TESTTMP/tc/.hg/origbackups (glob) |
|
887 | creating directory: $TESTTMP/tc/.hg/origbackups (glob) | |
888 |
saving current version of foobar as $TESTTMP/tc/.hg/origbackups/foobar |
|
888 | saving current version of foobar as $TESTTMP/tc/.hg/origbackups/foobar (glob) | |
889 | $ ls .hg/origbackups |
|
889 | $ ls .hg/origbackups | |
890 |
foobar |
|
890 | foobar | |
891 | $ rm -rf .hg/origbackups |
|
891 | $ rm -rf .hg/origbackups | |
892 |
|
892 | |||
893 | show file at specific revision |
|
893 | show file at specific revision |
General Comments 0
You need to be logged in to leave comments.
Login now