mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
Merge with crew
This commit is contained in:
commit
184d53a4f9
@ -48,6 +48,8 @@ sink_converters = [
|
||||
|
||||
def convertsource(ui, path, type, rev):
|
||||
exceptions = []
|
||||
if type and type not in [s[0] for s in source_converters]:
|
||||
raise util.Abort(_('%s: invalid source repository type') % type)
|
||||
for name, source, sortmode in source_converters:
|
||||
try:
|
||||
if not type or name == type:
|
||||
@ -60,6 +62,8 @@ def convertsource(ui, path, type, rev):
|
||||
raise util.Abort(_('%s: missing or unsupported repository') % path)
|
||||
|
||||
def convertsink(ui, path, type):
|
||||
if type and type not in [s[0] for s in sink_converters]:
|
||||
raise util.Abort(_('%s: invalid destination repository type') % type)
|
||||
for name, sink in sink_converters:
|
||||
try:
|
||||
if not type or name == type:
|
||||
|
@ -755,7 +755,8 @@ class changeset_templater(changeset_printer):
|
||||
cache={
|
||||
'parent': '{rev}:{node|formatnode} ',
|
||||
'manifest': '{rev}:{node|formatnode}',
|
||||
'filecopy': '{name} ({source})'})
|
||||
'filecopy': '{name} ({source})',
|
||||
'extra': '{key}={value|stringescape}'})
|
||||
# Cache mapping from rev to a tuple with tag date, tag
|
||||
# distance and tag name
|
||||
self._latesttagcache = {-1: (0, 0, 'null')}
|
||||
|
@ -93,7 +93,7 @@ cat changelog
|
||||
|
||||
echo "# keys work"
|
||||
for key in author branches date desc file_adds file_dels file_mods \
|
||||
files manifest node parents rev tags diffstat; do
|
||||
files manifest node parents rev tags diffstat extras; do
|
||||
for mode in '' --verbose --debug; do
|
||||
hg log $mode --template "$key$mode: {$key}\n"
|
||||
done
|
||||
|
@ -569,6 +569,33 @@ diffstat--debug: 1: +1/-0
|
||||
diffstat--debug: 1: +4/-0
|
||||
diffstat--debug: 1: +2/-0
|
||||
diffstat--debug: 1: +1/-0
|
||||
extras: branch=default
|
||||
extras: branch=default
|
||||
extras: branch=default
|
||||
extras: branch=default
|
||||
extras: branch=foo
|
||||
extras: branch=default
|
||||
extras: branch=default
|
||||
extras: branch=default
|
||||
extras: branch=default
|
||||
extras--verbose: branch=default
|
||||
extras--verbose: branch=default
|
||||
extras--verbose: branch=default
|
||||
extras--verbose: branch=default
|
||||
extras--verbose: branch=foo
|
||||
extras--verbose: branch=default
|
||||
extras--verbose: branch=default
|
||||
extras--verbose: branch=default
|
||||
extras--verbose: branch=default
|
||||
extras--debug: branch=default
|
||||
extras--debug: branch=default
|
||||
extras--debug: branch=default
|
||||
extras--debug: branch=default
|
||||
extras--debug: branch=foo
|
||||
extras--debug: branch=default
|
||||
extras--debug: branch=default
|
||||
extras--debug: branch=default
|
||||
extras--debug: branch=default
|
||||
# filters work
|
||||
|
||||
hostname
|
||||
|
@ -50,3 +50,10 @@ mkdir emptydir
|
||||
# override $PATH to ensure p4 not visible; use $PYTHON in case we're
|
||||
# running from a devel copy, not a temp installation
|
||||
PATH=$BINDIR $PYTHON $BINDIR/hg convert emptydir 2>&1 | sed 's,file://.*/emptydir,.../emptydir,g'
|
||||
|
||||
echo % convert with imaginary source type
|
||||
hg convert --source-type foo a a-foo
|
||||
echo % convert with imaginary sink type
|
||||
hg convert --dest-type foo a a-foo
|
||||
|
||||
true
|
||||
|
@ -259,3 +259,8 @@ emptydir does not look like a GNU Arch repo
|
||||
emptydir does not look like a Bazaar repo
|
||||
cannot find required "p4" tool
|
||||
abort: emptydir: missing or unsupported repository
|
||||
% convert with imaginary source type
|
||||
initializing destination a-foo repository
|
||||
abort: foo: invalid source repository type
|
||||
% convert with imaginary sink type
|
||||
abort: foo: invalid destination repository type
|
||||
|
Loading…
Reference in New Issue
Block a user