GNUnet  0.11.x
Functions
pydiffer Namespace Reference

Functions

def getdiff (old, new)
 
def dc_getdiff (dc, old, new)
 
def dcdiff (old, new)
 
def main ()
 

Function Documentation

◆ getdiff()

def pydiffer.getdiff (   old,
  new 
)

Definition at line 9 of file pydiffer.py.

Referenced by dc_getdiff().

9 def getdiff(old, new):
10  diff = []
11  with open(old) as a:
12  with open(new) as b:
13  for l in difflib.unified_diff(
14  a.read().splitlines(),
15  b.read().splitlines()
16  ):
17  diff.append(l)
18  return diff
19 
20 
def getdiff(old, new)
Definition: pydiffer.py:9
Here is the caller graph for this function:

◆ dc_getdiff()

def pydiffer.dc_getdiff (   dc,
  old,
  new 
)

Definition at line 21 of file pydiffer.py.

References getdiff(), and list.

Referenced by dcdiff().

21 def dc_getdiff(dc, old, new):
22  diff = []
23  for f in dc.left_only:
24  diff.append("Only in {}: {}".format(old, f))
25  for f in dc.right_only:
26  diff.append("Only in {}: {}".format(new, f))
27  for f in dc.diff_files:
28  r = getdiff(os.path.join(old, f), os.path.join(new, f))
29  diff.extend(r)
30  for dn, dc in list(dc.subdirs.items()):
31  r = dc_getdiff(dc, os.path.join(old, dn), os.path.join(new, dn))
32  diff.extend(r)
33  return diff
34 
35 
def dc_getdiff(dc, old, new)
Definition: pydiffer.py:21
static int list
Set if we should print a list of currently running services.
Definition: gnunet-arm.c:69
def getdiff(old, new)
Definition: pydiffer.py:9
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dcdiff()

def pydiffer.dcdiff (   old,
  new 
)

Definition at line 36 of file pydiffer.py.

References dc_getdiff().

Referenced by main().

36 def dcdiff(old, new):
37  dc = filecmp.dircmp(old, new)
38  diff = dc_getdiff(dc, old, new)
39  return diff
40 
41 
def dcdiff(old, new)
Definition: pydiffer.py:36
def dc_getdiff(dc, old, new)
Definition: pydiffer.py:21
Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

def pydiffer.main ( )

Definition at line 42 of file pydiffer.py.

References dcdiff().

42 def main():
43  for l in dcdiff(sys.argv[1], sys.argv[2]):
44  print(l)
45 
46 
def dcdiff(old, new)
Definition: pydiffer.py:36
def main()
Definition: pydiffer.py:42
Here is the call graph for this function: